T
- the type that items in this table map to@NotThreadSafe public static interface WriteBatch.Builder<T>
A valid builder must define a MappedTableResource
and add at least one
DeleteItemEnhancedRequest
or PutItemEnhancedRequest
.
Modifier and Type | Method and Description |
---|---|
WriteBatch.Builder<T> |
addDeleteItem(Consumer<DeleteItemEnhancedRequest.Builder> requestConsumer)
Adds a
DeleteItemEnhancedRequest to the builder, this request should contain
the primary Key to an item to be deleted. |
WriteBatch.Builder<T> |
addDeleteItem(DeleteItemEnhancedRequest request)
Adds a
DeleteItemEnhancedRequest to the builder, this request should contain
the primary Key to an item to be deleted. |
WriteBatch.Builder<T> |
addDeleteItem(Key key)
Adds a DeleteItem request to the builder.
|
WriteBatch.Builder<T> |
addDeleteItem(T keyItem)
Adds a DeleteItem request to the builder.
|
WriteBatch.Builder<T> |
addPutItem(Consumer<PutItemEnhancedRequest.Builder<T>> requestConsumer)
Adds a
PutItemEnhancedRequest to the builder, this request should contain the item
to be written. |
WriteBatch.Builder<T> |
addPutItem(PutItemEnhancedRequest<T> request)
Adds a
PutItemEnhancedRequest to the builder, this request should contain the item
to be written. |
WriteBatch.Builder<T> |
addPutItem(T item)
Adds a PutItem request to the builder.
|
WriteBatch |
build() |
WriteBatch.Builder<T> |
mappedTableResource(MappedTableResource<T> mappedTableResource)
Sets the mapped table resource (table) that the items in this write batch should come from.
|
WriteBatch.Builder<T> mappedTableResource(MappedTableResource<T> mappedTableResource)
mappedTableResource
- the table referenceWriteBatch.Builder<T> addDeleteItem(DeleteItemEnhancedRequest request)
DeleteItemEnhancedRequest
to the builder, this request should contain
the primary Key
to an item to be deleted.request
- A DeleteItemEnhancedRequest
WriteBatch.Builder<T> addDeleteItem(Consumer<DeleteItemEnhancedRequest.Builder> requestConsumer)
DeleteItemEnhancedRequest
to the builder, this request should contain
the primary Key
to an item to be deleted.requestConsumer
- a Consumer
of DeleteItemEnhancedRequest
WriteBatch.Builder<T> addDeleteItem(Key key)
key
- a Key
to match the item to be deleted from the database.WriteBatch.Builder<T> addDeleteItem(T keyItem)
keyItem
- an item that will have its key fields used to match a record to delete from the database.WriteBatch.Builder<T> addPutItem(PutItemEnhancedRequest<T> request)
PutItemEnhancedRequest
to the builder, this request should contain the item
to be written.request
- A PutItemEnhancedRequest
WriteBatch.Builder<T> addPutItem(Consumer<PutItemEnhancedRequest.Builder<T>> requestConsumer)
PutItemEnhancedRequest
to the builder, this request should contain the item
to be written.requestConsumer
- a Consumer
of PutItemEnhancedRequest
WriteBatch.Builder<T> addPutItem(T item)
item
- the item to insert or overwrite in the database.WriteBatch build()
Copyright © 2023. All rights reserved.