public enum UpdateBehavior extends Enum<UpdateBehavior>
If an update behavior is not specified for an attribute, the default behavior of WRITE_ALWAYS
will be
applied.
Enum Constant and Description |
---|
WRITE_ALWAYS
Always overwrite with the new value if one is provided, or remove any existing value if a null value is
provided and 'ignoreNulls' is set to false.
|
WRITE_IF_NOT_EXISTS
Write the new value if there is no existing value in the persisted record or a new record is being written,
otherwise leave the existing value.
|
Modifier and Type | Method and Description |
---|---|
static UpdateBehavior |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static UpdateBehavior[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final UpdateBehavior WRITE_ALWAYS
This is the default behavior applied to all attributes unless otherwise specified.
public static final UpdateBehavior WRITE_IF_NOT_EXISTS
IMPORTANT: If a null value is provided and 'ignoreNulls' is set to false, the attribute will always be removed from the persisted record as DynamoDb does not support conditional removal with this method.
public static UpdateBehavior[] values()
for (UpdateBehavior c : UpdateBehavior.values()) System.out.println(c);
public static UpdateBehavior valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullCopyright © 2021. All rights reserved.