com.amazonaws.services.dynamodbv2.model
Class AttributeDefinition

java.lang.Object
  extended by com.amazonaws.services.dynamodbv2.model.AttributeDefinition
All Implemented Interfaces:
java.io.Serializable

public class AttributeDefinition
extends java.lang.Object
implements java.io.Serializable

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

See Also:
Serialized Form

Constructor Summary
AttributeDefinition()
          Default constructor for a new AttributeDefinition object.
AttributeDefinition(java.lang.String attributeName, ScalarAttributeType attributeType)
          Constructs a new AttributeDefinition object.
AttributeDefinition(java.lang.String attributeName, java.lang.String attributeType)
          Constructs a new AttributeDefinition object.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getAttributeName()
          A name for the attribute.
 java.lang.String getAttributeType()
          The data type for the attribute.
 int hashCode()
           
 void setAttributeName(java.lang.String attributeName)
          A name for the attribute.
 void setAttributeType(ScalarAttributeType attributeType)
          The data type for the attribute.
 void setAttributeType(java.lang.String attributeType)
          The data type for the attribute.
 java.lang.String toString()
          Returns a string representation of this object; useful for testing and debugging.
 AttributeDefinition withAttributeName(java.lang.String attributeName)
          A name for the attribute.
 AttributeDefinition withAttributeType(ScalarAttributeType attributeType)
          The data type for the attribute.
 AttributeDefinition withAttributeType(java.lang.String attributeType)
          The data type for the attribute.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AttributeDefinition

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


AttributeDefinition

public AttributeDefinition(java.lang.String attributeName,
                           java.lang.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.

AttributeDefinition

public AttributeDefinition(java.lang.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.
Method Detail

getAttributeName

public java.lang.String getAttributeName()
A name for the attribute.

Constraints:
Length: 1 - 255

Returns:
A name for the attribute.

setAttributeName

public void setAttributeName(java.lang.String attributeName)
A name for the attribute.

Constraints:
Length: 1 - 255

Parameters:
attributeName - A name for the attribute.

withAttributeName

public AttributeDefinition withAttributeName(java.lang.String attributeName)
A name for the attribute.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 1 - 255

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

getAttributeType

public java.lang.String getAttributeType()
The data type for the attribute.

Constraints:
Allowed Values: S, N, B

Returns:
The data type for the attribute.
See Also:
ScalarAttributeType

setAttributeType

public void setAttributeType(java.lang.String attributeType)
The data type for the attribute.

Constraints:
Allowed Values: S, N, B

Parameters:
attributeType - The data type for the attribute.
See Also:
ScalarAttributeType

withAttributeType

public AttributeDefinition withAttributeType(java.lang.String attributeType)
The data type for the attribute.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: S, N, B

Parameters:
attributeType - The data type for the attribute.
Returns:
A reference to this updated object so that method calls can be chained together.
See Also:
ScalarAttributeType

setAttributeType

public void setAttributeType(ScalarAttributeType attributeType)
The data type for the attribute.

Constraints:
Allowed Values: S, N, B

Parameters:
attributeType - The data type for the attribute.
See Also:
ScalarAttributeType

withAttributeType

public AttributeDefinition withAttributeType(ScalarAttributeType attributeType)
The data type for the attribute.

Returns a reference to this object so that method calls can be chained together.

Constraints:
Allowed Values: S, N, B

Parameters:
attributeType - The data type for the attribute.
Returns:
A reference to this updated object so that method calls can be chained together.
See Also:
ScalarAttributeType

toString

public java.lang.String toString()
Returns a string representation of this object; useful for testing and debugging.

Overrides:
toString in class java.lang.Object
Returns:
A string representation of this object.
See Also:
Object.toString()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.