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

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

Introduction

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

Prototype


public String getProjectionType() 

Source Link

Document

The set of attributes that are projected into the index:

  • KEYS_ONLY - Only the index and primary keys are 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.  ja v  a  2s .  c o 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 w  w  .ja va 2  s  .c om
    
    }