public final class

QueryFactoryResult

extends Object
java.lang.Object
   ↳ com.atlassian.jira.jql.query.QueryFactoryResult

Class Overview

Represents the result of a call to the 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.

Summary

Public Constructors
QueryFactoryResult(Query luceneQuery)
Default constructor that sets mustNotOccur to false.
QueryFactoryResult(Query luceneQuery, boolean mustNotOccur)
Create the result with the passed result and flag.
Public Methods
static QueryFactoryResult createFalseResult()
Creates a QueryFactoryResult instance that will return no results.
boolean equals(Object o)
Query getLuceneQuery()
int hashCode()
static QueryFactoryResult mergeResultsWithShould(List<QueryFactoryResult> results)
boolean mustNotOccur()
String toString()
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public QueryFactoryResult (Query luceneQuery)

Default constructor that sets mustNotOccur to false.

Parameters
luceneQuery the query to wrap. Must not be null.
Throws
IllegalArgumentException if luceneQuery is null.

public QueryFactoryResult (Query luceneQuery, boolean mustNotOccur)

Create the result with the passed result and flag.

Parameters
luceneQuery the query to add. Must not be null.
mustNotOccur the flag to add to the result.
Throws
IllegalArgumentException if luceneQuery is null.

Public Methods

public static QueryFactoryResult createFalseResult ()

Creates a QueryFactoryResult instance that will return no results.

Returns

public boolean equals (Object o)

public Query getLuceneQuery ()

public int hashCode ()

public static QueryFactoryResult mergeResultsWithShould (List<QueryFactoryResult> results)

Parameters
results a list of results you want to merge; must not be null or contain nulls
Returns
  • non-false results merged in a new boolean query with SHOULD. The result should never need negation, i.e. mustNotOccur() will always be false.

public boolean mustNotOccur ()

public String toString ()