|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.confluence.macro.query.BooleanQueryFactory
public final class BooleanQueryFactory
Container class for the results of a SearchQueryParser
operation,
providing a mutable version of the BooleanQuery
.
Constructor Summary | |
---|---|
BooleanQueryFactory()
Constructs an empty BooleanQueryFactory . |
|
BooleanQueryFactory(java.util.Set<SearchQuery> must,
java.util.Set<SearchQuery> should,
java.util.Set<SearchQuery> mustNot)
Constructs a BooleanQueryFactory with the specified
SearchQueries as initial values. |
Method Summary | |
---|---|
void |
addMust(BooleanQueryFactory factory)
Adds the specified BooleanQueryFactory to the "must match"
criteria after calling toBooleanQuery() on it. |
void |
addMust(java.util.Collection<? extends SearchQuery> queries)
Adds the specified Collection<SearchQuery> to the "must match"
criteria. |
void |
addMust(SearchQuery query)
Adds the specified SearchQuery to the "must match" criteria. |
void |
addMustNot(BooleanQueryFactory factory)
Adds the specified BooleanQueryFactory to the "must not match"
criteria after calling toBooleanQuery() on it. |
void |
addMustNot(java.util.Collection<? extends SearchQuery> queries)
Adds the specified Collection<SearchQuery> to the "must not
match" criteria. |
void |
addMustNot(SearchQuery query)
Adds the specified SearchQuery to the "must not match" criteria. |
void |
addShould(BooleanQueryFactory factory)
Adds the specified BooleanQueryFactory to the "should match"
criteria after calling toBooleanQuery() on it. |
void |
addShould(java.util.Collection<? extends SearchQuery> queries)
Adds the specified Collection<SearchQuery> to the "should match"
criteria. |
void |
addShould(SearchQuery query)
Adds the specified SearchQuery to the "should match" criteria. |
boolean |
isEmpty()
Returns true if the current BooleanQueryFactory is empty; that
is, if no SearchQueries have been added to it. |
void |
merge(BooleanQueryFactory result)
Merges the specified BooleanQueryFactory with the current one. |
BooleanQuery |
toBooleanQuery()
Returns a BooleanQuery instance using the current state of this
BooleanQueryFactory . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BooleanQueryFactory()
BooleanQueryFactory
.
public BooleanQueryFactory(java.util.Set<SearchQuery> must, java.util.Set<SearchQuery> should, java.util.Set<SearchQuery> mustNot)
BooleanQueryFactory
with the specified
SearchQueries
as initial values.
must
- queries that must matchshould
- queries that should matchmustNot
- queries that must not matchMethod Detail |
---|
public BooleanQuery toBooleanQuery()
BooleanQuery
instance using the current state of this
BooleanQueryFactory
.
BooleanQuery
instance reflecting the current statepublic void addMust(SearchQuery query)
SearchQuery
to the "must match" criteria.
query
- the SearchQuery
to addpublic void addMust(java.util.Collection<? extends SearchQuery> queries)
Collection<SearchQuery>
to the "must match"
criteria.
queries
- the SearchQueries
to addpublic void addMust(BooleanQueryFactory factory)
BooleanQueryFactory
to the "must match"
criteria after calling toBooleanQuery()
on it. Empty or null
factories are silently ignored.
factory
- the BooleanQueryFactory
to addpublic void addShould(SearchQuery query)
SearchQuery
to the "should match" criteria.
query
- the SearchQuery
to addpublic void addShould(java.util.Collection<? extends SearchQuery> queries)
Collection<SearchQuery>
to the "should match"
criteria.
queries
- the SearchQueries
to addpublic void addShould(BooleanQueryFactory factory)
BooleanQueryFactory
to the "should match"
criteria after calling toBooleanQuery()
on it. Empty or null
factories are silently ignored.
factory
- the BooleanQueryFactory
to addpublic void addMustNot(SearchQuery query)
SearchQuery
to the "must not match" criteria.
query
- the SearchQuery
to addpublic void addMustNot(java.util.Collection<? extends SearchQuery> queries)
Collection<SearchQuery>
to the "must not
match" criteria.
queries
- the SearchQueries
to addpublic void addMustNot(BooleanQueryFactory factory)
BooleanQueryFactory
to the "must not match"
criteria after calling toBooleanQuery()
on it. Empty or null
factories are silently ignored.
factory
- the BooleanQueryFactory
to addpublic void merge(BooleanQueryFactory result)
BooleanQueryFactory
with the current one.
result
- the BooleanQueryFactory
to merge
java.lang.IllegalArgumentException
- if result is nullpublic boolean isEmpty()
BooleanQueryFactory
is empty; that
is, if no SearchQueries
have been added to it.
BooleanQueryFactory
is empty.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |