com.amazonaws.services.dynamodbv2.model
Class KeySchemaElement

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

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

Represents a single element of a key schema. A key schema specifies the attributes that make up the primary key of a table, or the key attributes of an index.

See Also:
Serialized Form

Constructor Summary
KeySchemaElement()
          Default constructor for a new KeySchemaElement object.
KeySchemaElement(java.lang.String attributeName, KeyType keyType)
          Constructs a new KeySchemaElement object.
KeySchemaElement(java.lang.String attributeName, java.lang.String keyType)
          Constructs a new KeySchemaElement object.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getAttributeName()
          The name of a key attribute.
 java.lang.String getKeyType()
          The attribute data, consisting of the data type and the attribute value itself.
 int hashCode()
           
 void setAttributeName(java.lang.String attributeName)
          The name of a key attribute.
 void setKeyType(KeyType keyType)
          The attribute data, consisting of the data type and the attribute value itself.
 void setKeyType(java.lang.String keyType)
          The attribute data, consisting of the data type and the attribute value itself.
 java.lang.String toString()
          Returns a string representation of this object; useful for testing and debugging.
 KeySchemaElement withAttributeName(java.lang.String attributeName)
          The name of a key attribute.
 KeySchemaElement withKeyType(KeyType keyType)
          The attribute data, consisting of the data type and the attribute value itself.
 KeySchemaElement withKeyType(java.lang.String keyType)
          The attribute data, consisting of the data type and the attribute value itself.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

KeySchemaElement

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


KeySchemaElement

public KeySchemaElement(java.lang.String attributeName,
                        java.lang.String keyType)
Constructs a new KeySchemaElement object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
attributeName - The name of a key attribute.
keyType - The attribute data, consisting of the data type and the attribute value itself.

KeySchemaElement

public KeySchemaElement(java.lang.String attributeName,
                        KeyType keyType)
Constructs a new KeySchemaElement object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
attributeName - The name of a key attribute.
keyType - The attribute data, consisting of the data type and the attribute value itself.
Method Detail

getAttributeName

public java.lang.String getAttributeName()
The name of a key attribute.

Constraints:
Length: 1 - 255

Returns:
The name of a key attribute.

setAttributeName

public void setAttributeName(java.lang.String attributeName)
The name of a key attribute.

Constraints:
Length: 1 - 255

Parameters:
attributeName - The name of a key attribute.

withAttributeName

public KeySchemaElement withAttributeName(java.lang.String attributeName)
The name of a key attribute.

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

Constraints:
Length: 1 - 255

Parameters:
attributeName - The name of a key attribute.
Returns:
A reference to this updated object so that method calls can be chained together.

getKeyType

public java.lang.String getKeyType()
The attribute data, consisting of the data type and the attribute value itself.

Constraints:
Allowed Values: HASH, RANGE

Returns:
The attribute data, consisting of the data type and the attribute value itself.
See Also:
KeyType

setKeyType

public void setKeyType(java.lang.String keyType)
The attribute data, consisting of the data type and the attribute value itself.

Constraints:
Allowed Values: HASH, RANGE

Parameters:
keyType - The attribute data, consisting of the data type and the attribute value itself.
See Also:
KeyType

withKeyType

public KeySchemaElement withKeyType(java.lang.String keyType)
The attribute data, consisting of the data type and the attribute value itself.

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

Constraints:
Allowed Values: HASH, RANGE

Parameters:
keyType - The attribute data, consisting of the data type and the attribute value itself.
Returns:
A reference to this updated object so that method calls can be chained together.
See Also:
KeyType

setKeyType

public void setKeyType(KeyType keyType)
The attribute data, consisting of the data type and the attribute value itself.

Constraints:
Allowed Values: HASH, RANGE

Parameters:
keyType - The attribute data, consisting of the data type and the attribute value itself.
See Also:
KeyType

withKeyType

public KeySchemaElement withKeyType(KeyType keyType)
The attribute data, consisting of the data type and the attribute value itself.

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

Constraints:
Allowed Values: HASH, RANGE

Parameters:
keyType - The attribute data, consisting of the data type and the attribute value itself.
Returns:
A reference to this updated object so that method calls can be chained together.
See Also:
KeyType

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.