Enum DynamoDbAutoGenerateStrategy

java.lang.Object
java.lang.Enum<DynamoDbAutoGenerateStrategy>
software.amazon.awssdk.enhanced.dynamodb.extensions.annotations.DynamoDbAutoGenerateStrategy
All Implemented Interfaces:
Serializable, Comparable<DynamoDbAutoGenerateStrategy>

@SdkPublicApi public enum DynamoDbAutoGenerateStrategy extends Enum<DynamoDbAutoGenerateStrategy>
Strategy used to decide when a new value is generated for an annotated attribute.
  • Enum Constant Details

    • ALWAYS

      public static final DynamoDbAutoGenerateStrategy ALWAYS
      Generate a new value on every write operation.
    • CREATE

      public static final DynamoDbAutoGenerateStrategy CREATE
      Generate a value only when the current value is missing. For values present in the write item map, DynamoDB NULL is missing and an empty string is present. For a non-primary-key value omitted from an update item map, DynamoDB evaluates stored attribute existence using if_not_exists; a stored DynamoDB NULL therefore counts as present.
  • Method Details

    • values

      public static DynamoDbAutoGenerateStrategy[] 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

      public static DynamoDbAutoGenerateStrategy valueOf(String name)
      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 name
      NullPointerException - if the argument is null