public final class UpdateExpression extends Object
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.Modifier and Type | Class and Description |
---|---|
static class |
UpdateExpression.Builder
A builder for
UpdateExpression |
Modifier and Type | Method and Description |
---|---|
List<AddAction> |
addActions() |
static UpdateExpression.Builder |
builder()
Constructs a new builder for
UpdateExpression . |
List<DeleteAction> |
deleteActions() |
boolean |
equals(Object o) |
int |
hashCode() |
static UpdateExpression |
mergeExpressions(UpdateExpression expression1,
UpdateExpression expression2)
Merges two UpdateExpression, returning a new
|
List<RemoveAction> |
removeActions() |
List<SetAction> |
setActions() |
public static UpdateExpression.Builder builder()
UpdateExpression
.public List<RemoveAction> removeActions()
public List<DeleteAction> deleteActions()
public static UpdateExpression mergeExpressions(UpdateExpression expression1, UpdateExpression expression2)
Copyright © 2023. All rights reserved.