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.internal;
 
Abstract base class for both query filters and scan filters.
 
 public abstract class Filter <T extends Filter<T>> {
     private final String attribute;
     private ComparisonOperator op;
     private Object[] values;

    
Create a filter for the specified top-level attribute.

Parameters:
attrName attribute name
 
     protected Filter(String attrName) {
         InternalUtils.checkInvalidAttrName(attrName);
         this. = attrName;
     }

    
Returns the attribute name.
 
     public String getAttribute() {
         return ;
     }
 
         return ;
     }
 
     public Object[] getValues() {
         return  == null ? null : .clone();
     }
 
     @SuppressWarnings("unchecked")
     protected T _withValues(Object ... values) {
         this. = values.clone();
         return (T) this;
     }
 
     @SuppressWarnings("unchecked")
     private T _withComparisonOperator(ComparisonOperator op) {
         this. = op;
         return (T) this;
     }

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

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

    
Expects the attribute be non-existing.
 
     public T notExist() {
     }
 
     public T contains(Object val) {
     }
 
     public T notContains(Object val) {
     }
    
Creates and returns a condition of the range key with a value that begins with the given value.
 
    public T beginsWith(String val) {
    }
    public T 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 T between(Object lowObject hi) {
    }

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

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

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

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