com.atlassian.confluence.search.v2.query
Class OrQuery

java.lang.Object
  extended by com.atlassian.confluence.search.v2.query.OrQuery
All Implemented Interfaces:
SearchQuery

public class OrQuery
extends java.lang.Object
implements SearchQuery

Boolean query that is the logical OR of some list of sub-queries.


Constructor Summary
OrQuery(java.util.List subqueries)
          Construct a query that is the logical OR of a list of sub-queries
 
Method Summary
static SearchQuery composeQuery(java.util.List subqueries)
          Return a query that "ORs" together a list of queries.
static SearchQuery composeQuery(SearchQuery searchQueryOne, SearchQuery searchQueryTwo)
          Create a query that is the OR of the two provided sub-queries
 java.lang.String getKey()
           
 java.util.List getParameters()
          The parameters of an OR query will all be SearchQuery instances.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OrQuery

public OrQuery(java.util.List subqueries)
Construct a query that is the logical OR of a list of sub-queries

Parameters:
subqueries - the sub-queries to OR
Method Detail

composeQuery

public static SearchQuery composeQuery(java.util.List subqueries)
Return a query that "ORs" together a list of queries. If the list contains no entries then an AllQuery is installed. If it contains only a single entry, then that entry is returned. Otherwise an OrQuery combining the full list is returned.

Parameters:
subqueries - a list of SearchQuerys to combine. Must have size >= 1.
Returns:
a SearchQuery combining the subqueries.
Throws:
java.lang.IllegalArgumentException - if the list of subqueries is empty.

composeQuery

public static SearchQuery composeQuery(SearchQuery searchQueryOne,
                                       SearchQuery searchQueryTwo)
Create a query that is the OR of the two provided sub-queries

Parameters:
searchQueryOne - the first query to OR
searchQueryTwo - the second query to OR
Returns:
the OR of the two provided queries

getKey

public java.lang.String getKey()
Specified by:
getKey in interface SearchQuery
See Also:
SearchQuery.getKey()

getParameters

public java.util.List getParameters()
The parameters of an OR query will all be SearchQuery instances.

Specified by:
getParameters in interface SearchQuery
Returns:
Strings or SearchQuerys.
See Also:
SearchQuery.getParameters()


Copyright © 2003-2008 Atlassian Pty Ltd. All Rights Reserved.