T
- type of the DynamoDB entitypublic interface UpdateBuilder<T> extends DetachedUpdate<T>
Modifier and Type | Method and Description |
---|---|
UpdateBuilder<T> |
add(java.lang.String attributeName,
java.lang.Object delta)
Add a difference to particular attribute of the entity.
|
default UpdateBuilder<T> |
configure(groovy.lang.Closure<java.lang.Object> configurer)
Configures the native update request.
|
UpdateBuilder<T> |
configure(java.util.function.Consumer<com.amazonaws.services.dynamodbv2.model.UpdateItemRequest> configurer)
Configures the native update request.
|
UpdateBuilder<T> |
delete(java.lang.String attributeName)
Deletes the value of the particular attribute of the entity.
|
UpdateBuilder<T> |
hash(java.lang.Object key)
Sets the hash key value of the updated entity.
|
UpdateBuilder<T> |
put(java.lang.String attributeName,
java.lang.Object value)
Sets a particular attribute of the entity.
|
UpdateBuilder<T> |
range(java.lang.Object range)
Sets the range key value of the updated entity.
|
default UpdateBuilder<T> |
returnAllNew(groovy.lang.Closure<java.lang.Object> mapper)
Declares that the update operation will return all new values.
|
default UpdateBuilder<T> |
returnAllNew(java.util.function.Function<T,?> mapper)
Declares that the update operation will return all new values.
|
default UpdateBuilder<T> |
returnAllOld(groovy.lang.Closure<java.lang.Object> mapper)
Declares that the update operation will return all previous values.
|
default UpdateBuilder<T> |
returnAllOld(java.util.function.Function<T,?> mapper)
Declares that the update operation will return all previous values.
|
default UpdateBuilder<T> |
returnNone()
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<java.lang.Object> mapper)
Declares a return value of the update operation.
|
UpdateBuilder<T> |
returns(com.amazonaws.services.dynamodbv2.model.ReturnValue returnValue,
java.util.function.Function<T,?> mapper)
Declares a return value of the update operation.
|
default UpdateBuilder<T> |
returnUpdatedNew(groovy.lang.Closure<java.lang.Object> mapper)
Declares that the update operation will only return updated new values.
|
default UpdateBuilder<T> |
returnUpdatedNew(java.util.function.Function<T,?> mapper)
Declares that the update operation will only return updated new values.
|
default UpdateBuilder<T> |
returnUpdatedOld(groovy.lang.Closure<java.lang.Object> mapper)
Declares that the update operation will only return updated previous values.
|
default UpdateBuilder<T> |
returnUpdatedOld(java.util.function.Function<T,?> mapper)
Declares that the update operation will only return updated previous values.
|
resolveExpression, update
UpdateBuilder<T> hash(java.lang.Object key)
key
- the hash key of the query or an instance of the object with the hash key setUpdateBuilder<T> range(java.lang.Object range)
range
- the range key of the updated entityUpdateBuilder<T> add(java.lang.String attributeName, java.lang.Object delta)
attributeName
- name of the attributedelta
- the difference - usually a number or set of new items for set attributesUpdateBuilder<T> put(java.lang.String attributeName, java.lang.Object value)
attributeName
- name of the attributevalue
- new value to be setUpdateBuilder<T> delete(java.lang.String attributeName)
attributeName
- name of the attributeUpdateBuilder<T> returns(com.amazonaws.services.dynamodbv2.model.ReturnValue returnValue, java.util.function.Function<T,?> mapper)
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)default UpdateBuilder<T> returns(com.amazonaws.services.dynamodbv2.model.ReturnValue returnValue)
returnValue
- whether none, old or new, all or updated attributes should be returneddefault UpdateBuilder<T> returns(com.amazonaws.services.dynamodbv2.model.ReturnValue returnValue, @DelegatesTo(type="T",strategy=1) groovy.lang.Closure<java.lang.Object> mapper)
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)default UpdateBuilder<T> returnNone()
default UpdateBuilder<T> returnAllOld(java.util.function.Function<T,?> mapper)
mapper
- function to map the returned entity to another value (e.g. value of the particular attribute)default UpdateBuilder<T> returnAllOld(@DelegatesTo(type="T",strategy=1) groovy.lang.Closure<java.lang.Object> mapper)
mapper
- closure to map the returned entity to another value (e.g. value of the particular attribute)default UpdateBuilder<T> returnUpdatedOld(java.util.function.Function<T,?> mapper)
mapper
- function to map the returned entity to another value (e.g. value of the particular attribute)default UpdateBuilder<T> returnUpdatedOld(@DelegatesTo(type="T",strategy=1) groovy.lang.Closure<java.lang.Object> mapper)
mapper
- closure to map the returned entity to another value (e.g. value of the particular attribute)default UpdateBuilder<T> returnAllNew(java.util.function.Function<T,?> mapper)
mapper
- function to map the returned entity to another value (e.g. value of the particular attribute)default UpdateBuilder<T> returnAllNew(@DelegatesTo(type="T",strategy=1) groovy.lang.Closure<java.lang.Object> mapper)
mapper
- closure to map the returned entity to another value (e.g. value of the particular attribute)default UpdateBuilder<T> returnUpdatedNew(java.util.function.Function<T,?> mapper)
mapper
- function to map the returned entity to another value (e.g. value of the particular attribute)default UpdateBuilder<T> returnUpdatedNew(@DelegatesTo(type="T",strategy=1) groovy.lang.Closure<java.lang.Object> mapper)
mapper
- closure to map the returned entity to another value (e.g. value of the particular attribute)UpdateBuilder<T> configure(java.util.function.Consumer<com.amazonaws.services.dynamodbv2.model.UpdateItemRequest> configurer)
configurer
- consumer to configure the native update requestdefault UpdateBuilder<T> configure(@DelegatesTo(type="com.amazonaws.services.dynamodbv2.model.UpdateItemRequest",strategy=1) groovy.lang.Closure<java.lang.Object> configurer)
configurer
- closure to configure the native update request