public class QuerySpec extends AbstractCollectionSpec<QueryRequest>
Modifier and Type | Field and Description |
---|---|
private java.util.Collection<KeyAttribute> |
exclusiveStartKey |
private KeyAttribute |
hashKey |
private java.util.Map<java.lang.String,java.lang.String> |
nameMap |
private java.util.Collection<QueryFilter> |
queryFilters |
private RangeKeyCondition |
rangeKeyCondition |
private java.util.Map<java.lang.String,java.lang.Object> |
valueMap |
Constructor and Description |
---|
QuerySpec() |
Modifier and Type | Method and Description |
---|---|
java.util.List<java.lang.String> |
getAttributesToGet() |
java.lang.String |
getConditionalOperator() |
java.util.Collection<KeyAttribute> |
getExclusiveStartKey() |
java.lang.String |
getFilterExpression() |
KeyAttribute |
getHashKey() |
java.lang.String |
getKeyConditionExpression() |
java.util.Map<java.lang.String,java.lang.String> |
getNameMap() |
java.lang.String |
getProjectionExpression() |
java.util.Collection<QueryFilter> |
getQueryFilters() |
RangeKeyCondition |
getRangeKeyCondition() |
java.lang.String |
getReturnConsumedCapacity() |
java.lang.String |
getSelect() |
java.util.Map<java.lang.String,java.lang.Object> |
getValueMap() |
boolean |
isConsistentRead() |
boolean |
isScanIndexForward() |
QuerySpec |
withAttributesToGet(java.lang.String... attributes) |
QuerySpec |
withConditionalOperator(ConditionalOperator op) |
QuerySpec |
withConsistentRead(boolean consistentRead) |
QuerySpec |
withExclusiveStartKey(KeyAttribute... exclusiveStartKey) |
QuerySpec |
withExclusiveStartKey(PrimaryKey exclusiveStartKey) |
QuerySpec |
withExclusiveStartKey(java.lang.String hashKeyName,
java.lang.Object hashKeyValue) |
QuerySpec |
withExclusiveStartKey(java.lang.String hashKeyName,
java.lang.Object hashKeyValue,
java.lang.String rangeKeyName,
java.lang.Object rangeKeyValue) |
QuerySpec |
withExpressionSpec(QueryExpressionSpec xspec)
Convenient method to specify expressions (and the associated name map and
value map) via
QueryExpressionSpec . |
QuerySpec |
withFilterExpression(java.lang.String filterExpression)
When a filter expression is specified, the corresponding name-map and
value-map can optionally be specified via
withNameMap(Map) and
withValueMap(Map) . |
QuerySpec |
withHashKey(KeyAttribute hashKey) |
QuerySpec |
withHashKey(java.lang.String hashKeyName,
java.lang.Object hashKeyValue) |
QuerySpec |
withKeyConditionExpression(java.lang.String keyConditionExpression)
When a key condition expression is specified, the corresponding name-map
and value-map can optionally be specified via
withNameMap(Map)
and withValueMap(Map) . |
QuerySpec |
withMaxPageSize(int maxPageSize) |
QuerySpec |
withMaxPageSize(java.lang.Integer maxPageSize) |
QuerySpec |
withMaxResultSize(int maxResultSize) |
QuerySpec |
withMaxResultSize(java.lang.Integer maxResultSize) |
QuerySpec |
withNameMap(java.util.Map<java.lang.String,java.lang.String> nameMap)
Applicable only when an expression has been specified.
|
QuerySpec |
withProgressListener(ProgressListener progressListener) |
QuerySpec |
withProjectionExpression(java.lang.String projectionExpression)
When a projection expression is specified, the corresponding name-map and
value-map can optionally be specified via
withNameMap(Map) and
withValueMap(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(java.util.Map<java.lang.String,java.lang.Object> valueMap)
Applicable only when an expression has been specified.
|
getMaxPageSize, getMaxResultSize, setMaxPageSize, setMaxResultSize, setMaxResultSize
getProgressListener, getRequest, getRequestMetricCollector, setProgressListener, setRequestMetricCollector
private KeyAttribute hashKey
private RangeKeyCondition rangeKeyCondition
private java.util.Collection<QueryFilter> queryFilters
private java.util.Map<java.lang.String,java.lang.String> nameMap
private java.util.Map<java.lang.String,java.lang.Object> valueMap
private java.util.Collection<KeyAttribute> exclusiveStartKey
public KeyAttribute getHashKey()
public QuerySpec withHashKey(KeyAttribute hashKey)
public QuerySpec withHashKey(java.lang.String hashKeyName, java.lang.Object hashKeyValue)
public RangeKeyCondition getRangeKeyCondition()
public QuerySpec withRangeKeyCondition(RangeKeyCondition rangeKeyCondition)
public QuerySpec withKeyConditionExpression(java.lang.String keyConditionExpression)
withNameMap(Map)
and withValueMap(Map)
. (Note the hash key and range key
conditions must not be specified if a key condition expression has been
specified.)public java.lang.String getKeyConditionExpression()
public QuerySpec withAttributesToGet(java.lang.String... attributes)
public java.util.List<java.lang.String> getAttributesToGet()
public QuerySpec withConditionalOperator(ConditionalOperator op)
public java.lang.String getConditionalOperator()
public QuerySpec withConsistentRead(boolean consistentRead)
public boolean isConsistentRead()
public QuerySpec withQueryFilters(QueryFilter... queryFilters)
public java.util.Collection<QueryFilter> getQueryFilters()
public QuerySpec withFilterExpression(java.lang.String filterExpression)
withNameMap(Map)
and
withValueMap(Map)
. (Note query filters must not be specified if
a filter expression has been specified.)public java.lang.String getFilterExpression()
public QuerySpec withProjectionExpression(java.lang.String projectionExpression)
withNameMap(Map)
and
withValueMap(Map)
. (Note attributes-to-get must not be specified
if a projection expression has been specified.)public java.lang.String getProjectionExpression()
public java.util.Map<java.lang.String,java.lang.String> getNameMap()
public QuerySpec withNameMap(java.util.Map<java.lang.String,java.lang.String> nameMap)
public java.util.Map<java.lang.String,java.lang.Object> getValueMap()
public QuerySpec withValueMap(java.util.Map<java.lang.String,java.lang.Object> valueMap)
public java.lang.String getReturnConsumedCapacity()
public QuerySpec withReturnConsumedCapacity(ReturnConsumedCapacity returnConsumedCapacity)
public QuerySpec withScanIndexForward(boolean scanIndexForward)
public boolean isScanIndexForward()
public java.lang.String getSelect()
public java.util.Collection<KeyAttribute> getExclusiveStartKey()
public QuerySpec withExclusiveStartKey(KeyAttribute... exclusiveStartKey)
public QuerySpec withExclusiveStartKey(PrimaryKey exclusiveStartKey)
public QuerySpec withExclusiveStartKey(java.lang.String hashKeyName, java.lang.Object hashKeyValue)
public QuerySpec withExclusiveStartKey(java.lang.String hashKeyName, java.lang.Object hashKeyValue, java.lang.String rangeKeyName, java.lang.Object rangeKeyValue)
public QuerySpec withMaxResultSize(java.lang.Integer maxResultSize)
withMaxResultSize
in class AbstractCollectionSpec<QueryRequest>
public QuerySpec withMaxResultSize(int maxResultSize)
withMaxResultSize
in class AbstractCollectionSpec<QueryRequest>
public QuerySpec withMaxPageSize(java.lang.Integer maxPageSize)
withMaxPageSize
in class AbstractCollectionSpec<QueryRequest>
public QuerySpec withMaxPageSize(int maxPageSize)
withMaxPageSize
in class AbstractCollectionSpec<QueryRequest>
public QuerySpec withProgressListener(ProgressListener progressListener)
withProgressListener
in class AbstractSpec<QueryRequest>
public QuerySpec withRequestMetricCollector(RequestMetricCollector requestMetricCollector)
withRequestMetricCollector
in class AbstractSpec<QueryRequest>
@Beta public QuerySpec withExpressionSpec(QueryExpressionSpec xspec)
QueryExpressionSpec
.