public class DynamoDBQueryExpression<T> extends Object
Constructor and Description |
---|
DynamoDBQueryExpression() |
Modifier and Type | Method and Description |
---|---|
DynamoDBQueryExpression<T> |
addExpressionAttributeNamesEntry(String key,
String value)
One or more substitution variables for simplifying complex expressions.
|
DynamoDBQueryExpression<T> |
addExpressionAttributeValuesEntry(String key,
AttributeValue value)
One or more values that can be substituted in an expression.
|
DynamoDBQueryExpression<T> |
clearExpressionAttributeNamesEntries()
Removes all the entries added into ExpressionAttributeNames.
|
DynamoDBQueryExpression<T> |
clearExpressionAttributeValuesEntries()
Removes all the entries added into ExpressionAttributeValues.
|
String |
getConditionalOperator()
Returns the logical operator on the query filter conditions.
|
Map<String,AttributeValue> |
getExclusiveStartKey()
Returns the exclusive start key for this query.
|
Map<String,String> |
getExpressionAttributeNames()
One or more substitution variables for simplifying complex expressions.
|
Map<String,AttributeValue> |
getExpressionAttributeValues()
One or more values that can be substituted in an expression.
|
String |
getFilterExpression()
Evaluates the query results and returns only the desired values.
|
T |
getHashKeyValues()
Gets the hash key value(s) for this query.
|
String |
getIndexName()
Returns the name of the index to be used by this query.
|
String |
getKeyConditionExpression()
Returns the condition that specifies the key value(s) for items to be
retrieved by the Query action.
|
Integer |
getLimit()
Returns the maximum number of items to retrieve in each service request
to DynamoDB.
|
String |
getProjectionExpression()
A string that identifies one or more attributes to retrieve from the
table.
|
Map<String,Condition> |
getQueryFilter()
Returns the query filter applied on this query.
|
Map<String,Condition> |
getRangeKeyConditions()
Gets the range key condition for this query.
|
String |
getReturnConsumedCapacity()
A value that if set to
TOTAL , the response includes
ConsumedCapacity data for tables and indexes. |
String |
getSelect()
The attributes to be returned in the result.
|
boolean |
isConsistentRead()
Returns whether this query uses consistent reads.
|
boolean |
isScanIndexForward()
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 |
setLimit(Integer limit)
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 to
TOTAL , the response includes
ConsumedCapacity data for tables and indexes. |
void |
setReturnConsumedCapacity(String returnConsumedCapacity)
A value that if set to
TOTAL , the response includes
ConsumedCapacity data for tables and indexes. |
void |
setScanIndexForward(boolean scanIndexForward)
Sets whether this query scans forward.
|
void |
setSelect(Select select)
The attributes to be returned in the result.
|
void |
setSelect(String select)
The attributes to be returned in the result.
|
DynamoDBQueryExpression<T> |
withConditionalOperator(ConditionalOperator conditionalOperator)
Sets the logical operator on the query filter conditions.
|
DynamoDBQueryExpression<T> |
withConditionalOperator(String conditionalOperator)
Sets the logical operator on the query filter conditions.
|
DynamoDBQueryExpression<T> |
withConsistentRead(boolean consistentRead)
Sets whether this query uses consistent reads and returns a pointer to
this object for method-chaining.
|
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.
|
DynamoDBQueryExpression<T> |
withExpressionAttributeNames(Map<String,String> expressionAttributeNames)
One or more substitution variables for simplifying complex expressions.
|
DynamoDBQueryExpression<T> |
withExpressionAttributeValues(Map<String,AttributeValue> expressionAttributeValues)
One or more values that can be substituted in an expression.
|
DynamoDBQueryExpression<T> |
withFilterExpression(String filterExpression)
Evaluates the query results and returns only the desired values.
|
DynamoDBQueryExpression<T> |
withHashKeyValues(T hashKObject)
Sets the hash key value(s) for this query.
|
DynamoDBQueryExpression<T> |
withIndexName(String indexName)
Sets the name of the index to be used by this query.
|
DynamoDBQueryExpression<T> |
withKeyConditionExpression(String keyConditionExpression) |
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.
|
DynamoDBQueryExpression<T> |
withProjectionExpression(String projectionExpression)
A string that identifies one or more attributes to retrieve from the
table.
|
DynamoDBQueryExpression<T> |
withQueryFilter(Map<String,Condition> queryFilter)
Sets the query filter applied on this query.
|
DynamoDBQueryExpression<T> |
withQueryFilterEntry(String attributeName,
Condition condition)
Adds a new condition to the the query filter.
|
DynamoDBQueryExpression<T> |
withRangeKeyCondition(String rangeKeyAttributeName,
Condition rangeKeyCondition)
Sets one range key condition for this query, using the attribute name of
the range key.
|
DynamoDBQueryExpression<T> |
withRangeKeyConditions(Map<String,Condition> rangeKeyConditions)
Sets the range key condition for this query.
|
DynamoDBQueryExpression<T> |
withReturnConsumedCapacity(ReturnConsumedCapacity returnConsumedCapacity)
A value that if set to
TOTAL , the response includes
ConsumedCapacity data for tables and indexes. |
DynamoDBQueryExpression<T> |
withReturnConsumedCapacity(String returnConsumedCapacity)
A value that if set to
TOTAL , the response includes
ConsumedCapacity data for tables and indexes. |
DynamoDBQueryExpression<T> |
withScanIndexForward(boolean scanIndexForward)
Sets whether this query scans forward and returns a pointer to this
object for method-chaining.
|
DynamoDBQueryExpression<T> |
withSelect(Select select)
The attributes to be returned in the result.
|
DynamoDBQueryExpression<T> |
withSelect(String select)
The attributes to be returned in the result.
|
public boolean isConsistentRead()
public void setConsistentRead(boolean consistentRead)
public DynamoDBQueryExpression<T> withConsistentRead(boolean consistentRead)
public boolean isScanIndexForward()
public void setScanIndexForward(boolean scanIndexForward)
public DynamoDBQueryExpression<T> withScanIndexForward(boolean scanIndexForward)
public Map<String,AttributeValue> getExclusiveStartKey()
public void setExclusiveStartKey(Map<String,AttributeValue> exclusiveStartKey)
public DynamoDBQueryExpression<T> withExclusiveStartKey(Map<String,AttributeValue> exclusiveStartKey)
public Integer getLimit()
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.
public void setLimit(Integer limit)
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.
public DynamoDBQueryExpression<T> withLimit(Integer limit)
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.
public T getHashKeyValues()
public void setHashKeyValues(T hashKeyValues)
public DynamoDBQueryExpression<T> withHashKeyValues(T hashKObject)
public Map<String,Condition> getRangeKeyConditions()
public void setRangeKeyConditions(Map<String,Condition> rangeKeyConditions)
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.public DynamoDBQueryExpression<T> withRangeKeyConditions(Map<String,Condition> rangeKeyConditions)
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.public DynamoDBQueryExpression<T> withRangeKeyCondition(String rangeKeyAttributeName, Condition rangeKeyCondition)
DynamoDBRangeKey
or DynamoDBIndexRangeKey
annotations
before executing the query.
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)
.
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.public String getIndexName()
public void setIndexName(String indexName)
DynamoDBIndexHashKey
or DynamoDBIndexRangeKey
annotations to the appropriate getter methods of the mapped
object.public DynamoDBQueryExpression<T> withIndexName(String indexName)
DynamoDBIndexHashKey
or DynamoDBIndexRangeKey
annotations to the appropriate getter methods of the mapped
object.
Returns a pointer to this object for method-chaining.
public Map<String,Condition> getQueryFilter()
public void setQueryFilter(Map<String,Condition> queryFilter)
public DynamoDBQueryExpression<T> withQueryFilter(Map<String,Condition> queryFilter)
Returns a pointer to this object for method-chaining.
public DynamoDBQueryExpression<T> withQueryFilterEntry(String attributeName, Condition condition)
Returns a pointer to this object for method-chaining.
attributeName
- The name of the attribute on which the specified condition
operates.condition
- The filter condition applied on the attribute.public String getConditionalOperator()
public void setConditionalOperator(String conditionalOperator)
public DynamoDBQueryExpression<T> withConditionalOperator(String conditionalOperator)
Returns a pointer to this object for method-chaining.
public void setConditionalOperator(ConditionalOperator conditionalOperator)
public DynamoDBQueryExpression<T> withConditionalOperator(ConditionalOperator conditionalOperator)
Returns a pointer to this object for method-chaining.
public String getFilterExpression()
The condition you specify is applied to the items queried; any items that do not match the expression are not returned.
The condition you specify is applied to the items queried; any items that do not match the expression are not returned.
QueryRequest.getFilterExpression()
public void setFilterExpression(String filterExpression)
The condition you specify is applied to the items queried; any items that do not match the expression are not returned.
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.
QueryRequest.setFilterExpression(String)
public DynamoDBQueryExpression<T> withFilterExpression(String filterExpression)
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.
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.
QueryRequest.withFilterExpression(String)
public String getKeyConditionExpression()
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.
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.
public void setKeyConditionExpression(String keyConditionExpression)
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)
.
public DynamoDBQueryExpression<T> withKeyConditionExpression(String keyConditionExpression)
public Map<String,String> getExpressionAttributeNames()
QueryRequest.getExpressionAttributeNames()
public void setExpressionAttributeNames(Map<String,String> expressionAttributeNames)
expressionAttributeNames
- One or more substitution variables for simplifying complex
expressions.QueryRequest.setExpressionAttributeNames(Map)
public DynamoDBQueryExpression<T> withExpressionAttributeNames(Map<String,String> expressionAttributeNames)
expressionAttributeNames
- One or more substitution variables for simplifying complex
expressions.QueryRequest.withExpressionAttributeNames(Map)
public DynamoDBQueryExpression<T> addExpressionAttributeNamesEntry(String key, String value)
key
- The key of the entry to be added into
ExpressionAttributeNames.value
- The corresponding value of the entry to be added into
ExpressionAttributeNames.QueryRequest.addExpressionAttributeNamesEntry(String, String)
public DynamoDBQueryExpression<T> clearExpressionAttributeNamesEntries()
Returns a reference to this object so that method calls can be chained together.
public Map<String,AttributeValue> getExpressionAttributeValues()
QueryRequest.getExpressionAttributeValues()
public void setExpressionAttributeValues(Map<String,AttributeValue> expressionAttributeValues)
expressionAttributeValues
- One or more values that can be substituted in an expression.QueryRequest.setExpressionAttributeValues(Map)
public DynamoDBQueryExpression<T> withExpressionAttributeValues(Map<String,AttributeValue> expressionAttributeValues)
expressionAttributeValues
- One or more values that can be substituted in an expression.QueryRequest.withExpressionAttributeValues(Map)
public DynamoDBQueryExpression<T> addExpressionAttributeValuesEntry(String key, AttributeValue value)
key
- The key of the entry to be added into
ExpressionAttributeValues.value
- The corresponding value of the entry to be added into
ExpressionAttributeValues.QueryRequest.addExpressionAttributeValuesEntry(String,
AttributeValue)
public DynamoDBQueryExpression<T> clearExpressionAttributeValuesEntries()
Returns a reference to this object so that method calls can be chained together.
public String getSelect()
Constraints:
Allowed Values: ALL_ATTRIBUTES, ALL_PROJECTED_ATTRIBUTES, SPECIFIC_ATTRIBUTES, COUNT
Select
public void setSelect(String select)
Constraints:
Allowed Values: ALL_ATTRIBUTES, ALL_PROJECTED_ATTRIBUTES, SPECIFIC_ATTRIBUTES, COUNT
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.Select
public DynamoDBQueryExpression<T> withSelect(String select)
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
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.Select
public void setSelect(Select select)
Constraints:
Allowed Values: ALL_ATTRIBUTES, ALL_PROJECTED_ATTRIBUTES, SPECIFIC_ATTRIBUTES, COUNT
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.Select
public DynamoDBQueryExpression<T> withSelect(Select select)
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
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.Select
public String getProjectionExpression()
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.
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.
public void setProjectionExpression(String projectionExpression)
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.
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.
public DynamoDBQueryExpression<T> withProjectionExpression(String projectionExpression)
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.
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.
public String getReturnConsumedCapacity()
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
.
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.ReturnConsumedCapacity
public void setReturnConsumedCapacity(String returnConsumedCapacity)
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
.
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.ReturnConsumedCapacity
public DynamoDBQueryExpression<T> withReturnConsumedCapacity(String returnConsumedCapacity)
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
.
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.ReturnConsumedCapacity
public void setReturnConsumedCapacity(ReturnConsumedCapacity returnConsumedCapacity)
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
.
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.ReturnConsumedCapacity
public DynamoDBQueryExpression<T> withReturnConsumedCapacity(ReturnConsumedCapacity returnConsumedCapacity)
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
.
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.ReturnConsumedCapacity
Copyright © 2015. All rights reserved.