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()
ProgressListener
getProgressListener()
String
getProjectionExpression()
T
getRequest()
Internal method.RequestMetricCollector
getRequestMetricCollector()
String
getReturnConsumedCapacity()
Boolean
isConsistentRead()
void
setProgressListener(ProgressListener progressListener)
void
setRequestMetricCollector(RequestMetricCollector requestMetricCollector)
GetItemSpec
withAttributesToGet(String... attrNames)
GetItemSpec
withConsistentRead(boolean consistentRead)
GetItemSpec
withExpressionSpec(GetItemExpressionSpec xspec)
Convenient method to specify expressions (and the associated name map and value map) viaGetItemExpressionSpec
.GetItemSpec
withNameMap(Map<String,String> nameMap)
Applicable only when an expression has been specified.GetItemSpec
withPrimaryKey(KeyAttribute... components)
Sets the primary key with the specified key components.GetItemSpec
withPrimaryKey(PrimaryKey primaryKey)
Sets the primary key.GetItemSpec
withPrimaryKey(String hashKeyName, Object hashKeyValue)
Sets the primary key with the specified hash-only key name and value.GetItemSpec
withPrimaryKey(String hashKeyName, Object hashKeyValue, String rangeKeyName, Object rangeKeyValue)
Sets the primary key with the specified hash key and range key.GetItemSpec
withProgressListener(ProgressListener progressListener)
GetItemSpec
withProjectionExpression(String projectionExpression)
When a projection expression is specified, the corresponding name-map can optionally be specified via {withNameMap(Map)
.GetItemSpec
withRequestMetricCollector(RequestMetricCollector requestMetricCollector)
GetItemSpec
withReturnConsumedCapacity(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:AbstractSpecWithPrimaryKey
Sets the primary key with the specified key components.- Overrides:
withPrimaryKey
in classAbstractSpecWithPrimaryKey<GetItemRequest>
-
withPrimaryKey
public GetItemSpec withPrimaryKey(PrimaryKey primaryKey)
Description copied from class:AbstractSpecWithPrimaryKey
Sets the primary key.- Overrides:
withPrimaryKey
in classAbstractSpecWithPrimaryKey<GetItemRequest>
-
withPrimaryKey
public GetItemSpec withPrimaryKey(String hashKeyName, Object hashKeyValue)
Description copied from class:AbstractSpecWithPrimaryKey
Sets the primary key with the specified hash-only key name and value.- Overrides:
withPrimaryKey
in classAbstractSpecWithPrimaryKey<GetItemRequest>
-
withPrimaryKey
public GetItemSpec withPrimaryKey(String hashKeyName, Object hashKeyValue, String rangeKeyName, Object rangeKeyValue)
Description copied from class:AbstractSpecWithPrimaryKey
Sets the primary key with the specified hash key and range key.- Overrides:
withPrimaryKey
in 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)
-
-