Class DynamoDBScanExpression
ComparisonOperator
for more
information on the available comparison types).- See Also:
-
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.void
addFilterCondition
(String attributeName, Condition condition) Adds a new filter condition to the current scan filter.Removes all the entries added into ExpressionAttributeNames.Removes all the entries added into ExpressionAttributeValues.Returns the logical operator on the filter conditions of this scan.Returns the exclusive start key for this scan.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.Returns the name of the index to be used by this scan; or null if there is none.getLimit()
Returns the limit of items to scan during this scan.A string that identifies one or more attributes to retrieve from the table.A value that if set toTOTAL
, the response includes ConsumedCapacity data for tables and indexes.Returns the scan filter as a map of attribute names to conditions.Returns the ID of the segment to be scanned.The attributes to be returned in the result.Returns the total number of segments into which the scan will be divided.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
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 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
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
The attributes to be returned in the result.void
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.withConditionalOperator
(ConditionalOperator conditionalOperator) Sets the logical operator on the filter conditions of this scan and returns a pointer to this object for method-chaining.withConditionalOperator
(String conditionalOperator) Sets the logical operator on the filter conditions of this scan and returns a pointer to this object for method-chaining.withConsistentRead
(Boolean consistentRead) Sets whether this scan uses consistent reads and returns a reference to this object for method chaining.withExclusiveStartKey
(Map<String, AttributeValue> exclusiveStartKey) Sets the exclusive start key for this scan 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.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.withFilterExpression
(String filterExpression) Evaluates the query results and returns only the desired values.withIndexName
(String indexName) Sets the name of the index to be used by this scan.Sets the limit of items to scan 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.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.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.withSegment
(Integer segment) Sets the ID of the segment to be scanned 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.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.
-
Constructor Details
-
DynamoDBScanExpression
public DynamoDBScanExpression()
-
-
Method Details
-
getIndexName
Returns the name of the index to be used by this scan; or null if there is none. -
setIndexName
Sets the name of the index to be used by this scan. -
withIndexName
Sets the name of the index to be used by this scan.Returns a pointer to this object for method-chaining.
-
getScanFilter
Returns the scan filter as a map of attribute names to conditions.- Returns:
- The scan filter as a map of attribute names to conditions.
-
setScanFilter
Sets the scan filter to the map of attribute names to conditions given.- Parameters:
scanFilter
- The map of attribute names to conditions to use when filtering scan results.
-
withScanFilter
Sets the scan filter to the map of attribute names to conditions given and returns a pointer to this object for method-chaining.- Parameters:
scanFilter
- The map of attribute names to conditions to use when filtering scan results.
-
addFilterCondition
Adds a new filter condition to the current scan filter.- Parameters:
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.
-
withFilterConditionEntry
Adds a new filter condition to the current scan filter and returns a pointer to this object for method-chaining.- Parameters:
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.
-
getExclusiveStartKey
Returns the exclusive start key for this scan. -
setExclusiveStartKey
Sets the exclusive start key for this scan. -
withExclusiveStartKey
Sets the exclusive start key for this scan and returns a pointer to this object for method-chaining. -
getLimit
Returns the limit of items to scan during this scan.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. -
setLimit
Sets the limit of items to scan during this scan. 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.- See Also:
-
withLimit
Sets the limit of items to scan and returns a pointer to this object for method-chaining. 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.- See Also:
-
getTotalSegments
Returns the total number of segments into which the scan will be divided. -
setTotalSegments
Sets the total number of segments into which the scan will be divided. -
withTotalSegments
Sets the total number of segments into which the scan will be divided and returns a pointer to this object for method-chaining. -
getSegment
Returns the ID of the segment to be scanned. -
setSegment
Sets the ID of the segment to be scanned. -
withSegment
Sets the ID of the segment to be scanned and returns a pointer to this object for method-chaining. -
getConditionalOperator
Returns the logical operator on the filter conditions of this scan. -
setConditionalOperator
Sets the logical operator on the filter conditions of this scan. -
withConditionalOperator
Sets the logical operator on the filter conditions of this scan and returns a pointer to this object for method-chaining. -
setConditionalOperator
Sets the logical operator on the filter conditions of this scan. -
withConditionalOperator
Sets the logical operator on the filter conditions of this scan and 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:
-
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 DynamoDBScanExpression 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 DynamoDBScanExpression 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
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 scan. Currently, the consumed capacity is only exposed through the DynamoDBMapper when you call
DynamoDBMapper.scanPage
, notDynamoDBMapper.scan
.- 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 scan. Currently, the consumed capacity is only exposed through the DynamoDBMapper when you call
DynamoDBMapper.scanPage
, notDynamoDBMapper.scan
.- 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 scan. Currently, the consumed capacity is only exposed through the DynamoDBMapper when you call
DynamoDBMapper.scanPage
, notDynamoDBMapper.scan
.- 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 scan. Currently, the consumed capacity is only exposed through the DynamoDBMapper when you call
DynamoDBMapper.scanPage
, notDynamoDBMapper.scan
.- 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 DynamoDBScanExpression 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 scan. Currently, the consumed capacity is only exposed through the DynamoDBMapper when you call
DynamoDBMapper.scanPage
, notDynamoDBMapper.scan
.- 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:
-
isConsistentRead
Returns whether this scan uses consistent reads.- See Also:
-
setConsistentRead
Sets whether this scan uses consistent reads. -
withConsistentRead
Sets whether this scan uses consistent reads and returns a reference to this object for method chaining.
-