public final class QueryFactoryResult extends Object
ClauseQueryFactory.getQuery(QueryCreationContext, com.atlassian.query.clause.TerminalClause)
method. The result contains the a Lucene Query and a flag to indicate whether or not the Lucene Query should be negated.
When the flag is set to true JIRA will automatically negate the Lucene Query when it is run in Lucene.Constructor and Description |
---|
QueryFactoryResult(org.apache.lucene.search.Query luceneQuery)
Default constructor that sets mustNotOccur to false.
|
QueryFactoryResult(org.apache.lucene.search.Query luceneQuery,
boolean mustNotOccur)
Create the result with the passed result and flag.
|
Modifier and Type | Method and Description |
---|---|
static QueryFactoryResult |
createFalseResult()
Creates a
QueryFactoryResult instance that will return no results. |
boolean |
equals(Object o) |
org.apache.lucene.search.Query |
getLuceneQuery() |
int |
hashCode() |
static QueryFactoryResult |
mergeResultsWithShould(List<QueryFactoryResult> results) |
boolean |
mustNotOccur() |
String |
toString() |
public QueryFactoryResult(org.apache.lucene.search.Query luceneQuery)
luceneQuery
- the query to wrap. Must not be null.IllegalArgumentException
- if luceneQuery is null.public QueryFactoryResult(org.apache.lucene.search.Query luceneQuery, boolean mustNotOccur)
luceneQuery
- the query to add. Must not be null.mustNotOccur
- the flag to add to the result.IllegalArgumentException
- if luceneQuery is null.public static QueryFactoryResult createFalseResult()
QueryFactoryResult
instance that will return no results.QueryFactoryResult
instance that will return no results.public static QueryFactoryResult mergeResultsWithShould(List<QueryFactoryResult> results)
results
- a list of results you want to merge; must not be null or contain nullsmustNotOccur()
will always be false.public org.apache.lucene.search.Query getLuceneQuery()
public boolean mustNotOccur()
Copyright © 2002-2021 Atlassian. All Rights Reserved.