@NonInjectableComponent public class

CascadingSelectCustomFieldClauseQueryFactory

extends Object
implements ClauseQueryFactory
java.lang.Object
   ↳ com.atlassian.jira.jql.query.CascadingSelectCustomFieldClauseQueryFactory

Class Overview

Factory for producing clauses for the cascading select custom fields

Summary

Public Constructors
CascadingSelectCustomFieldClauseQueryFactory(CustomField customField, String luceneField, JqlSelectOptionsUtil jqlSelectOptionsUtil, JqlOperandResolver jqlOperandResolver, JqlCascadingSelectLiteralUtil jqlCascadingSelectLiteralUtil)
Public Methods
QueryFactoryResult getQuery(QueryCreationContext queryCreationContext, TerminalClause terminalClause)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.jql.query.ClauseQueryFactory

Public Constructors

public CascadingSelectCustomFieldClauseQueryFactory (CustomField customField, String luceneField, JqlSelectOptionsUtil jqlSelectOptionsUtil, JqlOperandResolver jqlOperandResolver, JqlCascadingSelectLiteralUtil jqlCascadingSelectLiteralUtil)

Public Methods

public QueryFactoryResult getQuery (QueryCreationContext queryCreationContext, TerminalClause terminalClause)

The call to getValues(QueryCreationContext, com.atlassian.query.operand.Operand, com.atlassian.query.clause.TerminalClause) potentially returns positive and negative ids as literals. The presence of negative ids usually signifies that the original clause meant to specify an exclusion of some options, whilst demanding the inclusion of others. For example: the cascadeOption(Parent, none) JQL function can be invoked to specify that only the issues which have the parent option set, but no child option set, should be returned. In this example, getValues() would return positive ids for all the parent options matched by the argument, and then negative ids for all the child options of those parents.

We split the positive and negative ids into two groups, and then generate a query for each such that the positives are included (or excluded if the operator is negating), and the negatives are excluded (or included if the operator is negating). We then combine these to form the total query.

Parameters
queryCreationContext the context of query creation
terminalClause the clause for which this factory is generating a query.
Returns
  • the result which contains the generated query