Example usage for com.amazonaws.services.dynamodbv2.model LocalSecondaryIndex setIndexName

List of usage examples for com.amazonaws.services.dynamodbv2.model LocalSecondaryIndex setIndexName

Introduction

In this page you can find the example usage for com.amazonaws.services.dynamodbv2.model LocalSecondaryIndex setIndexName.

Prototype


public void setIndexName(String indexName) 

Source Link

Document

The name of the local secondary index.

Usage

From source file:io.venable.amazonaws.dynamo.table.builder.LocalSecondaryIndexBuilderImpl.java

License:Apache License

void buildSecondaryIndexes(KeySchemaElement primaryHashKeySchemaElement,
        Collection<LocalSecondaryIndex> localSecondaryIndexCollection,
        Collection<AttributeDefinition> attributeDefinitionCollection) {
    LocalSecondaryIndex localSecondaryIndex = new LocalSecondaryIndex();

    localSecondaryIndex.setIndexName(indexName);
    Collection<KeySchemaElement> keySchemaElementCollection = new ArrayList<>();
    keySchemaElementCollection.add(primaryHashKeySchemaElement);
    buildRangeKey(keySchemaElementCollection, attributeDefinitionCollection);
    localSecondaryIndex.setKeySchema(keySchemaElementCollection);

    projection.build(localSecondaryIndex);

    localSecondaryIndexCollection.add(localSecondaryIndex);
}