Class AsyncPutBuilder<T>
java.lang.Object
dev.hogwai.dynamodb.simplified.builder.base.AbstractPutBuilder<T, AsyncPutBuilder<T>>
dev.hogwai.dynamodb.simplified.async.AsyncPutBuilder<T>
- Type Parameters:
T- the type of the item
Async fluent builder for putting (inserting or replacing) an item in a DynamoDB table,
with an optional condition expression. Part of the DynamoDB Simplified library.
-
Field Summary
Fields inherited from class AbstractPutBuilder
conditionExpression, item, LOG, optimisticLocking, returnValues -
Method Summary
Modifier and TypeMethodDescription@NonNull CompletableFuture<Void> execute()Executes the put operation.@NonNull CompletableFuture<Optional<T>> Executes the put operation and returns the previous item ifAbstractPutBuilder.returnValues(ReturnValue)was set toALL_OLD.protected @NonNull AsyncPutBuilder<T> self()Returnsthistyped asSfor fluent chaining.protected @NonNull StringReturns the DynamoDB table name.Methods inherited from class AbstractPutBuilder
applyOptimisticLocking, buildEnhancedRequest, buildLowLevelRequest, condition, condition, incrementVersion, onlyIfNotExists, returnValues, withOptimisticLocking
-
Method Details
-
self
Description copied from class:AbstractPutBuilderReturnsthistyped asSfor fluent chaining.- Specified by:
selfin classAbstractPutBuilder<T, AsyncPutBuilder<T>>- Returns:
- this builder
-
execute
Executes the put operation.- Returns:
- a
CompletableFuturethat completes when the item has been put
-
executeReturning
Executes the put operation and returns the previous item ifAbstractPutBuilder.returnValues(ReturnValue)was set toALL_OLD.- Returns:
- a CompletableFuture containing the previous item, or empty
-
tableName
Description copied from class:AbstractPutBuilderReturns the DynamoDB table name.- Specified by:
tableNamein classAbstractPutBuilder<T, AsyncPutBuilder<T>>- Returns:
- the DynamoDB table name
-