public static <T extends AVObject> AVQuery<T> or(List<AVQuery<T>> queries) {
    if (null == queries || queries.isEmpty()) {
      throw new IllegalArgumentException("queries must be non-empty.");
    }
    String className = queries.get(0).getClassName();

    AVQuery<T> result = new AVQuery<T>(className);
    if (queries.size() > 1) {
      for (AVQuery<T> query : queries) {
        if (!className.equals(query.getClassName())) {
          throw new IllegalArgumentException("All queries must be for the same class");
        }
        result.addOrItems(new QueryOperation("$or", "$or", query.conditions
                .compileWhereOperationMap()));
      }
    } else {
      result.setWhere(queries.get(0).conditions.getWhere());
    }

    return result;
  }
public static < T extends AVObject > AVQuery < T > or ( List < AVQuery < T > > queries ) { if ( null == queries || queries . isEmpty ( ) ) { throw new IllegalArgumentException ( "queries must be non-empty." ) ; } String className = queries . get ( 0 ) . getClassName ( ) ; AVQuery < T > result = new AVQuery < T > ( className ) ; if ( queries . size ( ) > 1 ) { for ( AVQuery < T > query : queries ) { if ( ! className . equals ( query . getClassName ( ) ) ) { throw new IllegalArgumentException ( "All queries must be for the same class" ) ; } result . addOrItems ( new QueryOperation ( "$or" , "$or" , query . conditions . compileWhereOperationMap ( ) ) ) ; } } else { result . setWhere ( queries . get ( 0 ) . conditions . getWhere ( ) ) ; } return result ; }
Constructs a query that is the or of the given queries.

@param queries The list of AVQueries to 'or' together
@return A AVQuery that is the 'or' of the passed in queries