public GlobalSecondaryIndex globalSecondaryIndex ( final String indexName ) { if ( ! globalSecondaryIndexes . containsKey ( indexName ) ) { return null ; } final GlobalSecondaryIndex gsi = globalSecondaryIndexes . get ( indexName ) ; final GlobalSecondaryIndex copy = new GlobalSecondaryIndex ( ) . withIndexName ( gsi . getIndexName ( ) ) ; copy . withProjection ( new Projection ( ) . withProjectionType ( gsi . getProjection ( ) . getProjectionType ( ) ) ) ; for ( final KeySchemaElement key : gsi . getKeySchema ( ) ) { copy . withKeySchema ( new KeySchemaElement ( key . getAttributeName ( ) , key . getKeyType ( ) ) ) ; } return copy ; }
Gets the global secondary index .