Class GetItemSpec
- java.lang.Object
-
- com.amazonaws.services.dynamodbv2.document.spec.AbstractSpecWithPrimaryKey<GetItemRequest>
-
- com.amazonaws.services.dynamodbv2.document.spec.GetItemSpec
-
public class GetItemSpec extends AbstractSpecWithPrimaryKey<GetItemRequest>
Full parameter specification for the GetItem API.
-
-
Constructor Summary
Constructors Constructor Description GetItemSpec()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>getAttributesToGet()Map<String,String>getNameMap()ProgressListenergetProgressListener()StringgetProjectionExpression()TgetRequest()Internal method.RequestMetricCollectorgetRequestMetricCollector()StringgetReturnConsumedCapacity()BooleanisConsistentRead()voidsetProgressListener(ProgressListener progressListener)voidsetRequestMetricCollector(RequestMetricCollector requestMetricCollector)GetItemSpecwithAttributesToGet(String... attrNames)GetItemSpecwithConsistentRead(boolean consistentRead)GetItemSpecwithExpressionSpec(GetItemExpressionSpec xspec)Convenient method to specify expressions (and the associated name map and value map) viaGetItemExpressionSpec.GetItemSpecwithNameMap(Map<String,String> nameMap)Applicable only when an expression has been specified.GetItemSpecwithPrimaryKey(KeyAttribute... components)Sets the primary key with the specified key components.GetItemSpecwithPrimaryKey(PrimaryKey primaryKey)Sets the primary key.GetItemSpecwithPrimaryKey(String hashKeyName, Object hashKeyValue)Sets the primary key with the specified hash-only key name and value.GetItemSpecwithPrimaryKey(String hashKeyName, Object hashKeyValue, String rangeKeyName, Object rangeKeyValue)Sets the primary key with the specified hash key and range key.GetItemSpecwithProgressListener(ProgressListener progressListener)GetItemSpecwithProjectionExpression(String projectionExpression)When a projection expression is specified, the corresponding name-map can optionally be specified via {withNameMap(Map).GetItemSpecwithRequestMetricCollector(RequestMetricCollector requestMetricCollector)GetItemSpecwithReturnConsumedCapacity(ReturnConsumedCapacity capacity)-
Methods inherited from class com.amazonaws.services.dynamodbv2.document.spec.AbstractSpecWithPrimaryKey
getKeyComponents
-
-
-
-
Method Detail
-
withPrimaryKey
public GetItemSpec withPrimaryKey(KeyAttribute... components)
Description copied from class:AbstractSpecWithPrimaryKeySets the primary key with the specified key components.- Overrides:
withPrimaryKeyin classAbstractSpecWithPrimaryKey<GetItemRequest>
-
withPrimaryKey
public GetItemSpec withPrimaryKey(PrimaryKey primaryKey)
Description copied from class:AbstractSpecWithPrimaryKeySets the primary key.- Overrides:
withPrimaryKeyin classAbstractSpecWithPrimaryKey<GetItemRequest>
-
withPrimaryKey
public GetItemSpec withPrimaryKey(String hashKeyName, Object hashKeyValue)
Description copied from class:AbstractSpecWithPrimaryKeySets the primary key with the specified hash-only key name and value.- Overrides:
withPrimaryKeyin classAbstractSpecWithPrimaryKey<GetItemRequest>
-
withPrimaryKey
public GetItemSpec withPrimaryKey(String hashKeyName, Object hashKeyValue, String rangeKeyName, Object rangeKeyValue)
Description copied from class:AbstractSpecWithPrimaryKeySets the primary key with the specified hash key and range key.- Overrides:
withPrimaryKeyin classAbstractSpecWithPrimaryKey<GetItemRequest>
-
getReturnConsumedCapacity
public String getReturnConsumedCapacity()
-
withReturnConsumedCapacity
public GetItemSpec withReturnConsumedCapacity(ReturnConsumedCapacity capacity)
-
withAttributesToGet
public GetItemSpec withAttributesToGet(String... attrNames)
-
isConsistentRead
public Boolean isConsistentRead()
-
withConsistentRead
public GetItemSpec withConsistentRead(boolean consistentRead)
-
getProjectionExpression
public String getProjectionExpression()
-
withProjectionExpression
public GetItemSpec withProjectionExpression(String projectionExpression)
When a projection expression is specified, the corresponding name-map can optionally be specified via {withNameMap(Map). (Note attributes-to-get must not be specified if a projection expression has been specified.)
-
withNameMap
public GetItemSpec 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.
-
withProgressListener
public GetItemSpec withProgressListener(ProgressListener progressListener)
-
withRequestMetricCollector
public GetItemSpec withRequestMetricCollector(RequestMetricCollector requestMetricCollector)
-
withExpressionSpec
@Beta public GetItemSpec withExpressionSpec(GetItemExpressionSpec xspec)
Convenient method to specify expressions (and the associated name map and value map) viaGetItemExpressionSpec.
-
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)
-
-