Example usage for com.amazonaws.services.dynamodbv2.model Projection getNonKeyAttributes

List of usage examples for com.amazonaws.services.dynamodbv2.model Projection getNonKeyAttributes

Introduction

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

Prototype


public java.util.List<String> getNonKeyAttributes() 

Source Link

Document

Represents the non-key attribute names which will be projected into the index.

Usage

From source file:org.iternine.jeppetto.dao.dynamodb.expression.ProjectionExpressionBuilder.java

License:Apache License

public Boolean isCoveredBy(Projection projection) {
    switch (ProjectionType.valueOf(projection.getProjectionType())) {
    case ALL://from w  ww . jav a  2s . co m
        return Boolean.TRUE;
    case KEYS_ONLY:
        return nonKeyAttributes.isEmpty();
    case INCLUDE:
        return nonKeyAttributes.containsAll(projection.getNonKeyAttributes());
    }

    return Boolean.FALSE;
}

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

License:BSD License

private void writeProjection(Projection projection) throws XMLStreamException {
    startElement("projection");
    attribute("projection-type", projection.getProjectionType());
    for (String s : projection.getNonKeyAttributes())
        textElement("non-key-attribute", s);

    endElement();//from   w  ww. j av  a2s  .c o m

}