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.
| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
public KeySchemaElement()
public KeySchemaElement(java.lang.String attributeName,
java.lang.String keyType)
attributeName - The name of a key attribute.keyType - The attribute data, consisting of the data type and the
attribute value itself.public KeySchemaElement(java.lang.String attributeName,
KeyType keyType)
attributeName - The name of a key attribute.keyType - The attribute data, consisting of the data type and the
attribute value itself.public java.lang.String getAttributeName()
Constraints:
Length: 1 - 255
public void setAttributeName(java.lang.String attributeName)
Constraints:
Length: 1 - 255
attributeName - The name of a key attribute.public KeySchemaElement withAttributeName(java.lang.String attributeName)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Length: 1 - 255
attributeName - The name of a key attribute.public java.lang.String getKeyType()
Constraints:
Allowed Values: HASH, RANGE
KeyTypepublic void setKeyType(java.lang.String keyType)
Constraints:
Allowed Values: HASH, RANGE
keyType - The attribute data, consisting of the data type and the attribute
value itself.KeyTypepublic KeySchemaElement withKeyType(java.lang.String keyType)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: HASH, RANGE
keyType - The attribute data, consisting of the data type and the attribute
value itself.KeyTypepublic void setKeyType(KeyType keyType)
Constraints:
Allowed Values: HASH, RANGE
keyType - The attribute data, consisting of the data type and the attribute
value itself.KeyTypepublic KeySchemaElement withKeyType(KeyType keyType)
Returns a reference to this object so that method calls can be chained together.
Constraints:
Allowed Values: HASH, RANGE
keyType - The attribute data, consisting of the data type and the attribute
value itself.KeyTypepublic java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Object