public class PutItem<T> extends Object implements BatchableWriteOperation<T>, TransactableWriteOperation<T>, TableOperation<T,PutItemRequest,PutItemResponse,Void>
Modifier and Type | Class and Description |
---|---|
static class |
PutItem.Builder<T> |
Modifier and Type | Method and Description |
---|---|
Function<PutItemRequest,CompletableFuture<PutItemResponse>> |
asyncServiceCall(DynamoDbAsyncClient dynamoDbAsyncClient)
Provides a function for making the low level non-blocking asynchronous SDK call to DynamoDb.
|
static <T> PutItem.Builder<T> |
builder(Class<? extends T> itemClass) |
Expression |
conditionExpression() |
static <T> PutItem<T> |
create(T item) |
boolean |
equals(Object o) |
PutItemRequest |
generateRequest(TableSchema<T> tableSchema,
OperationContext operationContext,
MapperExtension mapperExtension)
This method generates the request that needs to be sent to a low level
DynamoDbClient . |
TransactWriteItem |
generateTransactWriteItem(TableSchema<T> tableSchema,
OperationContext operationContext,
MapperExtension mapperExtension) |
WriteRequest |
generateWriteRequest(TableSchema<T> tableSchema,
OperationContext operationContext,
MapperExtension mapperExtension) |
int |
hashCode() |
T |
item() |
Function<PutItemRequest,PutItemResponse> |
serviceCall(DynamoDbClient dynamoDbClient)
Provides a function for making the low level synchronous SDK call to DynamoDb.
|
PutItem.Builder<T> |
toBuilder() |
Void |
transformResponse(PutItemResponse response,
TableSchema<T> tableSchema,
OperationContext operationContext,
MapperExtension mapperExtension)
Takes the response object returned by the actual DynamoDb call and maps it into a higher level abstracted
result object.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
executeOnPrimaryIndex, executeOnPrimaryIndexAsync
execute, executeAsync
public static <T> PutItem<T> create(T item)
public static <T> PutItem.Builder<T> builder(Class<? extends T> itemClass)
public PutItem.Builder<T> toBuilder()
public PutItemRequest generateRequest(TableSchema<T> tableSchema, OperationContext operationContext, MapperExtension mapperExtension)
CommonOperation
DynamoDbClient
.generateRequest
in interface CommonOperation<T,PutItemRequest,PutItemResponse,Void>
tableSchema
- A TableSchema
that maps the table to a modelled object.operationContext
- 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 Void transformResponse(PutItemResponse response, TableSchema<T> tableSchema, OperationContext operationContext, MapperExtension mapperExtension)
CommonOperation
transformResponse
in interface CommonOperation<T,PutItemRequest,PutItemResponse,Void>
response
- The response object returned by the DynamoDb call for this operation.tableSchema
- A TableSchema
that maps the table to a modelled object.operationContext
- 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<PutItemRequest,PutItemResponse> serviceCall(DynamoDbClient dynamoDbClient)
CommonOperation
serviceCall
in interface CommonOperation<T,PutItemRequest,PutItemResponse,Void>
dynamoDbClient
- A low level DynamoDbClient
to make the call against.public Function<PutItemRequest,CompletableFuture<PutItemResponse>> asyncServiceCall(DynamoDbAsyncClient dynamoDbAsyncClient)
CommonOperation
asyncServiceCall
in interface CommonOperation<T,PutItemRequest,PutItemResponse,Void>
dynamoDbAsyncClient
- A low level DynamoDbAsyncClient
to make the call against.public WriteRequest generateWriteRequest(TableSchema<T> tableSchema, OperationContext operationContext, MapperExtension mapperExtension)
generateWriteRequest
in interface BatchableWriteOperation<T>
public TransactWriteItem generateTransactWriteItem(TableSchema<T> tableSchema, OperationContext operationContext, MapperExtension mapperExtension)
generateTransactWriteItem
in interface TransactableWriteOperation<T>
public T item()
public Expression conditionExpression()
Copyright © 2020. All rights reserved.