Interface UpdateBuilder<T>
- Type Parameters:
T- type of the DynamoDB entity
- All Superinterfaces:
DetachedUpdate<T>
Builder for DynamoDB updates.
-
Method Summary
Modifier and TypeMethodDescriptionAdd a difference to particular attribute of the entity.default UpdateBuilder<T>Configures the native update request.Configures the native update request.Deletes the value of the particular attribute of the entity.Sets the hash key value of the updated entity.Sets a particular attribute of the entity.Sets the range key value of the updated entity.default UpdateBuilder<T>returnAllNew(groovy.lang.Closure<Object> mapper) Declares that the update operation will return all new values.default UpdateBuilder<T>returnAllNew(Function<T, ?> mapper) Declares that the update operation will return all new values.default UpdateBuilder<T>returnAllOld(groovy.lang.Closure<Object> mapper) Declares that the update operation will return all previous values.default UpdateBuilder<T>returnAllOld(Function<T, ?> mapper) Declares that the update operation will return all previous values.default UpdateBuilder<T>Declares that the update operation will not return any value.default UpdateBuilder<T>returns(com.amazonaws.services.dynamodbv2.model.ReturnValue returnValue) Declares a return value of the update operation.default UpdateBuilder<T>returns(com.amazonaws.services.dynamodbv2.model.ReturnValue returnValue, groovy.lang.Closure<Object> mapper) Declares a return value of the update operation.Declares a return value of the update operation.default UpdateBuilder<T>returnUpdatedNew(groovy.lang.Closure<Object> mapper) Declares that the update operation will only return updated new values.default UpdateBuilder<T>returnUpdatedNew(Function<T, ?> mapper) Declares that the update operation will only return updated new values.default UpdateBuilder<T>returnUpdatedOld(groovy.lang.Closure<Object> mapper) Declares that the update operation will only return updated previous values.default UpdateBuilder<T>returnUpdatedOld(Function<T, ?> mapper) Declares that the update operation will only return updated previous values.Methods inherited from interface com.agorapulse.micronaut.aws.dynamodb.builder.DetachedUpdate
resolveExpression, update
-
Method Details
-
hash
Sets the hash key value of the updated entity.- Parameters:
key- the hash key of the query or an instance of the object with the hash key set- Returns:
- self
-
range
Sets the range key value of the updated entity.- Parameters:
range- the range key of the updated entity- Returns:
- self
-
add
Add a difference to particular attribute of the entity.- Parameters:
attributeName- name of the attributedelta- the difference - usually a number or set of new items for set attributes- Returns:
- self
-
put
Sets a particular attribute of the entity.- Parameters:
attributeName- name of the attributevalue- new value to be set- Returns:
- self
-
delete
Deletes the value of the particular attribute of the entity.- Parameters:
attributeName- name of the attribute- Returns:
- self
-
returns
UpdateBuilder<T> returns(com.amazonaws.services.dynamodbv2.model.ReturnValue returnValue, Function<T, ?> mapper) Declares a return value of the update operation.- Parameters:
returnValue- whether none, old or new, all or updated attributes should be returnedmapper- function to map the returned entity to another value (e.g. value of the particular attribute)- Returns:
- self
-
returns
Declares a return value of the update operation.- Parameters:
returnValue- whether none, old or new, all or updated attributes should be returned- Returns:
- self
-
returns
default UpdateBuilder<T> returns(com.amazonaws.services.dynamodbv2.model.ReturnValue returnValue, @DelegatesTo(type="T",strategy=1) groovy.lang.Closure<Object> mapper) Declares a return value of the update operation.- Parameters:
returnValue- whether none (default), old or new, all or updated attributes should be returnedmapper- closure to map the returned entity to another value (e.g. value of the particular attribute)- Returns:
- self
-
returnNone
Declares that the update operation will not return any value.- Returns:
- self
-
returnAllOld
Declares that the update operation will return all previous values.- Parameters:
mapper- function to map the returned entity to another value (e.g. value of the particular attribute)- Returns:
- self
-
returnAllOld
default UpdateBuilder<T> returnAllOld(@DelegatesTo(type="T",strategy=1) groovy.lang.Closure<Object> mapper) Declares that the update operation will return all previous values.- Parameters:
mapper- closure to map the returned entity to another value (e.g. value of the particular attribute)- Returns:
- self
-
returnUpdatedOld
Declares that the update operation will only return updated previous values.- Parameters:
mapper- function to map the returned entity to another value (e.g. value of the particular attribute)- Returns:
- self
-
returnUpdatedOld
default UpdateBuilder<T> returnUpdatedOld(@DelegatesTo(type="T",strategy=1) groovy.lang.Closure<Object> mapper) Declares that the update operation will only return updated previous values.- Parameters:
mapper- closure to map the returned entity to another value (e.g. value of the particular attribute)- Returns:
- self
-
returnAllNew
Declares that the update operation will return all new values.- Parameters:
mapper- function to map the returned entity to another value (e.g. value of the particular attribute)- Returns:
- self
-
returnAllNew
default UpdateBuilder<T> returnAllNew(@DelegatesTo(type="T",strategy=1) groovy.lang.Closure<Object> mapper) Declares that the update operation will return all new values.- Parameters:
mapper- closure to map the returned entity to another value (e.g. value of the particular attribute)- Returns:
- self
-
returnUpdatedNew
Declares that the update operation will only return updated new values.- Parameters:
mapper- function to map the returned entity to another value (e.g. value of the particular attribute)- Returns:
- self
-
returnUpdatedNew
default UpdateBuilder<T> returnUpdatedNew(@DelegatesTo(type="T",strategy=1) groovy.lang.Closure<Object> mapper) Declares that the update operation will only return updated new values.- Parameters:
mapper- closure to map the returned entity to another value (e.g. value of the particular attribute)- Returns:
- self
-
configure
UpdateBuilder<T> configure(Consumer<com.amazonaws.services.dynamodbv2.model.UpdateItemRequest> configurer) Configures the native update request. This method is an extension point which allows to configure properties which are not provides by this builder.- Parameters:
configurer- consumer to configure the native update request- Returns:
- self
-
configure
default UpdateBuilder<T> configure(@DelegatesTo(type="com.amazonaws.services.dynamodbv2.model.UpdateItemRequest",strategy=1) groovy.lang.Closure<Object> configurer) Configures the native update request. This method is an extension point which allows to configure properties which are not provides by this builder.- Parameters:
configurer- closure to configure the native update request- Returns:
- self
-