Class AttributeDefinition

java.lang.Object
com.amazonaws.services.dynamodbv2.model.AttributeDefinition
All Implemented Interfaces:
Serializable, Cloneable

public class AttributeDefinition extends Object implements Serializable, Cloneable

Represents an attribute for describing the key schema for the table and indexes.

See Also:
  • Constructor Details

    • AttributeDefinition

      public AttributeDefinition()
      Default constructor for AttributeDefinition object. Callers should use the setter or fluent setter (with...) methods to initialize the object after creating it.
    • AttributeDefinition

      public AttributeDefinition(String attributeName, String attributeType)
      Constructs a new AttributeDefinition object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.
      Parameters:
      attributeName - A name for the attribute.
      attributeType - The data type for the attribute, where:

      • S - the attribute is of type String

      • N - the attribute is of type Number

      • B - the attribute is of type Binary

    • AttributeDefinition

      public AttributeDefinition(String attributeName, ScalarAttributeType attributeType)
      Constructs a new AttributeDefinition object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.
      Parameters:
      attributeName - A name for the attribute.
      attributeType - The data type for the attribute, where:

      • S - the attribute is of type String

      • N - the attribute is of type Number

      • B - the attribute is of type Binary

  • Method Details

    • setAttributeName

      public void setAttributeName(String attributeName)

      A name for the attribute.

      Parameters:
      attributeName - A name for the attribute.
    • getAttributeName

      public String getAttributeName()

      A name for the attribute.

      Returns:
      A name for the attribute.
    • withAttributeName

      public AttributeDefinition withAttributeName(String attributeName)

      A name for the attribute.

      Parameters:
      attributeName - A name for the attribute.
      Returns:
      Returns a reference to this object so that method calls can be chained together.
    • setAttributeType

      public void setAttributeType(String attributeType)

      The data type for the attribute, where:

      • S - the attribute is of type String

      • N - the attribute is of type Number

      • B - the attribute is of type Binary

      Parameters:
      attributeType - The data type for the attribute, where:

      • S - the attribute is of type String

      • N - the attribute is of type Number

      • B - the attribute is of type Binary

      See Also:
    • getAttributeType

      public String getAttributeType()

      The data type for the attribute, where:

      • S - the attribute is of type String

      • N - the attribute is of type Number

      • B - the attribute is of type Binary

      Returns:
      The data type for the attribute, where:

      • S - the attribute is of type String

      • N - the attribute is of type Number

      • B - the attribute is of type Binary

      See Also:
    • withAttributeType

      public AttributeDefinition withAttributeType(String attributeType)

      The data type for the attribute, where:

      • S - the attribute is of type String

      • N - the attribute is of type Number

      • B - the attribute is of type Binary

      Parameters:
      attributeType - The data type for the attribute, where:

      • S - the attribute is of type String

      • N - the attribute is of type Number

      • B - the attribute is of type Binary

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • setAttributeType

      public void setAttributeType(ScalarAttributeType attributeType)

      The data type for the attribute, where:

      • S - the attribute is of type String

      • N - the attribute is of type Number

      • B - the attribute is of type Binary

      Parameters:
      attributeType - The data type for the attribute, where:

      • S - the attribute is of type String

      • N - the attribute is of type Number

      • B - the attribute is of type Binary

      See Also:
    • withAttributeType

      public AttributeDefinition withAttributeType(ScalarAttributeType attributeType)

      The data type for the attribute, where:

      • S - the attribute is of type String

      • N - the attribute is of type Number

      • B - the attribute is of type Binary

      Parameters:
      attributeType - The data type for the attribute, where:

      • S - the attribute is of type String

      • N - the attribute is of type Number

      • B - the attribute is of type Binary

      Returns:
      Returns a reference to this object so that method calls can be chained together.
      See Also:
    • toString

      public String toString()
      Returns a string representation of this object; useful for testing and debugging.
      Overrides:
      toString in class Object
      Returns:
      A string representation of this object.
      See Also:
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • clone

      public AttributeDefinition clone()
      Overrides:
      clone in class Object