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;
 
A condition for selecting items with a range key. Typical usages:
new RangeKeyCondition("strAttr").eq("attrValue");

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

...

 
 public class RangeKeyCondition {
     private final String attrName;
     private KeyConditions kcond;
     private Object[] values;

    
A condition for selecting items with a range key. Typical usages:
new RangeKeyCondition("strAttr").eq("attrValue");

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

...

 
     public RangeKeyCondition(String attrName) {
         InternalUtils.checkInvalidAttrName(attrName);
         this. = attrName;
     }
 
     public String getAttrName() {
         return ;
     }
 
     public KeyConditions getKeyCondition() {
         return ;
     }
 
     public Object[] getValues() {
         return  == null ? null : .clone();
     }

    
Creates and returns a condition of the range key being equal to the given value.
 
     public RangeKeyCondition eq(Object val) {
          = .;
         return withValues(val);
     }

    
Creates and returns a condition of the range key with a value that begins with the given value.
 
     public RangeKeyCondition beginsWith(String val) {
          = .;
         return withValues(val);
     }
    
Creates and returns a condition of the range key that has a value between the given values.
 
     public RangeKeyCondition between(Object lowObject hi) {
          = .;
         return withValues(lowhi);
     }

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

    
Creates and returns a condition of the range key being greater than the given value.
    public RangeKeyCondition gt(Object val) {
         = .;
        return withValues(val);
    }

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

    
Creates and returns a condition of the range key being less than the given value.
    public RangeKeyCondition lt(Object val) {
         = .;
        return withValues(val);
    }
    private RangeKeyCondition withValues(Object ... values) {
        this. = values;
        return this;
    }
New to GrepCode? Check out our FAQ X