Class DynamoDBQueryExpression<T>

java.lang.Object
com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBQueryExpression<T>

public class DynamoDBQueryExpression<T> extends Object
A query expression.
  • Constructor Details

    • DynamoDBQueryExpression

      public DynamoDBQueryExpression()
  • Method Details

    • isConsistentRead

      public boolean isConsistentRead()
      Returns whether this query uses consistent reads.
    • setConsistentRead

      public void setConsistentRead(boolean consistentRead)
      Sets whether this query uses consistent reads.
    • withConsistentRead

      public DynamoDBQueryExpression<T> withConsistentRead(boolean consistentRead)
      Sets whether this query uses consistent reads and returns a pointer to this object for method-chaining.
    • isScanIndexForward

      public boolean isScanIndexForward()
      Returns whether this query scans forward.
    • setScanIndexForward

      public void setScanIndexForward(boolean scanIndexForward)
      Sets whether this query scans forward.
    • withScanIndexForward

      public DynamoDBQueryExpression<T> withScanIndexForward(boolean scanIndexForward)
      Sets whether this query scans forward and returns a pointer to this object for method-chaining.
    • getExclusiveStartKey

      public Map<String,AttributeValue> getExclusiveStartKey()
      Returns the exclusive start key for this query.
    • setExclusiveStartKey

      public void setExclusiveStartKey(Map<String,AttributeValue> exclusiveStartKey)
      Sets the exclusive start key for this query.
    • withExclusiveStartKey

      public DynamoDBQueryExpression<T> withExclusiveStartKey(Map<String,AttributeValue> exclusiveStartKey)
      Sets the exclusive start key for this query and returns a pointer to this object for method-chaining.
    • getLimit

      public Integer getLimit()
      Returns the maximum number of items to retrieve in each service request to DynamoDB.

      Note that when calling DynamoDBMapper.query, multiple requests are made to DynamoDB if needed to retrieve the entire result set. Setting this will limit the number of items retrieved by each request, NOT the total number of results that will be retrieved. Use DynamoDBMapper.queryPage to retrieve a single page of items from DynamoDB.

    • setLimit

      public void setLimit(Integer limit)
      Sets the maximum number of items to retrieve in each service request to DynamoDB.

      Note that when calling DynamoDBMapper.query, multiple requests are made to DynamoDB if needed to retrieve the entire result set. Setting this will limit the number of items retrieved by each request, NOT the total number of results that will be retrieved. Use DynamoDBMapper.queryPage to retrieve a single page of items from DynamoDB.

    • withLimit

      public DynamoDBQueryExpression<T> withLimit(Integer limit)
      Sets the maximum number of items to retrieve in each service request to DynamoDB and returns a pointer to this object for method-chaining.

      Note that when calling DynamoDBMapper.query, multiple requests are made to DynamoDB if needed to retrieve the entire result set. Setting this will limit the number of items retrieved by each request, NOT the total number of results that will be retrieved. Use DynamoDBMapper.queryPage to retrieve a single page of items from DynamoDB.

    • getHashKeyValues

      public T getHashKeyValues()
      Gets the hash key value(s) for this query. All hash key attributes for the table must be specified with this key object.
    • setHashKeyValues

      public void setHashKeyValues(T hashKeyValues)
      Sets the hash key value(s) for this query. All hash key attributes for the table must be specified with this key object. Note 1: Currently the DynamoDBMapper supports only one value per hash key. Note 2: Currently the Amazon DynamoDB supports only one hash key per table/index.
    • withHashKeyValues

      public DynamoDBQueryExpression<T> withHashKeyValues(T hashKObject)
      Sets the hash key value(s) for this query. All hash key attributes for the table must be specified with this key object.
    • getRangeKeyConditions

      public Map<String,Condition> getRangeKeyConditions()
      Gets the range key condition for this query. All range key attributes for the table must be specified by attribute name in the map.
    • setRangeKeyConditions

      public void setRangeKeyConditions(Map<String,Condition> rangeKeyConditions)
      Sets the range key condition for this query. All range key attributes for the table must be specified by attribute name in the map.
      Parameters:
      rangeKeyConditions - a map from key name to condition NOTE: The current DynamoDB service only allows up to one range key condition per query. Providing more than one range key condition will result in an AmazonClientException.
    • withRangeKeyConditions

      public DynamoDBQueryExpression<T> withRangeKeyConditions(Map<String,Condition> rangeKeyConditions)
      Sets the range key condition for this query. All range key attributes for the table must be specified by attribute name in the map.
      Parameters:
      rangeKeyConditions - a map from key name to condition NOTE: The current DynamoDB service only allows up to one range key condition per query. Providing more than one range key condition will result in an AmazonClientException.
    • withRangeKeyCondition

      public DynamoDBQueryExpression<T> withRangeKeyCondition(String rangeKeyAttributeName, Condition rangeKeyCondition)
      Sets one range key condition for this query, using the attribute name of the range key. All range key attributes for the table must be specified by using DynamoDBRangeKey or DynamoDBIndexRangeKey annotations before executing the query.
      If the attribute is the primary range key
      users should NOT set any index name for this query.
      If the attribute is an index range key
      DynamoDBMapper will automatically set the index name if the range key is annotated as only used by one local secondary index, otherwise users must set the index name manually by either setIndexName(String) or withIndexName(String).
      Parameters:
      rangeKeyAttributeName - This can be either the primary range key of the table or an index range key.
      rangeKeyCondition - Condition specified on the given range key for this query.
    • getIndexName

      public String getIndexName()
      Returns the name of the index to be used by this query.
    • setIndexName

      public void setIndexName(String indexName)
      Sets the name of the index to be used by this query. The hash key and/or range key of the index must be specified by adding DynamoDBIndexHashKey or DynamoDBIndexRangeKey annotations to the appropriate getter methods of the mapped object.
    • withIndexName

      public DynamoDBQueryExpression<T> withIndexName(String indexName)
      Sets the name of the index to be used by this query. The hash key and/or range key of the index must be specified by adding DynamoDBIndexHashKey or DynamoDBIndexRangeKey annotations to the appropriate getter methods of the mapped object.

      Returns a pointer to this object for method-chaining.

    • getQueryFilter

      public Map<String,Condition> getQueryFilter()
      Returns the query filter applied on this query.
    • setQueryFilter

      public void setQueryFilter(Map<String,Condition> queryFilter)
      Sets the query filter applied on this query.
    • withQueryFilter

      public DynamoDBQueryExpression<T> withQueryFilter(Map<String,Condition> queryFilter)
      Sets the query filter applied on this query.

      Returns a pointer to this object for method-chaining.

    • withQueryFilterEntry

      public DynamoDBQueryExpression<T> withQueryFilterEntry(String attributeName, Condition condition)
      Adds a new condition to the the query filter.

      Returns a pointer to this object for method-chaining.

      Parameters:
      attributeName - The name of the attribute on which the specified condition operates.
      condition - The filter condition applied on the attribute.
    • getConditionalOperator

      public String getConditionalOperator()
      Returns the logical operator on the query filter conditions.
    • setConditionalOperator

      public void setConditionalOperator(String conditionalOperator)
      Sets the logical operator on the query filter conditions.
    • withConditionalOperator

      public DynamoDBQueryExpression<T> withConditionalOperator(String conditionalOperator)
      Sets the logical operator on the query filter conditions.

      Returns a pointer to this object for method-chaining.

    • setConditionalOperator

      public void setConditionalOperator(ConditionalOperator conditionalOperator)
      Sets the logical operator on the query filter conditions.
    • withConditionalOperator

      public DynamoDBQueryExpression<T> withConditionalOperator(ConditionalOperator conditionalOperator)
      Sets the logical operator on the query filter conditions.

      Returns a pointer to this object for method-chaining.

    • getFilterExpression

      public String getFilterExpression()
      Evaluates the query results and returns only the desired values.

      The condition you specify is applied to the items queried; any items that do not match the expression are not returned.

      Returns:
      Evaluates the query results and returns only the desired values.

      The condition you specify is applied to the items queried; any items that do not match the expression are not returned.

      See Also:
    • setFilterExpression

      public void setFilterExpression(String filterExpression)
      Evaluates the query results and returns only the desired values.

      The condition you specify is applied to the items queried; any items that do not match the expression are not returned.

      Parameters:
      filterExpression - Evaluates the query results and returns only the desired values.

      The condition you specify is applied to the items queried; any items that do not match the expression are not returned.

      See Also:
    • withFilterExpression

      public DynamoDBQueryExpression<T> withFilterExpression(String filterExpression)
      Evaluates the query results and returns only the desired values.

      The condition you specify is applied to the items queried; any items that do not match the expression are not returned.

      Returns a reference to this object so that method calls can be chained together.

      Parameters:
      filterExpression - Evaluates the query results and returns only the desired values.

      The condition you specify is applied to the items queried; any items that do not match the expression are not returned.

      Returns:
      A reference to this updated object so that method calls can be chained together.
      See Also:
    • getKeyConditionExpression

      public String getKeyConditionExpression()
      Returns the condition that specifies the key value(s) for items to be retrieved by the Query action.

      The condition must perform an equality test on a single hash key value. The condition can also test for one or more range key values. A Query can use KeyConditionExpression to retrieve a single item with a given hash and range key value, or several items that have the same hash key value but different range key values.

      The hash key equality test is required, and must be specified in the following format:

      hashAttributeName = :hashval

      If you also want to provide a range key condition, it must be combined using AND with the hash key condition. Following is an example, using the = comparison operator for the range key:

      hashAttributeName = :hashval AND rangeAttributeName = :rangeval

      Valid comparisons for the range key condition are as follows:

      • rangeAttributeName = :rangeval - true if the range key is equal to :rangeval.

      • rangeAttributeName < :rangeval - true if the range key is less than :rangeval.

      • rangeAttributeName <= :rangeval - true if the range key is less than or equal to :rangeval.

      • rangeAttributeName > :rangeval - true if the range key is greater than :rangeval.

      • rangeAttributeName >= :rangeval - true if the range key is greater than or equal to :rangeval.

      • rangeAttributeName BETWEEN :rangeval1 AND :rangeval2 - true if the range key is less than or greater than :rangeval1, and less than or equal to :rangeval2.

      • begins_with (rangeAttributeName, :rangeval) - true if the range key begins with a particular operand. Note that the function name begins_with is case-sensitive.

      Use ExpressionAttributeValues (via withExpressionAttributeValues(Map)) to replace tokens such as :hashval and :rangeval with actual values at runtime.

      You can optionally use ExpressionAttributeNames (via withExpressionAttributeNames(Map)) to replace the names of the hash and range attributes with placeholder tokens. This might be necessary if an attribute name conflicts with a DynamoDB reserved word. For example, the following KeyConditionExpression causes an error because Size is a reserved word:

      • Size = :myval

      To work around this, define a placeholder (such a #myval) to represent the attribute name Size. KeyConditionExpression then is as follows:

      • #S = :myval

      For a list of reserved words, see Reserved Words in the Amazon DynamoDB Developer Guide.

      For more information on ExpressionAttributeNames and ExpressionAttributeValues, see Using Placeholders for Attribute Names and Values in the Amazon DynamoDB Developer Guide.

      KeyConditionExpression replaces the legacy KeyConditions parameter.

      Returns:
      The condition that specifies the key value(s) for items to be retrieved by the Query action.

      The condition must perform an equality test on a single hash key value. The condition can also test for one or more range key values. A Query can use KeyConditionExpression to retrieve a single item with a given hash and range key value, or several items that have the same hash key value but different range key values.

      The hash key equality test is required, and must be specified in the following format:

      hashAttributeName = :hashval

      If you also want to provide a range key condition, it must be combined using AND with the hash key condition. Following is an example, using the = comparison operator for the range key:

      hashAttributeName = :hashval AND rangeAttributeName = :rangeval

      Valid comparisons for the range key condition are as follows:

      • rangeAttributeName = :rangeval - true if the range key is equal to :rangeval.

      • rangeAttributeName < :rangeval - true if the range key is less than :rangeval.

      • rangeAttributeName <= :rangeval - true if the range key is less than or equal to :rangeval.

      • rangeAttributeName > :rangeval - true if the range key is greater than :rangeval.

      • rangeAttributeName >= :rangeval - true if the range key is greater than or equal to :rangeval.

      • rangeAttributeName BETWEEN :rangeval1 AND :rangeval2 - true if the range key is less than or greater than :rangeval1, and less than or equal to :rangeval2.

      • begins_with (rangeAttributeName, :rangeval) - true if the range key begins with a particular operand. Note that the function name begins_with is case-sensitive.

      Use ExpressionAttributeValues (via withExpressionAttributeValues(Map)) to replace tokens such as :hashval and :rangeval with actual values at runtime.

      You can optionally use ExpressionAttributeNames (via withExpressionAttributeNames(Map)) to replace the names of the hash and range attributes with placeholder tokens. This might be necessary if an attribute name conflicts with a DynamoDB reserved word. For example, the following KeyConditionExpression causes an error because Size is a reserved word:

      • Size = :myval

      To work around this, define a placeholder (such a #myval) to represent the attribute name Size. KeyConditionExpression then is as follows:

      • #S = :myval

      For a list of reserved words, see Reserved Words in the Amazon DynamoDB Developer Guide.

      For more information on ExpressionAttributeNames and ExpressionAttributeValues, see Using Placeholders for Attribute Names and Values in the Amazon DynamoDB Developer Guide.

      KeyConditionExpression replaces the legacy KeyConditions parameter.

    • setKeyConditionExpression

      public void setKeyConditionExpression(String keyConditionExpression)
      Sets the condition that specifies the key value(s) for items to be retrieved by the Query action.

      The condition must perform an equality test on a single hash key value. The condition can also test for one or more range key values. A Query can use KeyConditionExpression to retrieve a single item with a given hash and range key value, or several items that have the same hash key value but different range key values.

      The hash key equality test is required, and must be specified in the following format:

      hashAttributeName = :hashval

      If you also want to provide a range key condition, it must be combined using AND with the hash key condition. Following is an example, using the = comparison operator for the range key:

      hashAttributeName = :hashval AND rangeAttributeName = :rangeval

      Valid comparisons for the range key condition are as follows:

      • rangeAttributeName = :rangeval - true if the range key is equal to :rangeval.

      • rangeAttributeName < :rangeval - true if the range key is less than :rangeval.

      • rangeAttributeName <= :rangeval - true if the range key is less than or equal to :rangeval.

      • rangeAttributeName > :rangeval - true if the range key is greater than :rangeval.

      • rangeAttributeName >= :rangeval - true if the range key is greater than or equal to :rangeval.

      • rangeAttributeName BETWEEN :rangeval1 AND :rangeval2 - true if the range key is less than or greater than :rangeval1, and less than or equal to :rangeval2.

      • begins_with (rangeAttributeName, :rangeval) - true if the range key begins with a particular operand. Note that the function name begins_with is case-sensitive.

      Use ExpressionAttributeValues (via withExpressionAttributeValues(Map)) to replace tokens such as :hashval and :rangeval with actual values at runtime.

      You can optionally use ExpressionAttributeNames via withExpressionAttributeNames(Map)) to replace the names of the hash and range attributes with placeholder tokens. This might be necessary if an attribute name conflicts with a DynamoDB reserved word. For example, the following KeyConditionExpression causes an error because Size is a reserved word:

      • Size = :myval

      To work around this, define a placeholder (such a #myval) to represent the attribute name Size. KeyConditionExpression then is as follows:

      • #S = :myval

      For a list of reserved words, see Reserved Words in the Amazon DynamoDB Developer Guide.

      For more information on ExpressionAttributeNames and ExpressionAttributeValues, see Using Placeholders for Attribute Names and Values in the Amazon DynamoDB Developer Guide.

      KeyConditionExpression replaces the legacy KeyConditions parameter.

      When a key expression is specified, the corresponding name-map and value-map can optionally be specified via withExpressionAttributeNames(Map) and withExpressionAttributeValues(Map).

    • withKeyConditionExpression

      public DynamoDBQueryExpression<T> withKeyConditionExpression(String keyConditionExpression)
    • getExpressionAttributeNames

      public Map<String,String> getExpressionAttributeNames()
      One or more substitution variables for simplifying complex expressions.
      Returns:
      One or more substitution variables for simplifying complex expressions.
      See Also:
    • setExpressionAttributeNames

      public void setExpressionAttributeNames(Map<String,String> expressionAttributeNames)
      One or more substitution variables for simplifying complex expressions.
      Parameters:
      expressionAttributeNames - One or more substitution variables for simplifying complex expressions.
      See Also:
    • withExpressionAttributeNames

      public DynamoDBQueryExpression<T> withExpressionAttributeNames(Map<String,String> expressionAttributeNames)
      One or more substitution variables for simplifying complex expressions.
      Parameters:
      expressionAttributeNames - One or more substitution variables for simplifying complex expressions.
      Returns:
      A reference to this updated object so that method calls can be chained together.
      See Also:
    • addExpressionAttributeNamesEntry

      public DynamoDBQueryExpression<T> addExpressionAttributeNamesEntry(String key, String value)
      One or more substitution variables for simplifying complex expressions. The method adds a new key-value pair into ExpressionAttributeNames parameter, and returns a reference to this object so that method calls can be chained together.
      Parameters:
      key - The key of the entry to be added into ExpressionAttributeNames.
      value - The corresponding value of the entry to be added into ExpressionAttributeNames.
      See Also:
    • clearExpressionAttributeNamesEntries

      public DynamoDBQueryExpression<T> clearExpressionAttributeNamesEntries()
      Removes all the entries added into ExpressionAttributeNames.

      Returns a reference to this object so that method calls can be chained together.

    • getExpressionAttributeValues

      public Map<String,AttributeValue> getExpressionAttributeValues()
      One or more values that can be substituted in an expression.
      Returns:
      One or more values that can be substituted in an expression.
      See Also:
    • setExpressionAttributeValues

      public void setExpressionAttributeValues(Map<String,AttributeValue> expressionAttributeValues)
      One or more values that can be substituted in an expression.
      Parameters:
      expressionAttributeValues - One or more values that can be substituted in an expression.
      See Also:
    • withExpressionAttributeValues

      public DynamoDBQueryExpression<T> withExpressionAttributeValues(Map<String,AttributeValue> expressionAttributeValues)
      One or more values that can be substituted in an expression.
      Parameters:
      expressionAttributeValues - One or more values that can be substituted in an expression.
      Returns:
      A reference to this updated object so that method calls can be chained together.
      See Also:
    • addExpressionAttributeValuesEntry

      public DynamoDBQueryExpression<T> addExpressionAttributeValuesEntry(String key, AttributeValue value)
      One or more values that can be substituted in an expression. The method adds a new key-value pair into ExpressionAttributeValues parameter, and returns a reference to this object so that method calls can be chained together.
      Parameters:
      key - The key of the entry to be added into ExpressionAttributeValues.
      value - The corresponding value of the entry to be added into ExpressionAttributeValues.
      See Also:
    • clearExpressionAttributeValuesEntries

      public DynamoDBQueryExpression<T> clearExpressionAttributeValuesEntries()
      Removes all the entries added into ExpressionAttributeValues.

      Returns a reference to this object so that method calls can be chained together.

    • getSelect

      public String getSelect()
      The attributes to be returned in the result. You can retrieve all item attributes, specific item attributes, the count of matching items, or in the case of an index, some or all of the attributes projected into the index.

      Constraints:
      Allowed Values: ALL_ATTRIBUTES, ALL_PROJECTED_ATTRIBUTES, SPECIFIC_ATTRIBUTES, COUNT

      Returns:
      The attributes to be returned in the result. You can retrieve all item attributes, specific item attributes, the count of matching items, or in the case of an index, some or all of the attributes projected into the index.
      See Also:
    • setSelect

      public void setSelect(String select)
      The attributes to be returned in the result. You can retrieve all item attributes, specific item attributes, the count of matching items, or in the case of an index, some or all of the attributes projected into the index.

      Constraints:
      Allowed Values: ALL_ATTRIBUTES, ALL_PROJECTED_ATTRIBUTES, SPECIFIC_ATTRIBUTES, COUNT

      Parameters:
      select - The attributes to be returned in the result. You can retrieve all item attributes, specific item attributes, the count of matching items, or in the case of an index, some or all of the attributes projected into the index.
      See Also:
    • withSelect

      public DynamoDBQueryExpression<T> withSelect(String select)
      The attributes to be returned in the result. You can retrieve all item attributes, specific item attributes, the count of matching items, or in the case of an index, some or all of the attributes projected into the index.

      Returns a reference to this object so that method calls can be chained together.

      Constraints:
      Allowed Values: ALL_ATTRIBUTES, ALL_PROJECTED_ATTRIBUTES, SPECIFIC_ATTRIBUTES, COUNT

      Parameters:
      select - The attributes to be returned in the result. You can retrieve all item attributes, specific item attributes, the count of matching items, or in the case of an index, some or all of the attributes projected into the index.
      Returns:
      A reference to this updated object so that method calls can be chained together.
      See Also:
    • setSelect

      public void setSelect(Select select)
      The attributes to be returned in the result. You can retrieve all item attributes, specific item attributes, the count of matching items, or in the case of an index, some or all of the attributes projected into the index.

      Constraints:
      Allowed Values: ALL_ATTRIBUTES, ALL_PROJECTED_ATTRIBUTES, SPECIFIC_ATTRIBUTES, COUNT

      Parameters:
      select - The attributes to be returned in the result. You can retrieve all item attributes, specific item attributes, the count of matching items, or in the case of an index, some or all of the attributes projected into the index.
      See Also:
    • withSelect

      public DynamoDBQueryExpression<T> withSelect(Select select)
      The attributes to be returned in the result. You can retrieve all item attributes, specific item attributes, the count of matching items, or in the case of an index, some or all of the attributes projected into the index.

      Returns a reference to this object so that method calls can be chained together.

      Constraints:
      Allowed Values: ALL_ATTRIBUTES, ALL_PROJECTED_ATTRIBUTES, SPECIFIC_ATTRIBUTES, COUNT

      Parameters:
      select - The attributes to be returned in the result. You can retrieve all item attributes, specific item attributes, the count of matching items, or in the case of an index, some or all of the attributes projected into the index.
      Returns:
      A reference to this updated object so that method calls can be chained together.
      See Also:
    • getProjectionExpression

      public String getProjectionExpression()
      A string that identifies one or more attributes to retrieve from the table. These attributes can include scalars, sets, or elements of a JSON document. The attributes in the expression must be separated by commas.

      If no attribute names are specified, then all attributes will be returned. If any of the requested attributes are not found, they will not appear in the result.

      For more information, go to Accessing Item Attributes in the Amazon DynamoDB Developer Guide.

      Returns:
      A string that identifies one or more attributes to retrieve from the table. These attributes can include scalars, sets, or elements of a JSON document. The attributes in the expression must be separated by commas.

      If no attribute names are specified, then all attributes will be returned. If any of the requested attributes are not found, they will not appear in the result.

      For more information, go to Accessing Item Attributes in the Amazon DynamoDB Developer Guide.

    • setProjectionExpression

      public void setProjectionExpression(String projectionExpression)
      A string that identifies one or more attributes to retrieve from the table. These attributes can include scalars, sets, or elements of a JSON document. The attributes in the expression must be separated by commas.

      If no attribute names are specified, then all attributes will be returned. If any of the requested attributes are not found, they will not appear in the result.

      For more information, go to Accessing Item Attributes in the Amazon DynamoDB Developer Guide.

      Parameters:
      projectionExpression - A string that identifies one or more attributes to retrieve from the table. These attributes can include scalars, sets, or elements of a JSON document. The attributes in the expression must be separated by commas.

      If no attribute names are specified, then all attributes will be returned. If any of the requested attributes are not found, they will not appear in the result.

      For more information, go to Accessing Item Attributes in the Amazon DynamoDB Developer Guide.

    • withProjectionExpression

      public DynamoDBQueryExpression<T> withProjectionExpression(String projectionExpression)
      A string that identifies one or more attributes to retrieve from the table. These attributes can include scalars, sets, or elements of a JSON document. The attributes in the expression must be separated by commas.

      If no attribute names are specified, then all attributes will be returned. If any of the requested attributes are not found, they will not appear in the result.

      For more information, go to Accessing Item Attributes in the Amazon DynamoDB Developer Guide.

      Returns a reference to this object so that method calls can be chained together.

      Parameters:
      projectionExpression - A string that identifies one or more attributes to retrieve from the table. These attributes can include scalars, sets, or elements of a JSON document. The attributes in the expression must be separated by commas.

      If no attribute names are specified, then all attributes will be returned. If any of the requested attributes are not found, they will not appear in the result.

      For more information, go to Accessing Item Attributes in the Amazon DynamoDB Developer Guide.

      Returns:
      A reference to this updated object so that method calls can be chained together.
    • getReturnConsumedCapacity

      public String getReturnConsumedCapacity()
      A value that if set to TOTAL, the response includes ConsumedCapacity data for tables and indexes. If set to INDEXES, the response includes ConsumedCapacity for indexes. If set to NONE (the default), ConsumedCapacity is not included in the response.

      Constraints:
      Allowed Values: INDEXES, TOTAL, NONE

      If enabled, the underlying request to DynamoDB will include the configured parameter value and the low-level response from DynamoDB will include the amount of capacity consumed by the query. Currently, the consumed capacity is only exposed through the DynamoDBMapper when you call DynamoDBMapper.queryPage, not DynamoDBMapper.query.

      Returns:
      A value that if set to TOTAL, the response includes ConsumedCapacity data for tables and indexes. If set to INDEXES, the response includes ConsumedCapacity for indexes. If set to NONE (the default), ConsumedCapacity is not included in the response.
      See Also:
    • setReturnConsumedCapacity

      public void setReturnConsumedCapacity(String returnConsumedCapacity)
      A value that if set to TOTAL, the response includes ConsumedCapacity data for tables and indexes. If set to INDEXES, the response includes ConsumedCapacity for indexes. If set to NONE (the default), ConsumedCapacity is not included in the response.

      Constraints:
      Allowed Values: INDEXES, TOTAL, NONE

      If enabled, the underlying request to DynamoDB will include the configured parameter value and the low-level response from DynamoDB will include the amount of capacity consumed by the query. Currently, the consumed capacity is only exposed through the DynamoDBMapper when you call DynamoDBMapper.queryPage, not DynamoDBMapper.query.

      Parameters:
      returnConsumedCapacity - A value that if set to TOTAL, the response includes ConsumedCapacity data for tables and indexes. If set to INDEXES, the response includes ConsumedCapacity for indexes. If set to NONE (the default), ConsumedCapacity is not included in the response.
      See Also:
    • withReturnConsumedCapacity

      public DynamoDBQueryExpression<T> withReturnConsumedCapacity(String returnConsumedCapacity)
      A value that if set to TOTAL, the response includes ConsumedCapacity data for tables and indexes. If set to INDEXES, the response includes ConsumedCapacity for indexes. If set to NONE (the default), ConsumedCapacity is not included in the response.

      Returns a reference to this object so that method calls can be chained together.

      Constraints:
      Allowed Values: INDEXES, TOTAL, NONE

      If enabled, the underlying request to DynamoDB will include the configured parameter value and the low-level response from DynamoDB will include the amount of capacity consumed by the query. Currently, the consumed capacity is only exposed through the DynamoDBMapper when you call DynamoDBMapper.queryPage, not DynamoDBMapper.query.

      Parameters:
      returnConsumedCapacity - A value that if set to TOTAL, the response includes ConsumedCapacity data for tables and indexes. If set to INDEXES, the response includes ConsumedCapacity for indexes. If set to NONE (the default), ConsumedCapacity is not included in the response.
      Returns:
      A reference to this updated object so that method calls can be chained together.
      See Also:
    • setReturnConsumedCapacity

      public void setReturnConsumedCapacity(ReturnConsumedCapacity returnConsumedCapacity)
      A value that if set to TOTAL, the response includes ConsumedCapacity data for tables and indexes. If set to INDEXES, the response includes ConsumedCapacity for indexes. If set to NONE (the default), ConsumedCapacity is not included in the response.

      Constraints:
      Allowed Values: INDEXES, TOTAL, NONE

      If enabled, the underlying request to DynamoDB will include the configured parameter value and the low-level response from DynamoDB will include the amount of capacity consumed by the query. Currently, the consumed capacity is only exposed through the DynamoDBMapper when you call DynamoDBMapper.queryPage, not DynamoDBMapper.query.

      Parameters:
      returnConsumedCapacity - A value that if set to TOTAL, the response includes ConsumedCapacity data for tables and indexes. If set to INDEXES, the response includes ConsumedCapacity for indexes. If set to NONE (the default), ConsumedCapacity is not included in the response.
      See Also:
    • withReturnConsumedCapacity

      public DynamoDBQueryExpression<T> withReturnConsumedCapacity(ReturnConsumedCapacity returnConsumedCapacity)
      A value that if set to TOTAL, the response includes ConsumedCapacity data for tables and indexes. If set to INDEXES, the response includes ConsumedCapacity for indexes. If set to NONE (the default), ConsumedCapacity is not included in the response.

      Returns a reference to this object so that method calls can be chained together.

      Constraints:
      Allowed Values: INDEXES, TOTAL, NONE

      If enabled, the underlying request to DynamoDB will include the configured parameter value and the low-level response from DynamoDB will include the amount of capacity consumed by the query. Currently, the consumed capacity is only exposed through the DynamoDBMapper when you call DynamoDBMapper.queryPage, not DynamoDBMapper.query.

      Parameters:
      returnConsumedCapacity - A value that if set to TOTAL, the response includes ConsumedCapacity data for tables and indexes. If set to INDEXES, the response includes ConsumedCapacity for indexes. If set to NONE (the default), ConsumedCapacity is not included in the response.
      Returns:
      A reference to this updated object so that method calls can be chained together.
      See Also: