Class AddAction
- java.lang.Object
-
- software.amazon.awssdk.enhanced.dynamodb.update.AddAction
-
- All Implemented Interfaces:
UpdateAction
,ToCopyableBuilder<AddAction.Builder,AddAction>
public final class AddAction extends Object implements UpdateAction, ToCopyableBuilder<AddAction.Builder,AddAction>
A representation of a singleUpdateExpression
ADD action.At a minimum, this action must contain a path string referencing the attribute that should be acted upon and a value string referencing the value to be added to the attribute. The value should be substituted with tokens using the ':value_token' syntax and values associated with the token must be explicitly added to the expressionValues map. Consult the DynamoDB UpdateExpression documentation for details on this action.
Optionally, attribute names can be substituted with tokens using the '#name_token' syntax. If tokens are used in the expression then the names associated with those tokens must be explicitly added to the expressionNames map that is also stored on this object.
Example:-
AddUpdateAction addAction = AddUpdateAction.builder() .path("#a") .value(":b") .putExpressionName("#a", "attributeA") .putExpressionValue(":b", myAttributeValue) .build();
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AddAction.Builder
A builder forAddAction
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AddAction.Builder
builder()
Constructs a new builder forAddAction
.boolean
equals(Object o)
Map<String,String>
expressionNames()
Map<String,AttributeValue>
expressionValues()
int
hashCode()
String
path()
AddAction.Builder
toBuilder()
String
value()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
builder
public static AddAction.Builder builder()
Constructs a new builder forAddAction
.- Returns:
- a new builder.
-
toBuilder
public AddAction.Builder toBuilder()
- Specified by:
toBuilder
in interfaceToCopyableBuilder<AddAction.Builder,AddAction>
-
path
public String path()
-
value
public String value()
-
expressionValues
public Map<String,AttributeValue> expressionValues()
-
-