Class Key.Builder

java.lang.Object
software.amazon.awssdk.enhanced.dynamodb.Key.Builder
Enclosing class:
Key

@NotThreadSafe public static final class Key.Builder extends Object
Builder for Key
  • Method Details

    • partitionValue

      public Key.Builder partitionValue(AttributeValue partitionValue)
      Value to be used for the partition key
      Parameters:
      partitionValue - partition key value
    • partitionValue

      public Key.Builder partitionValue(String partitionValue)
      String value to be used for the partition key. The string will be converted into an AttributeValue of type S.
      Parameters:
      partitionValue - partition key value
    • partitionValue

      public Key.Builder partitionValue(Number partitionValue)
      Numeric value to be used for the partition key. The number will be converted into an AttributeValue of type N.
      Parameters:
      partitionValue - partition key value
    • partitionValue

      public Key.Builder partitionValue(SdkBytes partitionValue)
      Binary value to be used for the partition key. The input will be converted into an AttributeValue of type B.
      Parameters:
      partitionValue - the bytes to be used for the binary key value.
    • sortValue

      public Key.Builder sortValue(AttributeValue sortValue)
      Value to be used for the sort key
      Parameters:
      sortValue - sort key value
    • sortValue

      public Key.Builder sortValue(String sortValue)
      String value to be used for the sort key. The string will be converted into an AttributeValue of type S.
      Parameters:
      sortValue - sort key value
    • sortValue

      public Key.Builder sortValue(Number sortValue)
      Numeric value to be used for the sort key. The number will be converted into an AttributeValue of type N.
      Parameters:
      sortValue - sort key value
    • sortValue

      public Key.Builder sortValue(SdkBytes sortValue)
      Binary value to be used for the sort key. The input will be converted into an AttributeValue of type B.
      Parameters:
      sortValue - the bytes to be used for the binary key value.
    • build

      public Key build()
      Construct a Key from this builder.