|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.jira.jql.util.JqlCascadingSelectLiteralUtil
@InjectableComponent public class JqlCascadingSelectLiteralUtil
Utility class for processing QueryLiteral objects when dealing with
CascadingSelectCFType custom field classes.
CascadingSelectCustomFieldClauseQueryFactory,
CascadingSelectCustomFieldValidator,
CascadingSelectCustomFieldClauseContextFactory| Constructor Summary | |
|---|---|
JqlCascadingSelectLiteralUtil(JqlSelectOptionsUtil jqlSelectOptionsUtil)
|
|
| Method Summary | |
|---|---|
List<QueryLiteral> |
createQueryLiteralsFromOptions(com.atlassian.query.operand.Operand sourceOperand,
Collection<Option> positiveOptions,
Collection<Option> negativeOptions)
Given a list of Options that should be in the result (positive) and a list of Options that shouldn't (negative)
creates a list of QueryLiterals that represent the positive and negative options and be used
for generating the query. |
boolean |
isNegativeLiteral(QueryLiteral literal)
Determines if the QueryLiteral represents a Option that should be excluded from the result. |
void |
processPositiveNegativeOptionLiterals(List<QueryLiteral> inputLiterals,
List<QueryLiteral> positiveLiterals,
List<QueryLiteral> negativeLiterals)
Processes the input literals into two groups: positive literals and negative literals. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JqlCascadingSelectLiteralUtil(JqlSelectOptionsUtil jqlSelectOptionsUtil)
| Method Detail |
|---|
public List<QueryLiteral> createQueryLiteralsFromOptions(com.atlassian.query.operand.Operand sourceOperand,
Collection<Option> positiveOptions,
Collection<Option> negativeOptions)
Given a list of Options that should be in the result (positive) and a list of Options that shouldn't (negative)
creates a list of QueryLiterals that represent the positive and negative options and be used
for generating the query.
sourceOperand - the operand that the literals are being preduced frompositiveOptions - the options that should be includednegativeOptions - the options that should be excluded
public void processPositiveNegativeOptionLiterals(List<QueryLiteral> inputLiterals,
List<QueryLiteral> positiveLiterals,
List<QueryLiteral> negativeLiterals)
Processes the input literals into two groups: positive literals and negative literals.
Negative literals are those which have a negative Long value, which when inverted correctly maps to the id of an option in the system.
All other literals, including EMPTY literals, are positive literals.
If a negative literal is encountered, a new QueryLiteral with the
inverse Long value is added to the list.
inputLiterals - the literals to processpositiveLiterals - a list of positive literals to add to when processingnegativeLiterals - a list of negative literals to add to when processingpublic boolean isNegativeLiteral(QueryLiteral literal)
Option that should be excluded from the result.
literal - the QueryLiteral to check is negative.
QueryLiteral represents an Option to be
excluded from the results. False otherwise.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||