Class UpdateExpression
java.lang.Object
software.amazon.awssdk.enhanced.dynamodb.update.UpdateExpression
Contains sets of
UpdateAction
that represent the four DynamoDB update actions: SET, ADD, REMOVE and DELETE.
Use this class to build an immutable UpdateExpression with one or more UpdateAction. An UpdateExpression may be merged with another. When two UpdateExpression are merged, the actions of each group of UpdateAction, should they exist, are combined; all SET actions from each expression are concatenated, all REMOVE actions etc.
DynamoDb Enhanced will convert the UpdateExpression to a format readable by DynamoDb,
Example:-
RemoveUpdateAction removeAction = ...
SetUpdateAction setAction = ...
UpdateExpression.builder()
.addAction(removeAction)
.addAction(setAction)
.build();
See respective subtype of UpdateAction
, for example SetAction
, for details on creating that action.-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic UpdateExpression.Builder
builder()
Constructs a new builder forUpdateExpression
.boolean
int
hashCode()
static UpdateExpression
mergeExpressions
(UpdateExpression expression1, UpdateExpression expression2) Merges two UpdateExpression, returning a new
-
Method Details
-
builder
Constructs a new builder forUpdateExpression
.- Returns:
- a new builder.
-
removeActions
-
setActions
-
deleteActions
-
addActions
-
mergeExpressions
public static UpdateExpression mergeExpressions(UpdateExpression expression1, UpdateExpression expression2) Merges two UpdateExpression, returning a new -
equals
-
hashCode
public int hashCode()
-