Eclipse Platform
Release 3.6

org.eclipse.equinox.p2.query
Class CompoundQuery<T>

java.lang.Object
  extended by org.eclipse.equinox.p2.query.CompoundQuery<T>

public abstract class CompoundQuery<T>
extends Object

A query that combines a group of sub-queries.

In a CompoundQuery each sub-query is executed over the entire input and the results are combined using either logical AND or logical OR operations.

Clients are expected to call createCompoundQuery(IQuery[], boolean) to create a concrete instance of a CompoundQuery. If all Queries are instances of IMatchQuery then the resulting compound query will be an IMatchQuery, otherwise the resulting query will be a context query}.

Since:
2.0
Restriction:
This class is not intended to be subclassed by clients.

Constructor Summary
CompoundQuery()
           
 
Method Summary
static
<E> IQuery<E>
createCompoundQuery(IQuery<E>[] queries, boolean and)
          Creates a compound query that combines the given queries.
static
<T> IQuery<T>
createCompoundQuery(IQuery<T> query1, IQuery<T> query2, boolean and)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompoundQuery

public CompoundQuery()
Method Detail

createCompoundQuery

public static <E> IQuery<E> createCompoundQuery(IQuery<E>[] queries,
                                                boolean and)
Creates a compound query that combines the given queries. The queries will be performed by the compound query in the given order. This method might not perform all queries if it can determine the result of the compound expression without doing so. If all the queries are instances of IMatchQuery then the resulting compound query will be an instance of IMatchQuery, otherwise the resulting compound query will be a context query.

Parameters:
queries - The queries to perform
and - true if this query represents a logical 'and', and false if this query represents a logical 'or'.

createCompoundQuery

public static <T> IQuery<T> createCompoundQuery(IQuery<T> query1,
                                                IQuery<T> query2,
                                                boolean and)

Eclipse Platform
Release 3.6

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2010. All rights reserved.