Class GlobalSecondaryIndex
- java.lang.Object
-
- com.amazonaws.services.dynamodbv2.model.GlobalSecondaryIndex
-
- All Implemented Interfaces:
Serializable
,Cloneable
public class GlobalSecondaryIndex extends Object implements Serializable, Cloneable
Represents the properties of a global secondary index.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description GlobalSecondaryIndex()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GlobalSecondaryIndex
clone()
boolean
equals(Object obj)
String
getIndexName()
The name of the global secondary index.List<KeySchemaElement>
getKeySchema()
The complete key schema for a global secondary index, which consists of one or more pairs of attribute names and key types:Projection
getProjection()
ProvisionedThroughput
getProvisionedThroughput()
int
hashCode()
void
setIndexName(String indexName)
The name of the global secondary index.void
setKeySchema(Collection<KeySchemaElement> keySchema)
The complete key schema for a global secondary index, which consists of one or more pairs of attribute names and key types:void
setProjection(Projection projection)
void
setProvisionedThroughput(ProvisionedThroughput provisionedThroughput)
String
toString()
Returns a string representation of this object; useful for testing and debugging.GlobalSecondaryIndex
withIndexName(String indexName)
The name of the global secondary index.GlobalSecondaryIndex
withKeySchema(KeySchemaElement... keySchema)
The complete key schema for a global secondary index, which consists of one or more pairs of attribute names and key types:GlobalSecondaryIndex
withKeySchema(Collection<KeySchemaElement> keySchema)
The complete key schema for a global secondary index, which consists of one or more pairs of attribute names and key types:GlobalSecondaryIndex
withProjection(Projection projection)
GlobalSecondaryIndex
withProvisionedThroughput(ProvisionedThroughput provisionedThroughput)
-
-
-
Method Detail
-
setIndexName
public void setIndexName(String indexName)
The name of the global secondary index. The name must be unique among all other indexes on this table.
- Parameters:
indexName
- The name of the global secondary index. The name must be unique among all other indexes on this table.
-
getIndexName
public String getIndexName()
The name of the global secondary index. The name must be unique among all other indexes on this table.
- Returns:
- The name of the global secondary index. The name must be unique among all other indexes on this table.
-
withIndexName
public GlobalSecondaryIndex withIndexName(String indexName)
The name of the global secondary index. The name must be unique among all other indexes on this table.
- Parameters:
indexName
- The name of the global secondary index. The name must be unique among all other indexes on this table.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getKeySchema
public List<KeySchemaElement> getKeySchema()
The complete key schema for a global secondary index, which consists of one or more pairs of attribute names and key types:
-
HASH
- partition key -
RANGE
- sort key
The partition key of an item is also known as its hash attribute. The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.
The sort key of an item is also known as its range attribute. The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.
- Returns:
- The complete key schema for a global secondary index, which
consists of one or more pairs of attribute names and key
types:
-
HASH
- partition key -
RANGE
- sort key
The partition key of an item is also known as its hash attribute. The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.
The sort key of an item is also known as its range attribute. The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.
-
-
-
setKeySchema
public void setKeySchema(Collection<KeySchemaElement> keySchema)
The complete key schema for a global secondary index, which consists of one or more pairs of attribute names and key types:
-
HASH
- partition key -
RANGE
- sort key
The partition key of an item is also known as its hash attribute. The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.
The sort key of an item is also known as its range attribute. The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.
- Parameters:
keySchema
- The complete key schema for a global secondary index, which consists of one or more pairs of attribute names and key types:-
HASH
- partition key -
RANGE
- sort key
The partition key of an item is also known as its hash attribute. The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.
The sort key of an item is also known as its range attribute. The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.
-
-
-
withKeySchema
public GlobalSecondaryIndex withKeySchema(KeySchemaElement... keySchema)
The complete key schema for a global secondary index, which consists of one or more pairs of attribute names and key types:
-
HASH
- partition key -
RANGE
- sort key
The partition key of an item is also known as its hash attribute. The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.
The sort key of an item is also known as its range attribute. The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.
NOTE: This method appends the values to the existing list (if any). Use
setKeySchema(java.util.Collection)
orwithKeySchema(java.util.Collection)
if you want to override the existing values.- Parameters:
keySchema
- The complete key schema for a global secondary index, which consists of one or more pairs of attribute names and key types:-
HASH
- partition key -
RANGE
- sort key
The partition key of an item is also known as its hash attribute. The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.
The sort key of an item is also known as its range attribute. The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-
withKeySchema
public GlobalSecondaryIndex withKeySchema(Collection<KeySchemaElement> keySchema)
The complete key schema for a global secondary index, which consists of one or more pairs of attribute names and key types:
-
HASH
- partition key -
RANGE
- sort key
The partition key of an item is also known as its hash attribute. The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.
The sort key of an item is also known as its range attribute. The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.
- Parameters:
keySchema
- The complete key schema for a global secondary index, which consists of one or more pairs of attribute names and key types:-
HASH
- partition key -
RANGE
- sort key
The partition key of an item is also known as its hash attribute. The term "hash attribute" derives from DynamoDB' usage of an internal hash function to evenly distribute data items across partitions, based on their partition key values.
The sort key of an item is also known as its range attribute. The term "range attribute" derives from the way DynamoDB stores items with the same partition key physically close together, in sorted order by the sort key value.
-
- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
-
setProjection
public void setProjection(Projection projection)
- Parameters:
projection
-
-
getProjection
public Projection getProjection()
- Returns:
-
withProjection
public GlobalSecondaryIndex withProjection(Projection projection)
- Parameters:
projection
-- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setProvisionedThroughput
public void setProvisionedThroughput(ProvisionedThroughput provisionedThroughput)
- Parameters:
provisionedThroughput
-
-
getProvisionedThroughput
public ProvisionedThroughput getProvisionedThroughput()
- Returns:
-
withProvisionedThroughput
public GlobalSecondaryIndex withProvisionedThroughput(ProvisionedThroughput provisionedThroughput)
- Parameters:
provisionedThroughput
-- Returns:
- Returns a reference to this 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 classObject
- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
clone
public GlobalSecondaryIndex clone()
-
-