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