|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.confluence.search.v2.query.BooleanQuery
public class BooleanQuery
A boolean query that allows and/or and not combinations of sub queries.
TODO: This SearchQuery implementation does not work with the QuerySerializer (or parser) since that mechanism relies on all parameters returned by getParameters having the same meaning; this is not currently true in this implementation.
Constructor Summary | |
---|---|
BooleanQuery(java.util.Set<? extends SearchQuery> must,
java.util.Set<? extends SearchQuery> should,
java.util.Set<? extends SearchQuery> mustNot)
Construct a new BooleanQuery encapsulating the supplied sub queries. |
Method Summary | |
---|---|
static SearchQuery |
andQuery(SearchQuery... queries)
Build an AND query from one or more subqueries. |
static SearchQuery |
composeAndQuery(SearchQuery searchQueryOne,
SearchQuery searchQueryTwo)
Deprecated. since 4.1 use .andQuery() instead. |
static SearchQuery |
composeAndQuery(java.util.Set<? extends SearchQuery> subqueries)
Return a query that "ANDs" together a list of queries. |
static SearchQuery |
composeOrQuery(SearchQuery searchQueryOne,
SearchQuery searchQueryTwo)
Deprecated. since 4.1 use .orQuery() instead |
static SearchQuery |
composeOrQuery(java.util.Set<? extends SearchQuery> subqueries)
Return a query that "ORs" together a list of queries. |
boolean |
equals(java.lang.Object obj)
|
java.lang.String |
getKey()
|
java.util.Set<SearchQuery> |
getMustNotQueries()
|
java.util.Set<SearchQuery> |
getMustQueries()
|
java.util.List |
getParameters()
List of parameters as String s or SearchQuery s. |
java.util.Set<SearchQuery> |
getShouldQueries()
|
int |
hashCode()
|
static SearchQuery |
orQuery(SearchQuery... queries)
Create a query that is the OR of the provided sub-queries |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BooleanQuery(java.util.Set<? extends SearchQuery> must, java.util.Set<? extends SearchQuery> should, java.util.Set<? extends SearchQuery> mustNot)
must
- the queries that must match.should
- the queries that may match.mustNot
- the queries that must not match.
java.lang.IllegalArgumentException
- if the parameters are not correct.Method Detail |
---|
public java.lang.String getKey()
getKey
in interface SearchQuery
public static SearchQuery composeAndQuery(java.util.Set<? extends SearchQuery> subqueries)
AllQuery
is installed. If it contains only a single entry, then that
entry is returned. Otherwise a BooleanQuery combining the full list is returned.
subqueries
- a list of SearchQuery
s to combine. Must have size >= 1.
SearchQuery
combining the subqueries
.
java.lang.IllegalArgumentException
- if the list of subqueries is empty.public static SearchQuery composeAndQuery(SearchQuery searchQueryOne, SearchQuery searchQueryTwo)
searchQueryOne
- the first sub-querysearchQueryTwo
- the second sub-query
public static SearchQuery andQuery(SearchQuery... queries)
queries
- the SearchQuery
s to combine. Must be >= 1.
SearchQuery
combining the subqueries
.
java.lang.IllegalArgumentException
- if the list of subqueries is empty.public static SearchQuery composeOrQuery(java.util.Set<? extends SearchQuery> subqueries)
AllQuery
is installed. If it contains only a single entry, then that
entry is returned. Otherwise a BooleanQuery combining the full list is returned.
subqueries
- a list of SearchQuery
s to combine. Must have size >= 1.
SearchQuery
combining the subqueries
.
java.lang.IllegalArgumentException
- if the list of subqueries is empty.public static SearchQuery composeOrQuery(SearchQuery searchQueryOne, SearchQuery searchQueryTwo)
searchQueryOne
- the first query to ORsearchQueryTwo
- the second query to OR
public static SearchQuery orQuery(SearchQuery... queries)
queries
- the queries to OR
public java.util.Set<SearchQuery> getMustQueries()
public java.util.Set<SearchQuery> getShouldQueries()
public java.util.Set<SearchQuery> getMustNotQueries()
public java.util.List getParameters()
SearchQuery
String
s or SearchQuery
s.
getParameters
in interface SearchQuery
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |