@NotThreadSafe public static final class TransactWriteItemsEnhancedRequest.Builder extends Object
A valid builder should contain at least one low-level request such as DeleteItemEnhancedRequest
.
Modifier and Type | Method and Description |
---|---|
<T> TransactWriteItemsEnhancedRequest.Builder |
addConditionCheck(MappedTableResource<T> mappedTableResource,
ConditionCheck<T> request)
Adds a condition check for a primary key in the associated table to the transaction.
|
<T> TransactWriteItemsEnhancedRequest.Builder |
addConditionCheck(MappedTableResource<T> mappedTableResource,
Consumer<ConditionCheck.Builder> requestConsumer)
Adds a condition check for a primary key in the associated table to the transaction by accepting a consumer
of
ConditionCheck.Builder . |
<T> TransactWriteItemsEnhancedRequest.Builder |
addDeleteItem(MappedTableResource<T> mappedTableResource,
DeleteItemEnhancedRequest request)
|
<T> TransactWriteItemsEnhancedRequest.Builder |
addDeleteItem(MappedTableResource<T> mappedTableResource,
Key key)
Adds a primary lookup key for the item to delete, and it's associated table, to the transaction.
|
<T> TransactWriteItemsEnhancedRequest.Builder |
addDeleteItem(MappedTableResource<T> mappedTableResource,
T keyItem)
Adds a primary lookup key for the item to delete, and it's associated table, to the transaction.
|
<T> TransactWriteItemsEnhancedRequest.Builder |
addDeleteItem(MappedTableResource<T> mappedTableResource,
TransactDeleteItemEnhancedRequest request)
Adds a primary lookup key for the item to delete, and its associated table, to the transaction.
|
<T> TransactWriteItemsEnhancedRequest.Builder |
addPutItem(MappedTableResource<T> mappedTableResource,
PutItemEnhancedRequest<T> request)
Deprecated.
|
<T> TransactWriteItemsEnhancedRequest.Builder |
addPutItem(MappedTableResource<T> mappedTableResource,
T item)
Adds an item to be written, and it's associated table, to the transaction.
|
<T> TransactWriteItemsEnhancedRequest.Builder |
addPutItem(MappedTableResource<T> mappedTableResource,
TransactPutItemEnhancedRequest<T> request)
Adds an item to be written, and it's associated table, to the transaction.
|
<T> TransactWriteItemsEnhancedRequest.Builder |
addUpdateItem(MappedTableResource<T> mappedTableResource,
T item)
Adds an item to be updated, and it's associated table, to the transaction.
|
<T> TransactWriteItemsEnhancedRequest.Builder |
addUpdateItem(MappedTableResource<T> mappedTableResource,
TransactUpdateItemEnhancedRequest<T> request)
Adds an item to be updated, and it's associated table, to the transaction.
|
<T> TransactWriteItemsEnhancedRequest.Builder |
addUpdateItem(MappedTableResource<T> mappedTableResource,
UpdateItemEnhancedRequest<T> request)
|
TransactWriteItemsEnhancedRequest |
build()
Builds a
TransactWriteItemsEnhancedRequest from the values stored in this builder. |
TransactWriteItemsEnhancedRequest.Builder |
clientRequestToken(String clientRequestToken)
Sets the clientRequestToken in this builder.
|
public <T> TransactWriteItemsEnhancedRequest.Builder addConditionCheck(MappedTableResource<T> mappedTableResource, ConditionCheck<T> request)
Note: The condition check should be applied to an item that is not modified by another action in the
same transaction. See ConditionCheck
for more information on how to build a condition check, and the
DynamoDb TransactWriteItems documentation for more information on how a condition check affects the transaction.
T
- the type of modelled objects in the tablemappedTableResource
- the table on which to apply the condition checkrequest
- A ConditionCheck
definitionpublic <T> TransactWriteItemsEnhancedRequest.Builder addConditionCheck(MappedTableResource<T> mappedTableResource, Consumer<ConditionCheck.Builder> requestConsumer)
ConditionCheck.Builder
.
Note: The condition check should be applied to an item that is not modified by another action in the
same transaction. See ConditionCheck
for more information on how to build a condition check, and the
DynamoDb TransactWriteItems documentation for more information on how a condition check affects the transaction.
T
- the type of modelled objects in the tablemappedTableResource
- the table on which to apply the condition checkrequestConsumer
- a Consumer
of DeleteItemEnhancedRequest
@Deprecated public <T> TransactWriteItemsEnhancedRequest.Builder addDeleteItem(MappedTableResource<T> mappedTableResource, DeleteItemEnhancedRequest request)
DynamoDbTable.deleteItem(DeleteItemEnhancedRequest)
and how to construct the low-level request in
DeleteItemEnhancedRequest
.T
- the type of modelled objects in the tablemappedTableResource
- the table where the key is locatedrequest
- A DeleteItemEnhancedRequest
public <T> TransactWriteItemsEnhancedRequest.Builder addDeleteItem(MappedTableResource<T> mappedTableResource, TransactDeleteItemEnhancedRequest request)
DynamoDbTable.deleteItem(DeleteItemEnhancedRequest)
and how to construct the low-level request in
TransactDeleteItemEnhancedRequest
.T
- the type of modelled objects in the tablemappedTableResource
- the table where the key is locatedrequest
- A TransactDeleteItemEnhancedRequest
public <T> TransactWriteItemsEnhancedRequest.Builder addDeleteItem(MappedTableResource<T> mappedTableResource, Key key)
DynamoDbTable.deleteItem(DeleteItemEnhancedRequest)
.T
- the type of modelled objects in the tablemappedTableResource
- the table where the key is locatedkey
- a Key
that identifies the record to be deleted as part of the transaction.public <T> TransactWriteItemsEnhancedRequest.Builder addDeleteItem(MappedTableResource<T> mappedTableResource, T keyItem)
DynamoDbTable.deleteItem(DeleteItemEnhancedRequest)
.T
- the type of modelled objects in the tablemappedTableResource
- the table where the key is locatedkeyItem
- an item that will have its key fields used to match a record to retrieve from the database@Deprecated public <T> TransactWriteItemsEnhancedRequest.Builder addPutItem(MappedTableResource<T> mappedTableResource, PutItemEnhancedRequest<T> request)
addPutItem(MappedTableResource, TransactPutItemEnhancedRequest)
DynamoDbTable.putItem(PutItemEnhancedRequest)
and how to construct the low-level request in PutItemEnhancedRequest
.T
- the type of modelled objects in the tablemappedTableResource
- the table to write the item torequest
- A PutItemEnhancedRequest
public <T> TransactWriteItemsEnhancedRequest.Builder addPutItem(MappedTableResource<T> mappedTableResource, TransactPutItemEnhancedRequest<T> request)
DynamoDbTable.putItem(PutItemEnhancedRequest)
and how to construct the low-level request in TransactPutItemEnhancedRequest
.T
- the type of modelled objects in the tablemappedTableResource
- the table to write the item torequest
- A TransactPutItemEnhancedRequest
public <T> TransactWriteItemsEnhancedRequest.Builder addPutItem(MappedTableResource<T> mappedTableResource, T item)
DynamoDbTable.putItem(PutItemEnhancedRequest)
.T
- the type of modelled objects in the tablemappedTableResource
- the table to write the item toitem
- the item to be inserted or overwritten in the database@Deprecated public <T> TransactWriteItemsEnhancedRequest.Builder addUpdateItem(MappedTableResource<T> mappedTableResource, UpdateItemEnhancedRequest<T> request)
DynamoDbTable.updateItem(UpdateItemEnhancedRequest)
and how to construct the low-level request in
UpdateItemEnhancedRequest
.T
- the type of modelled objects in the tablemappedTableResource
- the table to write the item torequest
- A UpdateItemEnhancedRequest
public <T> TransactWriteItemsEnhancedRequest.Builder addUpdateItem(MappedTableResource<T> mappedTableResource, TransactUpdateItemEnhancedRequest<T> request)
DynamoDbTable.updateItem(UpdateItemEnhancedRequest)
and how to construct the low-level request in
TransactUpdateItemEnhancedRequest
.T
- the type of modelled objects in the tablemappedTableResource
- the table to write the item torequest
- A UpdateItemEnhancedRequest
public <T> TransactWriteItemsEnhancedRequest.Builder addUpdateItem(MappedTableResource<T> mappedTableResource, T item)
DynamoDbTable.updateItem(UpdateItemEnhancedRequest)
.T
- the type of modelled objects in the tablemappedTableResource
- the table to write the item toitem
- an item to update or insert into the database as part of this transactionpublic TransactWriteItemsEnhancedRequest.Builder clientRequestToken(String clientRequestToken)
clientRequestToken
- the clientRequestToken going to be used for buildpublic TransactWriteItemsEnhancedRequest build()
TransactWriteItemsEnhancedRequest
from the values stored in this builder.Copyright © 2022. All rights reserved.