Enum IgnoreNullsMode
- All Implemented Interfaces:
Serializable,Comparable<IgnoreNullsMode>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionDoes not ignore any null values.Ignores null-valued top-level properties and replaces or adds entire beans and maps as whole values.Ignores all null-valued properties and updates only the non-null scalar attributes at any nesting level. -
Method Summary
Modifier and TypeMethodDescriptionstatic IgnoreNullsModeReturns the enum constant of this type with the specified name.static IgnoreNullsMode[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
SCALAR_ONLY
Ignores all null-valued properties and updates only the non-null scalar attributes at any nesting level. The SDK constructs update expressions that target individual nested attributes, allowing partial updates of nested beans or maps without overwriting sibling attributes.The target bean or map must already exist in DynamoDB. If it does not, DynamoDB returns a validation exception because the document path does not exist. Use
MAPS_ONLYfirst to create the nested structure, then useSCALAR_ONLYfor subsequent partial updates. -
MAPS_ONLY
Ignores null-valued top-level properties and replaces or adds entire beans and maps as whole values. Null-valued scalar attributes within a provided bean or map are retained (saved as null in DynamoDB).Use this mode to add a new nested bean or map that does not yet exist in DynamoDB, or to fully replace an existing one. This is equivalent to the deprecated
ignoreNulls(true). -
DEFAULT
Does not ignore any null values. Null-valued attributes in the Java object generate REMOVE actions in the update expression, deleting those attributes from the item in DynamoDB.This is the default mode and is equivalent to the deprecated
ignoreNulls(false). When using this mode, you should typically retrieve the item first to avoid unintentionally removing attributes.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-