public class GetItemOperation<T> extends Object implements TableOperation<T,GetItemRequest,GetItemResponse,T>, BatchableReadOperation, TransactableReadOperation<T>
| Modifier and Type | Method and Description |
|---|---|
Function<GetItemRequest,CompletableFuture<GetItemResponse>> |
asyncServiceCall(DynamoDbAsyncClient dynamoDbAsyncClient)
Provides a function for making the low level non-blocking asynchronous SDK call to DynamoDb.
|
Boolean |
consistentRead() |
static <T> GetItemOperation<T> |
create(GetItemEnhancedRequest request) |
GetItemRequest |
generateRequest(TableSchema<T> tableSchema,
OperationContext context,
MapperExtension mapperExtension)
This method generates the request that needs to be sent to a low level
DynamoDbClient. |
TransactGetItem |
generateTransactGetItem(TableSchema<T> tableSchema,
OperationContext operationContext,
MapperExtension mapperExtension) |
Key |
key() |
Function<GetItemRequest,GetItemResponse> |
serviceCall(DynamoDbClient dynamoDbClient)
Provides a function for making the low level synchronous SDK call to DynamoDb.
|
T |
transformResponse(GetItemResponse response,
TableSchema<T> tableSchema,
OperationContext context,
MapperExtension mapperExtension)
Takes the response object returned by the actual DynamoDb call and maps it into a higher level abstracted
result object.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexecuteOnPrimaryIndex, executeOnPrimaryIndexAsyncexecute, executeAsyncpublic static <T> GetItemOperation<T> create(GetItemEnhancedRequest request)
public Boolean consistentRead()
consistentRead in interface BatchableReadOperationpublic Key key()
key in interface BatchableReadOperationpublic GetItemRequest generateRequest(TableSchema<T> tableSchema, OperationContext context, MapperExtension mapperExtension)
CommonOperationDynamoDbClient.generateRequest in interface CommonOperation<T,GetItemRequest,GetItemResponse,T>tableSchema - A TableSchema that maps the table to a modelled object.context - An object containing the context, or target, of the command execution.mapperExtension - A MapperExtension that may modify the request of this operation. A null value
here will result in no modifications.DynamoDbClient call to perform the operation.public T transformResponse(GetItemResponse response, TableSchema<T> tableSchema, OperationContext context, MapperExtension mapperExtension)
CommonOperationtransformResponse in interface CommonOperation<T,GetItemRequest,GetItemResponse,T>response - The response object returned by the DynamoDb call for this operation.tableSchema - A TableSchema that maps the table to a modelled object.context - An object containing the context, or target, of the command execution.mapperExtension - A MapperExtension that may modify the result of this operation. A null value
here will result in no modifications.public Function<GetItemRequest,GetItemResponse> serviceCall(DynamoDbClient dynamoDbClient)
CommonOperationserviceCall in interface CommonOperation<T,GetItemRequest,GetItemResponse,T>dynamoDbClient - A low level DynamoDbClient to make the call against.public Function<GetItemRequest,CompletableFuture<GetItemResponse>> asyncServiceCall(DynamoDbAsyncClient dynamoDbAsyncClient)
CommonOperationasyncServiceCall in interface CommonOperation<T,GetItemRequest,GetItemResponse,T>dynamoDbAsyncClient - A low level DynamoDbAsyncClient to make the call against.public TransactGetItem generateTransactGetItem(TableSchema<T> tableSchema, OperationContext operationContext, MapperExtension mapperExtension)
generateTransactGetItem in interface TransactableReadOperation<T>Copyright © 2020. All rights reserved.