Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.google.appengine.api.datastore
Class Query.CompositeFilter

    java.lang.Object
      com.google.appengine.api.datastore.Query.Filter
          com.google.appengine.api.datastore.Query.CompositeFilter

All Implemented Interfaces:
  java.io.Serializable

Enclosing class:
  Query

    public static final class Query.CompositeFilter

extends Query.Filter

A `Query.Filter` that combines several sub filters using a `Query.CompositeFilterOperator`. For example, to construct a filter of the form `a = 1 AND (b = 2 OR c = 3)` use:

     new CompositeFilter(CompositeFilterOperator.AND, Arrays.asList(
         new FilterPredicate("a", FilterOperator.EQUAL, 1),
         new CompositeFilter(CompositeFilterOperator.OR, Arrays.<Filter>asList(
             new FilterPredicate("b", FilterOperator.EQUAL, 2),
             new FilterPredicate("c", FilterOperator.EQUAL, 3)))));

or

     CompositeFilterOperator.and(
         FilterOperator.EQUAL.of("a", 1),
         CompositeFilterOperator.or(
             FilterOperator.EQUAL.of("b", 2),
             FilterOperator.EQUAL.of("c", 3)));

See Also:
  Serialized Form

Constructor Summary
`Query.CompositeFilter(Query.CompositeFilterOperator operator, java.util.Collection<Query.Filter> subFilters)`

Method Summary
`boolean` | `equals(java.lang.Object obj)`
`Query.CompositeFilterOperator` | `getOperator()`
`java.util.List<Query.Filter>` | `getSubFilters()`
`int` | `hashCode()`
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### Query.CompositeFilter

    public Query.CompositeFilter(Query.CompositeFilterOperator operator,
                                 java.util.Collection<Query.Filter> subFilters)

Method Detail

### getOperator

    public Query.CompositeFilterOperator getOperator()

  Returns:
    the operator

### getSubFilters

    public java.util.List<Query.Filter> getSubFilters()

  Returns:
    an immutable list of sub filters

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `java.lang.Object`

### equals

    public boolean equals(java.lang.Object obj)

  Overrides:
    `equals` in class `java.lang.Object`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD