public class LocalSecondaryIndex extends Object implements Serializable, Cloneable
Represents the properties of a local secondary index.
Constructor and Description |
---|
LocalSecondaryIndex() |
Modifier and Type | Method and Description |
---|---|
LocalSecondaryIndex |
clone() |
boolean |
equals(Object obj) |
String |
getIndexName()
The name of the local secondary index.
|
List<KeySchemaElement> |
getKeySchema()
The complete key schema for the local secondary index, consisting of one
or more pairs of attribute names and key types (
HASH or
RANGE ). |
Projection |
getProjection() |
int |
hashCode() |
void |
setIndexName(String indexName)
The name of the local secondary index.
|
void |
setKeySchema(Collection<KeySchemaElement> keySchema)
The complete key schema for the local secondary index, consisting of one
or more pairs of attribute names and key types (
HASH or
RANGE ). |
void |
setProjection(Projection projection) |
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
LocalSecondaryIndex |
withIndexName(String indexName)
The name of the local secondary index.
|
LocalSecondaryIndex |
withKeySchema(Collection<KeySchemaElement> keySchema)
The complete key schema for the local secondary index, consisting of one
or more pairs of attribute names and key types (
HASH or
RANGE ). |
LocalSecondaryIndex |
withKeySchema(KeySchemaElement... keySchema)
The complete key schema for the local secondary index, consisting of one
or more pairs of attribute names and key types (
HASH or
RANGE ). |
LocalSecondaryIndex |
withProjection(Projection projection) |
public void setIndexName(String indexName)
The name of the local secondary index. The name must be unique among all other indexes on this table.
indexName
- The name of the local secondary index. The name must be unique
among all other indexes on this table.public String getIndexName()
The name of the local secondary index. The name must be unique among all other indexes on this table.
public LocalSecondaryIndex withIndexName(String indexName)
The name of the local secondary index. The name must be unique among all other indexes on this table.
indexName
- The name of the local secondary index. The name must be unique
among all other indexes on this table.public List<KeySchemaElement> getKeySchema()
The complete key schema for the local secondary index, consisting of one
or more pairs of attribute names and key types (HASH
or
RANGE
).
HASH
or RANGE
).public void setKeySchema(Collection<KeySchemaElement> keySchema)
The complete key schema for the local secondary index, consisting of one
or more pairs of attribute names and key types (HASH
or
RANGE
).
keySchema
- The complete key schema for the local secondary index, consisting
of one or more pairs of attribute names and key types (
HASH
or RANGE
).public LocalSecondaryIndex withKeySchema(KeySchemaElement... keySchema)
The complete key schema for the local secondary index, consisting of one
or more pairs of attribute names and key types (HASH
or
RANGE
).
NOTE: This method appends the values to the existing list (if
any). Use setKeySchema(java.util.Collection)
or
withKeySchema(java.util.Collection)
if you want to override the
existing values.
keySchema
- The complete key schema for the local secondary index, consisting
of one or more pairs of attribute names and key types (
HASH
or RANGE
).public LocalSecondaryIndex withKeySchema(Collection<KeySchemaElement> keySchema)
The complete key schema for the local secondary index, consisting of one
or more pairs of attribute names and key types (HASH
or
RANGE
).
keySchema
- The complete key schema for the local secondary index, consisting
of one or more pairs of attribute names and key types (
HASH
or RANGE
).public void setProjection(Projection projection)
projection
- public Projection getProjection()
public LocalSecondaryIndex withProjection(Projection projection)
projection
- public String toString()
toString
in class Object
Object.toString()
public LocalSecondaryIndex clone()
Copyright © 2016. All rights reserved.