public class TableKeysAndAttributes
extends java.lang.Object
BatchGetItem
request.Modifier and Type | Field and Description |
---|---|
private java.util.Set<java.lang.String> |
attributeNames |
private boolean |
consistentRead |
private java.util.Map<java.lang.String,java.lang.String> |
nameMap |
private java.util.List<PrimaryKey> |
primaryKeys |
private java.lang.String |
projectionExpression |
private java.lang.String |
tableName |
Constructor and Description |
---|
TableKeysAndAttributes(java.lang.String tableName) |
Modifier and Type | Method and Description |
---|---|
TableKeysAndAttributes |
addHashAndRangePrimaryKey(java.lang.String hashKeyName,
java.lang.Object hashKeyValue,
java.lang.String rangeKeyName,
java.lang.Object rangeKeyValue)
Adds a primary key (that consists of a hash-key and a range-key) to be
included in the batch get-item operation.
|
TableKeysAndAttributes |
addHashAndRangePrimaryKeys(java.lang.String hashKeyName,
java.lang.String rangeKeyName,
java.lang.Object... alternatingHashRangeKeyValues)
Adds multiple hash-and-range primary keys to be included in the batch
get-item operation.
|
TableKeysAndAttributes |
addHashOnlyPrimaryKey(java.lang.String hashKeyName,
java.lang.Object hashKeyValue)
Adds a hash-only primary key to be included in the batch get-item
operation.
|
TableKeysAndAttributes |
addHashOnlyPrimaryKeys(java.lang.String hashKeyName,
java.lang.Object... hashKeyValues)
Adds multiple hash-only primary keys to be included in the batch get-item
operation.
|
TableKeysAndAttributes |
addPrimaryKey(PrimaryKey primaryKey)
Adds a primary key to be included in the batch get-item operation.
|
private void |
checkConsistency(PrimaryKey primaryKey) |
java.util.Set<java.lang.String> |
getAttributeNames() |
java.util.Map<java.lang.String,java.lang.String> |
getNameMap() |
java.util.List<PrimaryKey> |
getPrimaryKeys()
Return the list of primary keys (of the current table) to be included in
a batch get-item operation.
|
java.lang.String |
getProjectionExpression() |
java.lang.String |
getTableName() |
boolean |
isConsistentRead() |
TableKeysAndAttributes |
withAttrbuteNames(java.util.List<java.lang.String> attributeNames)
Deprecated.
|
TableKeysAndAttributes |
withAttrbuteNames(java.lang.String... attributeNames)
Deprecated.
|
TableKeysAndAttributes |
withAttributeNames(java.util.List<java.lang.String> attributeNames) |
TableKeysAndAttributes |
withAttributeNames(java.lang.String... attributeNames)
Used to specify the attributes to be retrieved in each item returned
from the batch get-item operation.
|
TableKeysAndAttributes |
withConsistentRead(boolean consistentRead) |
TableKeysAndAttributes |
withHashAndRangeKeys(java.lang.String hashKeyName,
java.lang.String rangeKeyName,
java.lang.Object... alternatingHashAndRangeKeyValues)
Used to specify multiple hash-and-range primary keys.
|
TableKeysAndAttributes |
withHashOnlyKeys(java.lang.String hashKeyName,
java.lang.Object... hashKeyValues)
Used to specify multiple hash-only primary keys.
|
TableKeysAndAttributes |
withNameMap(java.util.Map<java.lang.String,java.lang.String> nameMap) |
TableKeysAndAttributes |
withPrimaryKeys(PrimaryKey... primaryKeys)
Used to specify multiple primary keys.
|
TableKeysAndAttributes |
withProjectionExpression(java.lang.String projectionExpression) |
private final java.lang.String tableName
private java.util.List<PrimaryKey> primaryKeys
private java.util.Set<java.lang.String> attributeNames
private boolean consistentRead
private java.lang.String projectionExpression
private java.util.Map<java.lang.String,java.lang.String> nameMap
public java.util.List<PrimaryKey> getPrimaryKeys()
public TableKeysAndAttributes withPrimaryKeys(PrimaryKey... primaryKeys)
public TableKeysAndAttributes withHashOnlyKeys(java.lang.String hashKeyName, java.lang.Object... hashKeyValues)
hashKeyName
- hash-only key namehashKeyValues
- a list of hash key valuespublic TableKeysAndAttributes withHashAndRangeKeys(java.lang.String hashKeyName, java.lang.String rangeKeyName, java.lang.Object... alternatingHashAndRangeKeyValues)
hashKeyName
- hash key namerangeKeyName
- range key namealternatingHashAndRangeKeyValues
- a list of alternating hash key value and range key valuepublic TableKeysAndAttributes addPrimaryKey(PrimaryKey primaryKey)
private void checkConsistency(PrimaryKey primaryKey)
public TableKeysAndAttributes addHashOnlyPrimaryKey(java.lang.String hashKeyName, java.lang.Object hashKeyValue)
hashKeyName
- name of the hash key attribute namehashKeyValue
- name of the hash key valuepublic TableKeysAndAttributes addHashOnlyPrimaryKeys(java.lang.String hashKeyName, java.lang.Object... hashKeyValues)
hashKeyName
- name of the hash key attribute namehashKeyValues
- multiple hash key valuespublic TableKeysAndAttributes addHashAndRangePrimaryKeys(java.lang.String hashKeyName, java.lang.String rangeKeyName, java.lang.Object... alternatingHashRangeKeyValues)
hashKeyName
- name of the hash key attribute namerangeKeyName
- name of the range key attribute namealternatingHashRangeKeyValues
- used to specify multiple alternating hash key and range key
valuespublic TableKeysAndAttributes addHashAndRangePrimaryKey(java.lang.String hashKeyName, java.lang.Object hashKeyValue, java.lang.String rangeKeyName, java.lang.Object rangeKeyValue)
hashKeyName
- hash key attribute namehashKeyValue
- hash key valuerangeKeyName
- range key attribute namerangeKeyValue
- range key value@Deprecated public TableKeysAndAttributes withAttrbuteNames(java.lang.String... attributeNames)
withAttributeNames(String...)
.@Deprecated public TableKeysAndAttributes withAttrbuteNames(java.util.List<java.lang.String> attributeNames)
withAttributeNames(List)
.public TableKeysAndAttributes withAttributeNames(java.lang.String... attributeNames)
attributeNames
- names of the attributes to be retrieved in each
item returned from the batch get-item operation.public TableKeysAndAttributes withAttributeNames(java.util.List<java.lang.String> attributeNames)
public java.util.Set<java.lang.String> getAttributeNames()
public java.lang.String getTableName()
public boolean isConsistentRead()
public TableKeysAndAttributes withConsistentRead(boolean consistentRead)
public java.lang.String getProjectionExpression()
public TableKeysAndAttributes withProjectionExpression(java.lang.String projectionExpression)
public java.util.Map<java.lang.String,java.lang.String> getNameMap()
public TableKeysAndAttributes withNameMap(java.util.Map<java.lang.String,java.lang.String> nameMap)