public LocalSecondaryIndex localSecondaryIndex(final String indexName) {
        if (!localSecondaryIndexes.containsKey(indexName)) {
            return null;
        }
        final LocalSecondaryIndex lsi = localSecondaryIndexes.get(indexName);
        final LocalSecondaryIndex copy = new LocalSecondaryIndex().withIndexName(lsi.getIndexName());
        copy.withProjection(new Projection().withProjectionType(lsi.getProjection().getProjectionType()));
        for (final KeySchemaElement key : lsi.getKeySchema()) {
            copy.withKeySchema(new KeySchemaElement(key.getAttributeName(), key.getKeyType()));
        }
        return copy;
    }
public LocalSecondaryIndex localSecondaryIndex ( final String indexName ) { if ( ! localSecondaryIndexes . containsKey ( indexName ) ) { return null ; } final LocalSecondaryIndex lsi = localSecondaryIndexes . get ( indexName ) ; final LocalSecondaryIndex copy = new LocalSecondaryIndex ( ) . withIndexName ( lsi . getIndexName ( ) ) ; copy . withProjection ( new Projection ( ) . withProjectionType ( lsi . getProjection ( ) . getProjectionType ( ) ) ) ; for ( final KeySchemaElement key : lsi . getKeySchema ( ) ) { copy . withKeySchema ( new KeySchemaElement ( key . getAttributeName ( ) , key . getKeyType ( ) ) ) ; } return copy ; }
Gets the local secondary index by name.
@param indexNames The index name.
@return The local secondary index, or null.