com.amazonaws.services.dynamodb.model
Class KeySchema

java.lang.Object
  extended by com.amazonaws.services.dynamodb.model.KeySchema

public class KeySchema
extends Object

The KeySchema identifies the primary key as a one attribute primary key (hash) or a composite two attribute (hash-and-range) primary key. Single attribute primary keys have one index value: a HashKeyElement . A composite hash-and-range primary key contains two attribute values: a HashKeyElement and a RangeKeyElement .


Constructor Summary
KeySchema()
          Default constructor for a new KeySchema object.
KeySchema(KeySchemaElement hashKeyElement)
          Constructs a new KeySchema object.
 
Method Summary
 boolean equals(Object obj)
           
 KeySchemaElement getHashKeyElement()
          A hash key element is treated as the primary key, and can be a string or a number.
 KeySchemaElement getRangeKeyElement()
          A range key element is treated as a secondary key (used in conjunction with the primary key), and can be a string or a number, and is only used for hash-and-range primary keys.
 int hashCode()
           
 void setHashKeyElement(KeySchemaElement hashKeyElement)
          A hash key element is treated as the primary key, and can be a string or a number.
 void setRangeKeyElement(KeySchemaElement rangeKeyElement)
          A range key element is treated as a secondary key (used in conjunction with the primary key), and can be a string or a number, and is only used for hash-and-range primary keys.
 String toString()
          Returns a string representation of this object; useful for testing and debugging.
 KeySchema withHashKeyElement(KeySchemaElement hashKeyElement)
          A hash key element is treated as the primary key, and can be a string or a number.
 KeySchema withRangeKeyElement(KeySchemaElement rangeKeyElement)
          A range key element is treated as a secondary key (used in conjunction with the primary key), and can be a string or a number, and is only used for hash-and-range primary keys.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

KeySchema

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


KeySchema

public KeySchema(KeySchemaElement hashKeyElement)
Constructs a new KeySchema object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
hashKeyElement - A hash key element is treated as the primary key, and can be a string or a number. Single attribute primary keys have one index value. The value can be String, Number, StringSet, NumberSet.
Method Detail

getHashKeyElement

public KeySchemaElement getHashKeyElement()
A hash key element is treated as the primary key, and can be a string or a number. Single attribute primary keys have one index value. The value can be String, Number, StringSet, NumberSet.

Returns:
A hash key element is treated as the primary key, and can be a string or a number. Single attribute primary keys have one index value. The value can be String, Number, StringSet, NumberSet.

setHashKeyElement

public void setHashKeyElement(KeySchemaElement hashKeyElement)
A hash key element is treated as the primary key, and can be a string or a number. Single attribute primary keys have one index value. The value can be String, Number, StringSet, NumberSet.

Parameters:
hashKeyElement - A hash key element is treated as the primary key, and can be a string or a number. Single attribute primary keys have one index value. The value can be String, Number, StringSet, NumberSet.

withHashKeyElement

public KeySchema withHashKeyElement(KeySchemaElement hashKeyElement)
A hash key element is treated as the primary key, and can be a string or a number. Single attribute primary keys have one index value. The value can be String, Number, StringSet, NumberSet.

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

Parameters:
hashKeyElement - A hash key element is treated as the primary key, and can be a string or a number. Single attribute primary keys have one index value. The value can be String, Number, StringSet, NumberSet.
Returns:
A reference to this updated object so that method calls can be chained together.

getRangeKeyElement

public KeySchemaElement getRangeKeyElement()
A range key element is treated as a secondary key (used in conjunction with the primary key), and can be a string or a number, and is only used for hash-and-range primary keys. The value can be String, Number, StringSet, NumberSet.

Returns:
A range key element is treated as a secondary key (used in conjunction with the primary key), and can be a string or a number, and is only used for hash-and-range primary keys. The value can be String, Number, StringSet, NumberSet.

setRangeKeyElement

public void setRangeKeyElement(KeySchemaElement rangeKeyElement)
A range key element is treated as a secondary key (used in conjunction with the primary key), and can be a string or a number, and is only used for hash-and-range primary keys. The value can be String, Number, StringSet, NumberSet.

Parameters:
rangeKeyElement - A range key element is treated as a secondary key (used in conjunction with the primary key), and can be a string or a number, and is only used for hash-and-range primary keys. The value can be String, Number, StringSet, NumberSet.

withRangeKeyElement

public KeySchema withRangeKeyElement(KeySchemaElement rangeKeyElement)
A range key element is treated as a secondary key (used in conjunction with the primary key), and can be a string or a number, and is only used for hash-and-range primary keys. The value can be String, Number, StringSet, NumberSet.

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

Parameters:
rangeKeyElement - A range key element is treated as a secondary key (used in conjunction with the primary key), and can be a string or a number, and is only used for hash-and-range primary keys. The value can be String, Number, StringSet, NumberSet.
Returns:
A reference to this updated object so that method calls can be chained together.

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:
Object.toString()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

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


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