Class DynamoDBQueryExpression<T>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddExpressionAttributeNamesEntry
(String key, String value) One or more substitution variables for simplifying complex expressions.addExpressionAttributeValuesEntry
(String key, AttributeValue value) One or more values that can be substituted in an expression.Removes all the entries added into ExpressionAttributeNames.Removes all the entries added into ExpressionAttributeValues.Returns the logical operator on the query filter conditions.Returns the exclusive start key for this query.One or more substitution variables for simplifying complex expressions.One or more values that can be substituted in an expression.Evaluates the query results and returns only the desired values.Gets the hash key value(s) for this query.Returns the name of the index to be used by this query.Returns the condition that specifies the key value(s) for items to be retrieved by the Query action.getLimit()
Returns the maximum number of items to retrieve in each service request to DynamoDB.A string that identifies one or more attributes to retrieve from the table.Returns the query filter applied on this query.Gets the range key condition for this query.A value that if set toTOTAL
, the response includes ConsumedCapacity data for tables and indexes.The attributes to be returned in the result.boolean
Returns whether this query uses consistent reads.boolean
Returns whether this query scans forward.void
setConditionalOperator
(ConditionalOperator conditionalOperator) Sets the logical operator on the query filter conditions.void
setConditionalOperator
(String conditionalOperator) Sets the logical operator on the query filter conditions.void
setConsistentRead
(boolean consistentRead) Sets whether this query uses consistent reads.void
setExclusiveStartKey
(Map<String, AttributeValue> exclusiveStartKey) Sets the exclusive start key for this query.void
setExpressionAttributeNames
(Map<String, String> expressionAttributeNames) One or more substitution variables for simplifying complex expressions.void
setExpressionAttributeValues
(Map<String, AttributeValue> expressionAttributeValues) One or more values that can be substituted in an expression.void
setFilterExpression
(String filterExpression) Evaluates the query results and returns only the desired values.void
setHashKeyValues
(T hashKeyValues) Sets the hash key value(s) for this query.void
setIndexName
(String indexName) Sets the name of the index to be used by this query.void
setKeyConditionExpression
(String keyConditionExpression) Sets the condition that specifies the key value(s) for items to be retrieved by the Query action.void
Sets the maximum number of items to retrieve in each service request to DynamoDB.void
setProjectionExpression
(String projectionExpression) A string that identifies one or more attributes to retrieve from the table.void
setQueryFilter
(Map<String, Condition> queryFilter) Sets the query filter applied on this query.void
setRangeKeyConditions
(Map<String, Condition> rangeKeyConditions) Sets the range key condition for this query.void
setReturnConsumedCapacity
(ReturnConsumedCapacity returnConsumedCapacity) A value that if set toTOTAL
, the response includes ConsumedCapacity data for tables and indexes.void
setReturnConsumedCapacity
(String returnConsumedCapacity) A value that if set toTOTAL
, the response includes ConsumedCapacity data for tables and indexes.void
setScanIndexForward
(boolean scanIndexForward) Sets whether this query scans forward.void
The attributes to be returned in the result.void
The attributes to be returned in the result.withConditionalOperator
(ConditionalOperator conditionalOperator) Sets the logical operator on the query filter conditions.withConditionalOperator
(String conditionalOperator) Sets the logical operator on the query filter conditions.withConsistentRead
(boolean consistentRead) Sets whether this query uses consistent reads and returns a pointer to this object for method-chaining.withExclusiveStartKey
(Map<String, AttributeValue> exclusiveStartKey) Sets the exclusive start key for this query and returns a pointer to this object for method-chaining.withExpressionAttributeNames
(Map<String, String> expressionAttributeNames) One or more substitution variables for simplifying complex expressions.withExpressionAttributeValues
(Map<String, AttributeValue> expressionAttributeValues) One or more values that can be substituted in an expression.withFilterExpression
(String filterExpression) Evaluates the query results and returns only the desired values.withHashKeyValues
(T hashKObject) Sets the hash key value(s) for this query.withIndexName
(String indexName) Sets the name of the index to be used by this query.withKeyConditionExpression
(String keyConditionExpression) Sets the maximum number of items to retrieve in each service request to DynamoDB and returns a pointer to this object for method-chaining.withProjectionExpression
(String projectionExpression) A string that identifies one or more attributes to retrieve from the table.withQueryFilter
(Map<String, Condition> queryFilter) Sets the query filter applied on this query.withQueryFilterEntry
(String attributeName, Condition condition) Adds a new condition to the the query filter.withRangeKeyCondition
(String rangeKeyAttributeName, Condition rangeKeyCondition) Sets one range key condition for this query, using the attribute name of the range key.withRangeKeyConditions
(Map<String, Condition> rangeKeyConditions) Sets the range key condition for this query.withReturnConsumedCapacity
(ReturnConsumedCapacity returnConsumedCapacity) A value that if set toTOTAL
, the response includes ConsumedCapacity data for tables and indexes.withReturnConsumedCapacity
(String returnConsumedCapacity) A value that if set toTOTAL
, the response includes ConsumedCapacity data for tables and indexes.withScanIndexForward
(boolean scanIndexForward) Sets whether this query scans forward and returns a pointer to this object for method-chaining.withSelect
(Select select) The attributes to be returned in the result.withSelect
(String select) The attributes to be returned in the result.
-
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
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
Sets whether this query scans forward and returns a pointer to this object for method-chaining. -
getExclusiveStartKey
Returns the exclusive start key for this query. -
setExclusiveStartKey
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
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. UseDynamoDBMapper.queryPage
to retrieve a single page of items from DynamoDB. -
setLimit
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. UseDynamoDBMapper.queryPage
to retrieve a single page of items from DynamoDB. -
withLimit
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. UseDynamoDBMapper.queryPage
to retrieve a single page of items from DynamoDB. -
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
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
Sets the hash key value(s) for this query. All hash key attributes for the table must be specified with this key object. -
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
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
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 usingDynamoDBRangeKey
orDynamoDBIndexRangeKey
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 eithersetIndexName(String)
orwithIndexName(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
Returns the name of the index to be used by this query. -
setIndexName
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 addingDynamoDBIndexHashKey
orDynamoDBIndexRangeKey
annotations to the appropriate getter methods of the mapped object. -
withIndexName
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 addingDynamoDBIndexHashKey
orDynamoDBIndexRangeKey
annotations to the appropriate getter methods of the mapped object.Returns a pointer to this object for method-chaining.
-
getQueryFilter
Returns the query filter applied on this query. -
setQueryFilter
Sets the query filter applied on this query. -
withQueryFilter
Sets the query filter applied on this query.Returns a pointer to this object for method-chaining.
-
withQueryFilterEntry
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
Returns the logical operator on the query filter conditions. -
setConditionalOperator
Sets the logical operator on the query filter conditions. -
withConditionalOperator
Sets the logical operator on the query filter conditions.Returns a pointer to this object for method-chaining.
-
setConditionalOperator
Sets the logical operator on the query filter conditions. -
withConditionalOperator
Sets the logical operator on the query filter conditions.Returns a pointer to this object for method-chaining.
-
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
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
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
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
ANDrangeAttributeName
=: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 namebegins_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
ANDrangeAttributeName
=: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 namebegins_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
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
ANDrangeAttributeName
=: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 namebegins_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)
andwithExpressionAttributeValues(Map)
. -
-
withKeyConditionExpression
-
getExpressionAttributeNames
One or more substitution variables for simplifying complex expressions.- Returns:
- One or more substitution variables for simplifying complex expressions.
- See Also:
-
setExpressionAttributeNames
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
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
Removes all the entries added into ExpressionAttributeNames.Returns a reference to this object so that method calls can be chained together.
-
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
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
Removes all the entries added into ExpressionAttributeValues.Returns a reference to this object so that method calls can be chained together.
-
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
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
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
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
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
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
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
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
A value that if set toTOTAL
, the response includes ConsumedCapacity data for tables and indexes. If set toINDEXES
, the response includes ConsumedCapacity for indexes. If set toNONE
(the default), ConsumedCapacity is not included in the response.Constraints:
Allowed Values: INDEXES, TOTAL, NONEIf 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
, notDynamoDBMapper.query
.- Returns:
- A value that if set to
TOTAL
, the response includes ConsumedCapacity data for tables and indexes. If set toINDEXES
, the response includes ConsumedCapacity for indexes. If set toNONE
(the default), ConsumedCapacity is not included in the response. - See Also:
-
setReturnConsumedCapacity
A value that if set toTOTAL
, the response includes ConsumedCapacity data for tables and indexes. If set toINDEXES
, the response includes ConsumedCapacity for indexes. If set toNONE
(the default), ConsumedCapacity is not included in the response.Constraints:
Allowed Values: INDEXES, TOTAL, NONEIf 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
, notDynamoDBMapper.query
.- Parameters:
returnConsumedCapacity
- A value that if set toTOTAL
, the response includes ConsumedCapacity data for tables and indexes. If set toINDEXES
, the response includes ConsumedCapacity for indexes. If set toNONE
(the default), ConsumedCapacity is not included in the response.- See Also:
-
withReturnConsumedCapacity
A value that if set toTOTAL
, the response includes ConsumedCapacity data for tables and indexes. If set toINDEXES
, the response includes ConsumedCapacity for indexes. If set toNONE
(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, NONEIf 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
, notDynamoDBMapper.query
.- Parameters:
returnConsumedCapacity
- A value that if set toTOTAL
, the response includes ConsumedCapacity data for tables and indexes. If set toINDEXES
, the response includes ConsumedCapacity for indexes. If set toNONE
(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
A value that if set toTOTAL
, the response includes ConsumedCapacity data for tables and indexes. If set toINDEXES
, the response includes ConsumedCapacity for indexes. If set toNONE
(the default), ConsumedCapacity is not included in the response.Constraints:
Allowed Values: INDEXES, TOTAL, NONEIf 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
, notDynamoDBMapper.query
.- Parameters:
returnConsumedCapacity
- A value that if set toTOTAL
, the response includes ConsumedCapacity data for tables and indexes. If set toINDEXES
, the response includes ConsumedCapacity for indexes. If set toNONE
(the default), ConsumedCapacity is not included in the response.- See Also:
-
withReturnConsumedCapacity
public DynamoDBQueryExpression<T> withReturnConsumedCapacity(ReturnConsumedCapacity returnConsumedCapacity) A value that if set toTOTAL
, the response includes ConsumedCapacity data for tables and indexes. If set toINDEXES
, the response includes ConsumedCapacity for indexes. If set toNONE
(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, NONEIf 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
, notDynamoDBMapper.query
.- Parameters:
returnConsumedCapacity
- A value that if set toTOTAL
, the response includes ConsumedCapacity data for tables and indexes. If set toINDEXES
, the response includes ConsumedCapacity for indexes. If set toNONE
(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:
-