Interface ReadBatch.Builder<T>
-
- Type Parameters:
T- the type that items in this table map to
- Enclosing class:
- ReadBatch
@NotThreadSafe public static interface ReadBatch.Builder<T>
A builder that is used to create a request with the desired parameters.A valid builder must define a
MappedTableResourceand add at least oneGetItemEnhancedRequest.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ReadBatch.Builder<T>addGetItem(Consumer<GetItemEnhancedRequest.Builder> requestConsumer)Adds aGetItemEnhancedRequestwith a primaryKeyto the builder by accepting a consumer ofGetItemEnhancedRequest.Builder.ReadBatch.Builder<T>addGetItem(Key key)Adds a GetItem request with a primaryKeyto the builder.ReadBatch.Builder<T>addGetItem(GetItemEnhancedRequest request)Adds aGetItemEnhancedRequestwith a primaryKeyto the builder.ReadBatch.Builder<T>addGetItem(T keyItem)Adds a GetItem request to the builder.ReadBatchbuild()ReadBatch.Builder<T>mappedTableResource(MappedTableResource<T> mappedTableResource)Sets the mapped table resource (table) that the items in this read batch should come from.
-
-
-
Method Detail
-
mappedTableResource
ReadBatch.Builder<T> mappedTableResource(MappedTableResource<T> 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
ReadBatch.Builder<T> addGetItem(GetItemEnhancedRequest request)
Adds aGetItemEnhancedRequestwith a primaryKeyto the builder.- Parameters:
request- AGetItemEnhancedRequest- Returns:
- a builder of this type
-
addGetItem
ReadBatch.Builder<T> addGetItem(Consumer<GetItemEnhancedRequest.Builder> requestConsumer)
Adds aGetItemEnhancedRequestwith a primaryKeyto the builder by accepting a consumer ofGetItemEnhancedRequest.Builder.- Parameters:
requestConsumer- aConsumerofGetItemEnhancedRequest- Returns:
- a builder of this type
-
addGetItem
ReadBatch.Builder<T> addGetItem(Key key)
Adds a GetItem request with a primaryKeyto the builder.- Parameters:
key- AKeyto match the record retrieved from the database.- Returns:
- a builder of this type
-
addGetItem
ReadBatch.Builder<T> addGetItem(T keyItem)
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()
-
-