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.booleanReturns all the key component names of this primary key as a set.Returns all the key components of this primary key.booleanhasComponent(String attrName) Returns true if this primary has the specified key attribute name; false otherwise.inthashCode()toString()
-
Constructor Details
-
PrimaryKey
public PrimaryKey() -
PrimaryKey
Constructs with the specified key components. -
PrimaryKey
-
PrimaryKey
-
-
Method Details
-
getComponents
Returns all the key components of this primary key. -
getComponentNameSet
-
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
-
equals
-