Class QuerySpec
- java.lang.Object
-
- com.amazonaws.services.dynamodbv2.document.spec.QuerySpec
-
public class QuerySpec extends Object
Full parameter specification for the Query API.
-
-
Constructor Summary
Constructors Constructor Description QuerySpec()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>
getAttributesToGet()
String
getConditionalOperator()
Collection<KeyAttribute>
getExclusiveStartKey()
String
getFilterExpression()
KeyAttribute
getHashKey()
String
getKeyConditionExpression()
Integer
getMaxPageSize()
The maximum number of resources to be retrieved in a single page; used for pagination purposes.Integer
getMaxResultSize()
The maximum number of resources to be retrieved in this query, including all the resources in all pages to be retrieved.Map<String,String>
getNameMap()
ProgressListener
getProgressListener()
String
getProjectionExpression()
Collection<QueryFilter>
getQueryFilters()
RangeKeyCondition
getRangeKeyCondition()
T
getRequest()
Internal method.RequestMetricCollector
getRequestMetricCollector()
String
getReturnConsumedCapacity()
String
getSelect()
Map<String,Object>
getValueMap()
boolean
isConsistentRead()
boolean
isScanIndexForward()
void
setMaxPageSize(Integer value)
void
setMaxResultSize(int maxResultSize)
void
setMaxResultSize(Integer maxResultSize)
void
setProgressListener(ProgressListener progressListener)
void
setRequestMetricCollector(RequestMetricCollector requestMetricCollector)
QuerySpec
withAttributesToGet(String... attributes)
QuerySpec
withConditionalOperator(ConditionalOperator op)
QuerySpec
withConsistentRead(boolean consistentRead)
QuerySpec
withExclusiveStartKey(KeyAttribute... exclusiveStartKey)
QuerySpec
withExclusiveStartKey(PrimaryKey exclusiveStartKey)
QuerySpec
withExclusiveStartKey(String hashKeyName, Object hashKeyValue)
QuerySpec
withExclusiveStartKey(String hashKeyName, Object hashKeyValue, String rangeKeyName, Object rangeKeyValue)
QuerySpec
withExpressionSpec(QueryExpressionSpec xspec)
Convenient method to specify expressions (and the associated name map and value map) viaQueryExpressionSpec
.QuerySpec
withFilterExpression(String filterExpression)
When a filter expression is specified, the corresponding name-map and value-map can optionally be specified viawithNameMap(Map)
andwithValueMap(Map)
.QuerySpec
withHashKey(KeyAttribute hashKey)
QuerySpec
withHashKey(String hashKeyName, Object hashKeyValue)
QuerySpec
withKeyConditionExpression(String keyConditionExpression)
When a key condition expression is specified, the corresponding name-map and value-map can optionally be specified viawithNameMap(Map)
andwithValueMap(Map)
.QuerySpec
withMaxPageSize(int maxPageSize)
QuerySpec
withMaxPageSize(Integer maxPageSize)
QuerySpec
withMaxResultSize(int maxResultSize)
QuerySpec
withMaxResultSize(Integer maxResultSize)
QuerySpec
withNameMap(Map<String,String> nameMap)
Applicable only when an expression has been specified.QuerySpec
withProgressListener(ProgressListener progressListener)
QuerySpec
withProjectionExpression(String projectionExpression)
When a projection expression is specified, the corresponding name-map and value-map can optionally be specified viawithNameMap(Map)
andwithValueMap(Map)
.QuerySpec
withQueryFilters(QueryFilter... queryFilters)
QuerySpec
withRangeKeyCondition(RangeKeyCondition rangeKeyCondition)
QuerySpec
withRequestMetricCollector(RequestMetricCollector requestMetricCollector)
QuerySpec
withReturnConsumedCapacity(ReturnConsumedCapacity returnConsumedCapacity)
QuerySpec
withScanIndexForward(boolean scanIndexForward)
QuerySpec
withSelect(Select select)
QuerySpec
withValueMap(Map<String,Object> valueMap)
Applicable only when an expression has been specified.
-
-
-
Method Detail
-
getHashKey
public KeyAttribute getHashKey()
-
withHashKey
public QuerySpec withHashKey(KeyAttribute hashKey)
-
getRangeKeyCondition
public RangeKeyCondition getRangeKeyCondition()
-
withRangeKeyCondition
public QuerySpec withRangeKeyCondition(RangeKeyCondition rangeKeyCondition)
-
withKeyConditionExpression
public QuerySpec withKeyConditionExpression(String keyConditionExpression)
When a key condition expression is specified, the corresponding name-map and value-map can optionally be specified viawithNameMap(Map)
andwithValueMap(Map)
. (Note the hash key and range key conditions must not be specified if a key condition expression has been specified.)
-
getKeyConditionExpression
public String getKeyConditionExpression()
-
withConditionalOperator
public QuerySpec withConditionalOperator(ConditionalOperator op)
-
getConditionalOperator
public String getConditionalOperator()
-
withConsistentRead
public QuerySpec withConsistentRead(boolean consistentRead)
-
isConsistentRead
public boolean isConsistentRead()
-
withQueryFilters
public QuerySpec withQueryFilters(QueryFilter... queryFilters)
-
getQueryFilters
public Collection<QueryFilter> getQueryFilters()
-
withFilterExpression
public QuerySpec withFilterExpression(String filterExpression)
When a filter expression is specified, the corresponding name-map and value-map can optionally be specified viawithNameMap(Map)
andwithValueMap(Map)
. (Note query filters must not be specified if a filter expression has been specified.)
-
getFilterExpression
public String getFilterExpression()
-
withProjectionExpression
public QuerySpec withProjectionExpression(String projectionExpression)
When a projection expression is specified, the corresponding name-map and value-map can optionally be specified viawithNameMap(Map)
andwithValueMap(Map)
. (Note attributes-to-get must not be specified if a projection expression has been specified.)
-
getProjectionExpression
public String getProjectionExpression()
-
withNameMap
public QuerySpec withNameMap(Map<String,String> nameMap)
Applicable only when an expression has been specified. Used to specify the actual values for the attribute-name placeholders, where the value in the map can either be string for simple attribute name, or a JSON path expression.
-
withValueMap
public QuerySpec withValueMap(Map<String,Object> valueMap)
Applicable only when an expression has been specified. Used to specify the actual values for the attribute-value placeholders.
-
getReturnConsumedCapacity
public String getReturnConsumedCapacity()
-
withReturnConsumedCapacity
public QuerySpec withReturnConsumedCapacity(ReturnConsumedCapacity returnConsumedCapacity)
-
withScanIndexForward
public QuerySpec withScanIndexForward(boolean scanIndexForward)
-
isScanIndexForward
public boolean isScanIndexForward()
-
getSelect
public String getSelect()
-
getExclusiveStartKey
public Collection<KeyAttribute> getExclusiveStartKey()
-
withExclusiveStartKey
public QuerySpec withExclusiveStartKey(KeyAttribute... exclusiveStartKey)
-
withExclusiveStartKey
public QuerySpec withExclusiveStartKey(PrimaryKey exclusiveStartKey)
-
withExclusiveStartKey
public QuerySpec withExclusiveStartKey(String hashKeyName, Object hashKeyValue)
-
withExclusiveStartKey
public QuerySpec withExclusiveStartKey(String hashKeyName, Object hashKeyValue, String rangeKeyName, Object rangeKeyValue)
-
withMaxResultSize
public QuerySpec withMaxResultSize(int maxResultSize)
-
withMaxPageSize
public QuerySpec withMaxPageSize(int maxPageSize)
-
withProgressListener
public QuerySpec withProgressListener(ProgressListener progressListener)
-
withRequestMetricCollector
public QuerySpec withRequestMetricCollector(RequestMetricCollector requestMetricCollector)
-
withExpressionSpec
@Beta public QuerySpec withExpressionSpec(QueryExpressionSpec xspec)
Convenient method to specify expressions (and the associated name map and value map) viaQueryExpressionSpec
.
-
getMaxResultSize
public Integer getMaxResultSize()
The maximum number of resources to be retrieved in this query, including all the resources in all pages to be retrieved.
-
setMaxResultSize
public void setMaxResultSize(Integer maxResultSize)
-
setMaxResultSize
public void setMaxResultSize(int maxResultSize)
-
getMaxPageSize
public Integer getMaxPageSize()
The maximum number of resources to be retrieved in a single page; used for pagination purposes.
-
setMaxPageSize
public void setMaxPageSize(Integer value)
-
getRequest
public T getRequest()
Internal method. Not meant to be called directly. May change without notice.
-
getProgressListener
public ProgressListener getProgressListener()
-
setProgressListener
public void setProgressListener(ProgressListener progressListener)
-
getRequestMetricCollector
public RequestMetricCollector getRequestMetricCollector()
-
setRequestMetricCollector
public void setRequestMetricCollector(RequestMetricCollector requestMetricCollector)
-
-