Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
   *
   * Licensed under the Apache License, Version 2.0 (the "License").
   * You may not use this file except in compliance with the License.
   * A copy of the License is located at
   *
   *  http://aws.amazon.com/apache2.0
   *
  * or in the "license" file accompanying this file. This file is distributed
  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
  * express or implied. See the License for the specific language governing
  * permissions and limitations under the License.
  */
 package com.amazonaws.services.dynamodbv2.document;
 
Represents a condition to be compared with an attribute value.

Typical usages:

new Expected("strAttr").eq("attrValue");

new Expected("intAttr").gt(42);

...

See http://docs.aws.amazon.com/amazondynamodb/latest/APIReference/ API_ExpectedAttributeValue.html.

 
 public class Expected {
     private final String attribute;
     private ComparisonOperator op;
     private Object[] values;
 
     public Expected(String attrName) {
         InternalUtils.checkInvalidAttrName(attrName);
         this. = attrName;
     }

    
Returns the attribute.
 
     public String getAttribute() {
         return ;
     }
 
         return ;
     }
 
     public Object[] getValues() {
         return  == null ? null : .clone();
     }
 
     private Expected _withValues(Object ... values) {
         this. = values.clone();
         return this;
     }
 
         this. = op;
         return this;
     }

    
Creates and returns a condition of the range key being equal to the given value.
 
     public Expected eq(Object val) {
     }
 
     public Expected ne(Object val) {
     }

    
Expects the attribute be an existing attribute.
 
     public Expected exists() {
     }

    
Expects the attribute be non-existing.
 
     public Expected notExist() {
     }
 
     public Expected contains(Object val) {
     }
 
    public Expected notContains(Object val) {
    }
    
Creates and returns a condition of the range key with a value that begins with the given value.
    public Expected beginsWith(String val) {
    }
    public Expected in(Object ...values) {
        if (values == null || values.length == 0) {
            throw new IllegalArgumentException("values must not be null or empty.");
        }
    }

    
Creates and returns a condition of the range key that has a value between the given values.
    public Expected between(Object lowObject hi) {
    }

    
Creates and returns a condition of the range key being greater than or equal to the given value.
    public Expected ge(Object val) {
    }

    
Creates and returns a condition of the range key being greater than the given value.
    public Expected gt(Object val) {
    }

    
Creates and returns a condition of the range key being less than or equal to the given value.
    public Expected le(Object val) {
    }

    
Creates and returns a condition of the range key being less than the given value.
    public Expected lt(Object val) {
    }
New to GrepCode? Check out our FAQ X