@NonInjectableComponent public class CascadingSelectCustomFieldClauseQueryFactory extends Object implements ClauseQueryFactory
Constructor and Description |
---|
CascadingSelectCustomFieldClauseQueryFactory(CustomField customField,
String luceneField,
JqlSelectOptionsUtil jqlSelectOptionsUtil,
JqlOperandResolver jqlOperandResolver,
JqlCascadingSelectLiteralUtil jqlCascadingSelectLiteralUtil) |
Modifier and Type | Method and Description |
---|---|
QueryFactoryResult |
getQuery(QueryCreationContext queryCreationContext,
TerminalClause terminalClause)
The call to
JqlOperandResolver.getValues(QueryCreationContext, com.atlassian.query.operand.Operand, com.atlassian.query.clause.TerminalClause)
potentially returns positive and negative ids as literals. |
public CascadingSelectCustomFieldClauseQueryFactory(CustomField customField, String luceneField, JqlSelectOptionsUtil jqlSelectOptionsUtil, JqlOperandResolver jqlOperandResolver, JqlCascadingSelectLiteralUtil jqlCascadingSelectLiteralUtil)
public QueryFactoryResult getQuery(QueryCreationContext queryCreationContext, TerminalClause terminalClause)
JqlOperandResolver.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.
getQuery
in interface ClauseQueryFactory
queryCreationContext
- the context of query creationterminalClause
- the clause for which this factory is generating a query.Copyright © 2002-2015 Atlassian. All Rights Reserved.