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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AttributeDefinition()Default constructor for AttributeDefinition object.AttributeDefinition(String attributeName, ScalarAttributeType attributeType)Constructs a new AttributeDefinition object.AttributeDefinition(String attributeName, String attributeType)Constructs a new AttributeDefinition object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AttributeDefinitionclone()booleanequals(Object obj)StringgetAttributeName()A name for the attribute.StringgetAttributeType()The data type for the attribute, where:inthashCode()voidsetAttributeName(String attributeName)A name for the attribute.voidsetAttributeType(ScalarAttributeType attributeType)The data type for the attribute, where:voidsetAttributeType(String attributeType)The data type for the attribute, where:StringtoString()Returns a string representation of this object; useful for testing and debugging.AttributeDefinitionwithAttributeName(String attributeName)A name for the attribute.AttributeDefinitionwithAttributeType(ScalarAttributeType attributeType)The data type for the attribute, where:AttributeDefinitionwithAttributeType(String attributeType)The data type for the attribute, where:
-
-
-
Constructor Detail
-
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 Detail
-
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:
ScalarAttributeType
-
-
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:
ScalarAttributeType
-
-
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:
ScalarAttributeType
-
-
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:
ScalarAttributeType
-
-
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:
ScalarAttributeType
-
-
toString
public String toString()
Returns a string representation of this object; useful for testing and debugging.- Overrides:
toStringin classObject- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
clone
public AttributeDefinition clone()
-
-