public class DynamoDBScanExpression extends Object
ComparisonOperator
for more
information on the available comparison types).Constructor and Description |
---|
DynamoDBScanExpression() |
Modifier and Type | Method and Description |
---|---|
DynamoDBScanExpression |
addExpressionAttributeNamesEntry(String key,
String value)
One or more substitution variables for simplifying complex expressions.
|
DynamoDBScanExpression |
addExpressionAttributeValuesEntry(String key,
AttributeValue value)
One or more values that can be substituted in an expression.
|
void |
addFilterCondition(String attributeName,
Condition condition)
Adds a new filter condition to the current scan filter.
|
DynamoDBScanExpression |
clearExpressionAttributeNamesEntries()
Removes all the entries added into ExpressionAttributeNames.
|
DynamoDBScanExpression |
clearExpressionAttributeValuesEntries()
Removes all the entries added into ExpressionAttributeValues.
|
String |
getConditionalOperator()
Returns the logical operator on the filter conditions of this scan.
|
Map<String,AttributeValue> |
getExclusiveStartKey()
Returns the exclusive start key for this scan.
|
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.
|
String |
getIndexName()
Returns the name of the index to be used by this scan; or null if there
is none.
|
Integer |
getLimit()
Returns the limit of items to scan during this scan.
|
String |
getProjectionExpression()
A string that identifies one or more attributes to retrieve from the
table.
|
String |
getReturnConsumedCapacity()
A value that if set to
TOTAL , the response includes
ConsumedCapacity data for tables and indexes. |
Map<String,Condition> |
getScanFilter()
Returns the scan filter as a map of attribute names to conditions.
|
Integer |
getSegment()
Returns the ID of the segment to be scanned.
|
String |
getSelect()
The attributes to be returned in the result.
|
Integer |
getTotalSegments()
Returns the total number of segments into which the scan will be divided.
|
Boolean |
isConsistentRead()
Returns whether this scan uses consistent reads.
|
void |
setConditionalOperator(ConditionalOperator conditionalOperator)
Sets the logical operator on the filter conditions of this scan.
|
void |
setConditionalOperator(String conditionalOperator)
Sets the logical operator on the filter conditions of this scan.
|
void |
setConsistentRead(Boolean consistentRead)
Sets whether this scan uses consistent reads.
|
void |
setExclusiveStartKey(Map<String,AttributeValue> exclusiveStartKey)
Sets the exclusive start key for this scan.
|
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 |
setIndexName(String indexName)
Sets the name of the index to be used by this scan.
|
void |
setLimit(Integer limit)
Sets the limit of items to scan during this scan.
|
void |
setProjectionExpression(String projectionExpression)
A string that identifies one or more attributes to retrieve from the
table.
|
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 |
setScanFilter(Map<String,Condition> scanFilter)
Sets the scan filter to the map of attribute names to conditions given.
|
void |
setSegment(Integer segment)
Sets the ID of the segment to be scanned.
|
void |
setSelect(Select select)
The attributes to be returned in the result.
|
void |
setSelect(String select)
The attributes to be returned in the result.
|
void |
setTotalSegments(Integer totalSegments)
Sets the total number of segments into which the scan will be divided.
|
DynamoDBScanExpression |
withConditionalOperator(ConditionalOperator conditionalOperator)
Sets the logical operator on the filter conditions of this scan and
returns a pointer to this object for method-chaining.
|
DynamoDBScanExpression |
withConditionalOperator(String conditionalOperator)
Sets the logical operator on the filter conditions of this scan and
returns a pointer to this object for method-chaining.
|
DynamoDBScanExpression |
withConsistentRead(Boolean consistentRead)
Sets whether this scan uses consistent reads and returns a reference
to this object for method chaining.
|
DynamoDBScanExpression |
withExclusiveStartKey(Map<String,AttributeValue> exclusiveStartKey)
Sets the exclusive start key for this scan and returns a pointer to this
object for method-chaining.
|
DynamoDBScanExpression |
withExpressionAttributeNames(Map<String,String> expressionAttributeNames)
One or more substitution variables for simplifying complex expressions.
|
DynamoDBScanExpression |
withExpressionAttributeValues(Map<String,AttributeValue> expressionAttributeValues)
One or more values that can be substituted in an expression.
|
DynamoDBScanExpression |
withFilterConditionEntry(String attributeName,
Condition condition)
Adds a new filter condition to the current scan filter and returns a
pointer to this object for method-chaining.
|
DynamoDBScanExpression |
withFilterExpression(String filterExpression)
Evaluates the query results and returns only the desired values.
|
DynamoDBScanExpression |
withIndexName(String indexName)
Sets the name of the index to be used by this scan.
|
DynamoDBScanExpression |
withLimit(Integer limit)
Sets the limit of items to scan and returns a pointer to this object for
method-chaining.
|
DynamoDBScanExpression |
withProjectionExpression(String projectionExpression)
A string that identifies one or more attributes to retrieve from the
table.
|
DynamoDBScanExpression |
withReturnConsumedCapacity(ReturnConsumedCapacity returnConsumedCapacity)
A value that if set to
TOTAL , the response includes
ConsumedCapacity data for tables and indexes. |
DynamoDBScanExpression |
withReturnConsumedCapacity(String returnConsumedCapacity)
A value that if set to
TOTAL , the response includes
ConsumedCapacity data for tables and indexes. |
DynamoDBScanExpression |
withScanFilter(Map<String,Condition> scanFilter)
Sets the scan filter to the map of attribute names to conditions given
and returns a pointer to this object for method-chaining.
|
DynamoDBScanExpression |
withSegment(Integer segment)
Sets the ID of the segment to be scanned and returns a pointer to this
object for method-chaining.
|
DynamoDBScanExpression |
withSelect(Select select)
The attributes to be returned in the result.
|
DynamoDBScanExpression |
withSelect(String select)
The attributes to be returned in the result.
|
DynamoDBScanExpression |
withTotalSegments(Integer totalSegments)
Sets the total number of segments into which the scan will be divided and
returns a pointer to this object for method-chaining.
|
public String getIndexName()
public void setIndexName(String indexName)
public DynamoDBScanExpression withIndexName(String indexName)
Returns a pointer to this object for method-chaining.
public Map<String,Condition> getScanFilter()
public void setScanFilter(Map<String,Condition> scanFilter)
scanFilter
- The map of attribute names to conditions to use when filtering
scan results.public DynamoDBScanExpression withScanFilter(Map<String,Condition> scanFilter)
scanFilter
- The map of attribute names to conditions to use when filtering
scan results.public void addFilterCondition(String attributeName, Condition condition)
attributeName
- The name of the attribute on which the specified condition
operates.condition
- The condition which describes how the specified attribute is
compared and if a row of data is included in the results
returned by the scan operation.public DynamoDBScanExpression withFilterConditionEntry(String attributeName, Condition condition)
attributeName
- The name of the attribute on which the specified condition
operates.condition
- The condition which describes how the specified attribute is
compared and if a row of data is included in the results
returned by the scan operation.public Map<String,AttributeValue> getExclusiveStartKey()
public void setExclusiveStartKey(Map<String,AttributeValue> exclusiveStartKey)
public DynamoDBScanExpression withExclusiveStartKey(Map<String,AttributeValue> exclusiveStartKey)
public Integer getLimit()
Use with caution. Please note that this is not the same as the
number of items to return from the scan operation -- the operation will
cease and return as soon as this many items are scanned, even if no
matching results are found. Furthermore, PaginatedScanList
will
execute as many scan operations as necessary until it either reaches the
end of the result set as indicated by DynamoDB or enough elements are
available to fulfill the list operation (e.g. iteration). Therefore,
except when scanning without a scan filter, it's usually bad practice to
set a low limit, since doing so will often generate the same amount of
traffic to DynamoDB but with a greater number of round trips and
therefore more overall latency.
public void setLimit(Integer limit)
getLimit()
public DynamoDBScanExpression withLimit(Integer limit)
getLimit()
public Integer getTotalSegments()
public void setTotalSegments(Integer totalSegments)
public DynamoDBScanExpression withTotalSegments(Integer totalSegments)
public Integer getSegment()
public void setSegment(Integer segment)
public DynamoDBScanExpression withSegment(Integer segment)
public String getConditionalOperator()
public void setConditionalOperator(String conditionalOperator)
public DynamoDBScanExpression withConditionalOperator(String conditionalOperator)
public void setConditionalOperator(ConditionalOperator conditionalOperator)
public DynamoDBScanExpression withConditionalOperator(ConditionalOperator conditionalOperator)
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.
ScanRequest.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.
ScanRequest.setFilterExpression(String)
public DynamoDBScanExpression 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.
ScanRequest.withFilterExpression(String)
public Map<String,String> getExpressionAttributeNames()
scanRequest#getExpressionAttributeNames()
public void setExpressionAttributeNames(Map<String,String> expressionAttributeNames)
expressionAttributeNames
- One or more substitution variables for simplifying complex
expressions.ScanRequest.setExpressionAttributeNames(Map)
public DynamoDBScanExpression withExpressionAttributeNames(Map<String,String> expressionAttributeNames)
expressionAttributeNames
- One or more substitution variables for simplifying complex
expressions.ScanRequest.withExpressionAttributeNames(Map)
public DynamoDBScanExpression 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.ScanRequest.addExpressionAttributeNamesEntry(String, String)
public DynamoDBScanExpression clearExpressionAttributeNamesEntries()
Returns a reference to this object so that method calls can be chained together.
public Map<String,AttributeValue> getExpressionAttributeValues()
ScanRequest.getExpressionAttributeValues()
public void setExpressionAttributeValues(Map<String,AttributeValue> expressionAttributeValues)
expressionAttributeValues
- One or more values that can be substituted in an expression.ScanRequest.setExpressionAttributeValues(Map)
public DynamoDBScanExpression withExpressionAttributeValues(Map<String,AttributeValue> expressionAttributeValues)
expressionAttributeValues
- One or more values that can be substituted in an expression.ScanRequest.withExpressionAttributeValues(Map)
public DynamoDBScanExpression 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.ScanRequest.addExpressionAttributeValuesEntry(String,
AttributeValue)
public DynamoDBScanExpression 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 DynamoDBScanExpression 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 DynamoDBScanExpression 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 DynamoDBScanExpression 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 scan. Currently, the
consumed capacity is only exposed through the DynamoDBMapper when you
call DynamoDBMapper.scanPage
, not DynamoDBMapper.scan
.
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 scan. Currently, the
consumed capacity is only exposed through the DynamoDBMapper when you
call DynamoDBMapper.scanPage
, not DynamoDBMapper.scan
.
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 DynamoDBScanExpression 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 scan. Currently, the
consumed capacity is only exposed through the DynamoDBMapper when you
call DynamoDBMapper.scanPage
, not DynamoDBMapper.scan
.
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 scan. Currently, the
consumed capacity is only exposed through the DynamoDBMapper when you
call DynamoDBMapper.scanPage
, not DynamoDBMapper.scan
.
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 DynamoDBScanExpression 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 scan. Currently, the
consumed capacity is only exposed through the DynamoDBMapper when you
call DynamoDBMapper.scanPage
, not DynamoDBMapper.scan
.
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 Boolean isConsistentRead()
ScanRequest.isConsistentRead()
public void setConsistentRead(Boolean consistentRead)
public DynamoDBScanExpression withConsistentRead(Boolean consistentRead)
Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.