Example usage for com.amazonaws.services.dynamodbv2.model GlobalSecondaryIndex setProjection

List of usage examples for com.amazonaws.services.dynamodbv2.model GlobalSecondaryIndex setProjection

Introduction

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

Prototype


public void setProjection(Projection projection) 

Source Link

Document

Represents attributes that are copied (projected) from the table into the global secondary index.

Usage

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

License:Apache License

void build(GlobalSecondaryIndex globalSecondaryIndex) {
    validateProjection();

    globalSecondaryIndex.setProjection(projection);
}

From source file:org.xmlsh.aws.util.AWSDDBCommand.java

License:BSD License

protected GlobalSecondaryIndex parseGlobalSecondaryIndex(XValue xv)
        throws InvalidArgumentException, UnexpectedException {
    if (!xv.isXdmNode())
        throw new InvalidArgumentException(
                "Unexpected argument type for global secondary index: " + xv.describe());

    GlobalSecondaryIndex gi = new GlobalSecondaryIndex();

    gi.setIndexName(xv.xpath(getShell(), "./@name").toString());
    gi.setKeySchema(parseKeySchemaList(xv.xpath(getShell(), "./key-schema")));
    gi.setProjection(parseProjection(xv.xpath(getShell(), "./projection")));
    gi.setProvisionedThroughput(parseProvisionedThroughput(xv.xpath(getShell(), "./provisioned-throughput")));

    return gi;/*from w ww.  j av  a  2 s . c  om*/
}