Example usage for com.amazonaws.services.dynamodbv2.model Condition withAttributeValueList

List of usage examples for com.amazonaws.services.dynamodbv2.model Condition withAttributeValueList

Introduction

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

Prototype


public Condition withAttributeValueList(java.util.Collection<AttributeValue> attributeValueList) 

Source Link

Document

One or more values to evaluate against the supplied attribute.

Usage

From source file:org.iternine.jeppetto.dao.dynamodb.DynamoDBConstraint.java

License:Apache License

public Condition asCondition() {
    Condition condition = new Condition().withComparisonOperator(operator.getComparisonOperator());
    int argumentCount = operator.getArgumentCount();

    if (argumentCount == 1) {
        condition.withAttributeValueList(ConversionUtil.toAttributeValue(values[0]));
    } else if (argumentCount == 2) {
        condition.withAttributeValueList(ConversionUtil.toAttributeValue(values[0]),
                ConversionUtil.toAttributeValue(values[1]));
    } else if (argumentCount != 0) { // N arguments
        condition.setAttributeValueList(ConversionUtil.toAttributeValueList(values[0]));
    }/*from  w  w w .ja v a 2  s.c o  m*/

    return condition;
}