ItemT - The modelled object that this table maps records to.RequestT - The type of the request object for the DynamoDb call in the low level DynamoDbClient.ResponseT - The type of the response object for the DynamoDb call in the low level DynamoDbClient.ResultT - The type of the mapped result object that will be returned by the execution of this operation.public interface TableOperation<ItemT,RequestT,ResponseT,ResultT>
MappedTable:
mappedDatabase.table(tableSchema).execute(tableOperation); // For primary index
mappedDatabase.table(tableSchema).index("an_index_name").execute(tableOperation); // For secondary index
| Modifier and Type | Method and Description |
|---|---|
default ResultT |
execute(TableSchema<ItemT> tableSchema,
OperationContext context,
MapperExtension mapperExtension,
DynamoDbClient dynamoDbClient)
Default implementation of a complete execution of this operation.
|
RequestT |
generateRequest(TableSchema<ItemT> tableSchema,
OperationContext context,
MapperExtension mapperExtension)
This method generates the request that needs to be sent to a low level
DynamoDbClient. |
Function<RequestT,ResponseT> |
getServiceCall(DynamoDbClient dynamoDbClient)
Provides a function for making the low level SDK call to DynamoDb.
|
ResultT |
transformResponse(ResponseT response,
TableSchema<ItemT> 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.
|
RequestT generateRequest(TableSchema<ItemT> tableSchema, OperationContext context, MapperExtension mapperExtension)
DynamoDbClient.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.Function<RequestT,ResponseT> getServiceCall(DynamoDbClient dynamoDbClient)
dynamoDbClient - A low level DynamoDbClient to make the call against.ResultT transformResponse(ResponseT response, TableSchema<ItemT> tableSchema, OperationContext context, MapperExtension mapperExtension)
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.default ResultT execute(TableSchema<ItemT> tableSchema, OperationContext context, MapperExtension mapperExtension, DynamoDbClient dynamoDbClient)
tableSchema - A TableSchema that maps the table to a modelled object.context - An object containing the context, or target, of the command execution.dynamoDbClient - A DynamoDbClient to make the call against.mapperExtension - A MapperExtension that may modify the request or result of this operation. A
null value here will result in no modifications.Copyright © 2019. All rights reserved.