Class TableWriteItems
- java.lang.Object
-
- com.amazonaws.services.dynamodbv2.document.TableWriteItems
-
public class TableWriteItems extends Object
Used to specify items to be put and/or primary keys to be deleted from a specific table in aBatchWriteItem
request.
-
-
Constructor Summary
Constructors Constructor Description TableWriteItems(String tableName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TableWriteItems
addHashAndRangePrimaryKeysToDelete(String hashKeyName, String rangeKeyName, Object... alternatingHashRangeKeyValues)
Adds multiple hash-and-range primary keys to be deleted in a batch write operation.TableWriteItems
addHashAndRangePrimaryKeyToDelete(String hashKeyName, Object hashKeyValue, String rangeKeyName, Object rangeKeyValue)
Adds a primary key (that consists of a hash-key and a range-key) to be deleted in a batch write operation.TableWriteItems
addHashOnlyPrimaryKeysToDelete(String hashKeyName, Object... hashKeyValues)
Adds multiple hash-only primary keys to be deleted in a batch write operation.TableWriteItems
addHashOnlyPrimaryKeyToDelete(String hashKeyName, Object hashKeyValue)
Adds a hash-only primary key to be deleted in a batch write operation.TableWriteItems
addItemToPut(Item item)
Adds an item to be put to the current table in a batch write operation.TableWriteItems
addPrimaryKeyToDelete(PrimaryKey primaryKey)
Adds a primary key to be deleted in a batch write-item operation.Collection<Item>
getItemsToPut()
Returns the collection of items to be put in the current table in a batch write operation.List<PrimaryKey>
getPrimaryKeysToDelete()
Return the list of primary keys (of the current table) to be deleted in a batch write operation.String
getTableName()
TableWriteItems
withHashAndRangeKeysToDelete(String hashKeyName, String rangeKeyName, Object... alternatingHashAndRangeKeyValues)
Used to specify multiple hash-and-range primary keys to be deleted from the current table.TableWriteItems
withHashOnlyKeysToDelete(String hashKeyName, Object... hashKeyValues)
Used to specify multiple hash-only primary keys to be deleted from the current table.TableWriteItems
withItemsToPut(Item... itemsToPut)
Used to specify the items to be put in the current table in a batch write operation.TableWriteItems
withItemsToPut(Collection<Item> itemsToPut)
Used to specify the collection of items to be put in the current table in a batch write operation.TableWriteItems
withPrimaryKeysToDelete(PrimaryKey... primaryKeysToDelete)
Used to specify multiple primary keys to be deleted from the current table.
-
-
-
Constructor Detail
-
TableWriteItems
public TableWriteItems(String tableName)
-
-
Method Detail
-
getPrimaryKeysToDelete
public List<PrimaryKey> getPrimaryKeysToDelete()
Return the list of primary keys (of the current table) to be deleted in a batch write operation.
-
withPrimaryKeysToDelete
public TableWriteItems withPrimaryKeysToDelete(PrimaryKey... primaryKeysToDelete)
Used to specify multiple primary keys to be deleted from the current table. A primary key could consist of either a hash-key or both a hash-key and a range-key depending on the schema of the table.
-
withHashOnlyKeysToDelete
public TableWriteItems withHashOnlyKeysToDelete(String hashKeyName, Object... hashKeyValues)
Used to specify multiple hash-only primary keys to be deleted from the current table.- Parameters:
hashKeyName
- hash-only key namehashKeyValues
- a list of hash key values
-
withHashAndRangeKeysToDelete
public TableWriteItems withHashAndRangeKeysToDelete(String hashKeyName, String rangeKeyName, Object... alternatingHashAndRangeKeyValues)
Used to specify multiple hash-and-range primary keys to be deleted from the current table.- Parameters:
hashKeyName
- hash key namerangeKeyName
- range key namealternatingHashAndRangeKeyValues
- a list of alternating hash key value and range key value
-
addPrimaryKeyToDelete
public TableWriteItems addPrimaryKeyToDelete(PrimaryKey primaryKey)
Adds a primary key to be deleted in a batch write-item operation. A primary key could consist of either a hash-key or both a hash-key and a range-key depending on the schema of the table.
-
addHashOnlyPrimaryKeyToDelete
public TableWriteItems addHashOnlyPrimaryKeyToDelete(String hashKeyName, Object hashKeyValue)
Adds a hash-only primary key to be deleted in a batch write operation.- Parameters:
hashKeyName
- name of the hash key attribute namehashKeyValue
- name of the hash key value- Returns:
- the current instance for method chaining purposes
-
addHashOnlyPrimaryKeysToDelete
public TableWriteItems addHashOnlyPrimaryKeysToDelete(String hashKeyName, Object... hashKeyValues)
Adds multiple hash-only primary keys to be deleted in a batch write operation.- Parameters:
hashKeyName
- name of the hash key attribute namehashKeyValues
- multiple hash key values- Returns:
- the current instance for method chaining purposes
-
addHashAndRangePrimaryKeysToDelete
public TableWriteItems addHashAndRangePrimaryKeysToDelete(String hashKeyName, String rangeKeyName, Object... alternatingHashRangeKeyValues)
Adds multiple hash-and-range primary keys to be deleted in a batch write operation.- Parameters:
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 values- Returns:
- the current instance for method chaining purposes
-
addHashAndRangePrimaryKeyToDelete
public TableWriteItems addHashAndRangePrimaryKeyToDelete(String hashKeyName, Object hashKeyValue, String rangeKeyName, Object rangeKeyValue)
Adds a primary key (that consists of a hash-key and a range-key) to be deleted in a batch write operation.- Parameters:
hashKeyName
- hash key attribute namehashKeyValue
- hash key valuerangeKeyName
- range key attribute namerangeKeyValue
- range key value- Returns:
- the current instance for method chaining purposes
-
withItemsToPut
public TableWriteItems withItemsToPut(Item... itemsToPut)
Used to specify the items to be put in the current table in a batch write operation.- Returns:
- the current instance for method chaining purposes
-
withItemsToPut
public TableWriteItems withItemsToPut(Collection<Item> itemsToPut)
Used to specify the collection of items to be put in the current table in a batch write operation.- Returns:
- the current instance for method chaining purposes
-
getItemsToPut
public Collection<Item> getItemsToPut()
Returns the collection of items to be put in the current table in a batch write operation.
-
getTableName
public String getTableName()
-
addItemToPut
public TableWriteItems addItemToPut(Item item)
Adds an item to be put to the current table in a batch write operation.
-
-