Interface ReadBatch.Builder<T>
- Type Parameters:
T
- the type that items in this table map to
- Enclosing class:
ReadBatch
A builder that is used to create a request with the desired parameters.
A valid builder must define a MappedTableResource
and add at least one
GetItemEnhancedRequest
.
-
Method Summary
Modifier and TypeMethodDescriptionaddGetItem
(Consumer<GetItemEnhancedRequest.Builder> requestConsumer) Adds aGetItemEnhancedRequest
with a primaryKey
to the builder by accepting a consumer ofGetItemEnhancedRequest.Builder
.addGetItem
(Key key) Adds a GetItem request with a primaryKey
to the builder.addGetItem
(GetItemEnhancedRequest request) Adds aGetItemEnhancedRequest
with a primaryKey
to the builder.addGetItem
(T keyItem) Adds a GetItem request to the builder.build()
mappedTableResource
(MappedTableResource<T> mappedTableResource) Sets the mapped table resource (table) that the items in this read batch should come from.
-
Method Details
-
mappedTableResource
Sets the mapped table resource (table) that the items in this read batch should come from.- Parameters:
mappedTableResource
- the table reference- Returns:
- a builder of this type
-
addGetItem
Adds aGetItemEnhancedRequest
with a primaryKey
to the builder.- Parameters:
request
- AGetItemEnhancedRequest
- Returns:
- a builder of this type
-
addGetItem
Adds aGetItemEnhancedRequest
with a primaryKey
to the builder by accepting a consumer ofGetItemEnhancedRequest.Builder
.- Parameters:
requestConsumer
- aConsumer
ofGetItemEnhancedRequest
- Returns:
- a builder of this type
-
addGetItem
Adds a GetItem request with a primaryKey
to the builder.- Parameters:
key
- AKey
to match the record retrieved from the database.- Returns:
- a builder of this type
-
addGetItem
Adds a GetItem request to the builder.- Parameters:
keyItem
- an item that will have its key fields used to match a record to retrieve from the database.- Returns:
- a builder of this type
-
build
ReadBatch build()
-