Class PrimaryKey
java.lang.Object
com.amazonaws.services.dynamodbv2.document.PrimaryKey
Used to represent a primary key that has one or multiple key components.
-
Constructor Summary
ConstructorsConstructorDescriptionPrimaryKey
(KeyAttribute... components) Constructs with the specified key components.PrimaryKey
(String hashKeyName, Object hashKeyValue) Constructs with a hash key.PrimaryKey
(String hashKeyName, Object hashKeyValue, String rangeKeyName, Object rangeKeyValue) Constructs with a hash key and a range key. -
Method Summary
Modifier and TypeMethodDescriptionaddComponent
(String keyAttributeName, Object keyAttributeValue) Add a key component to this primary key.addComponents
(KeyAttribute... components) Add one or multiple key components to this primary key.boolean
Returns all the key component names of this primary key as a set.Returns all the key components of this primary key.boolean
hasComponent
(String attrName) Returns true if this primary has the specified key attribute name; false otherwise.int
hashCode()
toString()
-
Constructor Details
-
Method Details
-
getComponents
Returns all the key components of this primary key. -
getComponentNameSet
Returns all the key component names of this primary key as a set. -
hasComponent
Returns true if this primary has the specified key attribute name; false otherwise. -
addComponents
Add one or multiple key components to this primary key. Note adding a key component with the same name as that of an existing one would overwrite and become a single key component instead of two. -
addComponent
Add a key component to this primary key. Note adding a key component with the same name as that of an existing one would overwrite and become a single key component instead of two. -
toString
-
hashCode
public int hashCode() -
equals
-