com.atlassian.jira.jql.query
Class CascadingSelectCustomFieldClauseQueryFactory
java.lang.Object
com.atlassian.jira.jql.query.CascadingSelectCustomFieldClauseQueryFactory
- All Implemented Interfaces:
- ClauseQueryFactory
@NonInjectableComponent
public class CascadingSelectCustomFieldClauseQueryFactory
- extends Object
- implements ClauseQueryFactory
Factory for producing clauses for the cascading select custom fields
- Since:
- v4.0
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CascadingSelectCustomFieldClauseQueryFactory
public CascadingSelectCustomFieldClauseQueryFactory(CustomField customField,
String luceneField,
JqlSelectOptionsUtil jqlSelectOptionsUtil,
JqlOperandResolver jqlOperandResolver,
JqlCascadingSelectLiteralUtil jqlCascadingSelectLiteralUtil)
getQuery
public 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. 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.
- Specified by:
getQuery
in interface ClauseQueryFactory
- Parameters:
queryCreationContext
- the context of query creationterminalClause
- the clause for which this factory is generating a query.
- Returns:
- the result which contains the generated query
Copyright © 2002-2014 Atlassian. All Rights Reserved.