|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
@NotThreadSafe public interface JqlClauseBuilder
A builder used to construct the Where Clause
portion of a JQL Query
in a fluent programming
structure. JQL queries can be defined as one or more terminal clauses, seperated by logical operators, where terminal clauses
define value conditions on specific fields.
reporter()
)
and short cuts for common terminal clauses (e.g. unresolved()
which produce the terminal clause resolution = Unresolved
.
But also allows the programmer to define his terminal clause components manually, for example
builder.field("cf[100]").in().strings("jql", "rocks").buildQuery()
, this is useful for custom fields.
To build Where Clauses with more than one terminal clause, the logical operators must be defined by the programmer between
each call to a terminal clause method, or a default operator must be set. For example to produce the JQL project = HSP and issuetype = bug
the builder would be used as such builder.project("HSP").and().issueType("bug").buildQuery()
or
builder.defaultAnd().project("HSP").issueType("bug").buildQuery()
. Not defining the operator, such as
builder.project("HSP").issueType("bug").buildQuery()
will cause an illegal state exception.
Different logical operators can be specified by the programmer by using the ConditionBuilder
returned by the field
level methods such as project()
. For instance to create the terminal clause component != searching
the programmer would use
the builder as such builder.component().notEq().string("searching")
.
By default the builder uses the standard order of precedence. However if the programmer wishes to define their own order,
they can make use of the sub()
and endsub()
methods, which effectively add opening and closing parenthesis to
the JQL respectively. For instance to create the JQL (resolution is unresolved and assignee is empty) or resolution = fixed
the programmer would use the builder as such builder.sub().field("resolution").and.assigneeIsEmpty().endsub().or().resolution().eq("fixed")
Generally, it is not possible to passs nulls, empty collections, empty arrays, collections that contain nulls, or arrays
that contain nulls to the method on the interface. Any exceptions to these argument conditions are documented on the method concern.
Passing a method a bad argument will result in a IllegalArgumentException
.
JQL values are of two types String
and Long
. For fields that are resolvable by both Id's and Names (e.g.
projects, versions, issue types, components, options etc), the order of resolution depends on the value type. If the JQL
value type is long, JIRA will first attempt to find the domain object by Id, if that fails, it will attempt to find
the domain object by name with the string value of the long. If the JQL value type is a String, JIRA will first try to find
the domain object by name, if that fails AND the string can be parsed into a number, JIRA attempts to find the domain object by
id with that number.
Method Summary | |
---|---|
JqlClauseBuilder |
addClause(Clause clause)
Add the passed JQL condition to the query being built. |
ConditionBuilder |
addCondition(String clauseName)
Return a ConditionBuilder that can be used to build a JQL condition for
the passed JQL name. |
JqlClauseBuilder |
addCondition(String clauseName,
Collection<? extends Operand> operands)
Add the JQL condition clauseName in (operands) to the query being built. |
JqlClauseBuilder |
addCondition(String clauseName,
Operand... operands)
Add the JQL condition clauseName in (operands) to the query being built. |
JqlClauseBuilder |
addCondition(String clauseName,
Operand operand)
Add the JQL condition clauseName = operand to the query being built. |
JqlClauseBuilder |
addCondition(String clauseName,
Operator operator,
Collection<? extends Operand> operands)
Add the JQL condition clauseName operator (operands) to the query being built. |
JqlClauseBuilder |
addCondition(String clauseName,
Operator operator,
Operand... operands)
Add the JQL condition clauseName operator (operands) to the query being built. |
JqlClauseBuilder |
addCondition(String clauseName,
Operator operator,
Operand operand)
Add the JQL condition clauseName operator operand to the query being built. |
JqlClauseBuilder |
addDateCondition(String clauseName,
Collection<Date> dates)
Add the JQL condition clauseName in (dates) to the query being built. |
JqlClauseBuilder |
addDateCondition(String clauseName,
Date... dates)
Add the JQL condition clauseName in (dates) to the query being built. |
JqlClauseBuilder |
addDateCondition(String clauseName,
Operator operator,
Collection<Date> dates)
Add the JQL condition clauseName operator (clauseValues) to the query being built. |
JqlClauseBuilder |
addDateCondition(String clauseName,
Operator operator,
Date... dates)
Add the JQL condition clauseName operator (clauseValues) to the query being built. |
JqlClauseBuilder |
addDateCondition(String clauseName,
Operator operator,
Date date)
Add the JQL condition clausename operator date to the query being built. |
JqlClauseBuilder |
addDateRangeCondition(String clauseName,
Date startDate,
Date endDate)
Add a condition range condition to the current query for the passed dates. |
JqlClauseBuilder |
addEmptyCondition(String clauseName)
Add an "IS EMPTY" condition to the current query for the passed JQL clause. |
JqlClauseBuilder |
addFunctionCondition(String clauseName,
Operator operator,
String functionName)
Add the JQL condition clauseName operator functionName() to the query being built. |
JqlClauseBuilder |
addFunctionCondition(String clauseName,
Operator operator,
String functionName,
Collection<String> args)
Add the JQL condition clauseName operator functionName(arg1, arg2, arg3, ..., argN) to the query being
built. |
JqlClauseBuilder |
addFunctionCondition(String clauseName,
Operator operator,
String functionName,
String... args)
Add the JQL condition clauseName operator functionName(arg1, arg2, arg3, ..., argN) to the query being
built. |
JqlClauseBuilder |
addFunctionCondition(String clauseName,
String functionName)
Add the JQL condition clauseName = functionName() to the query being built. |
JqlClauseBuilder |
addFunctionCondition(String clauseName,
String functionName,
Collection<String> args)
Add the JQL condition clauseName = functionName(arg1, arg2, arg3, ..., argN) to the query being built. |
JqlClauseBuilder |
addFunctionCondition(String clauseName,
String functionName,
String... args)
Add the JQL condition clauseName = functionName(arg1, arg2, arg3, ..., argN) to the query being built. |
JqlClauseBuilder |
addNumberCondition(String clauseName,
Collection<Long> clauseValues)
Add the JQL condition clauseName in (clauseValues) to the query being built. |
JqlClauseBuilder |
addNumberCondition(String clauseName,
Long... clauseValues)
Add the JQL condition clauseName in (clauseValues) to the query being built. |
JqlClauseBuilder |
addNumberCondition(String clauseName,
Long clauseValue)
Add the JQL condition clauseName = clauseValue to the query being built. |
JqlClauseBuilder |
addNumberCondition(String clauseName,
Operator operator,
Collection<Long> clauseValues)
Add the JQL condition clauseName operator (clauseValues) to the query being built. |
JqlClauseBuilder |
addNumberCondition(String clauseName,
Operator operator,
Long... clauseValues)
Add the JQL condition clauseName operator (clauseValues) to the query being built. |
JqlClauseBuilder |
addNumberCondition(String clauseName,
Operator operator,
Long clauseValue)
Add the JQL condition clauseName operator clauseValue to the query being built. |
JqlClauseBuilder |
addNumberRangeCondition(String clauseName,
Long start,
Long end)
Add a condition range condition to the current query for the passed values. |
JqlClauseBuilder |
addRangeCondition(String clauseName,
Operand start,
Operand end)
Add a condition range condition to the current query for the passed values. |
JqlClauseBuilder |
addStringCondition(String clauseName,
Collection<String> clauseValues)
Add the JQL condition clauseName in (clauseValues) to the query being built. |
JqlClauseBuilder |
addStringCondition(String clauseName,
Operator operator,
Collection<String> clauseValues)
Add the JQL condition clauseName operator (clauseValues) to the query being built. |
JqlClauseBuilder |
addStringCondition(String clauseName,
Operator operator,
String... clauseValues)
Add the JQL condition clauseName operator (clauseValues) to the query being built. |
JqlClauseBuilder |
addStringCondition(String clauseName,
Operator operator,
String clauseValue)
Add the JQL condition clauseName operator "clauseValue" to the query being built. |
JqlClauseBuilder |
addStringCondition(String clauseName,
String... clauseValues)
Add the JQL condition clauseName in (clauseValues) to the query being built. |
JqlClauseBuilder |
addStringCondition(String clauseName,
String clauseValue)
Add the JQL condition clauseName = "clauseValue" to the query being built. |
JqlClauseBuilder |
addStringRangeCondition(String clauseName,
String start,
String end)
Add a condition range condition to the current query for the passed values. |
ConditionBuilder |
affectedVersion()
Return a ConditionBuilder that can be used to build a JQL condition for
the affected version. |
JqlClauseBuilder |
affectedVersion(String... versions)
Add a condition to the query that finds the issues associated particular set of affected versions. |
JqlClauseBuilder |
affectedVersion(String version)
Add a condtion to the query that finds the issues associated with a particular affected version. |
JqlClauseBuilder |
affectedVersionIsEmpty()
Adds adds a condition to the query to find issues with no assigned affected version. |
JqlClauseBuilder |
and()
Add the JQL "AND" operator to the JQL expression currently being built. |
ConditionBuilder |
assignee()
Return a ConditionBuilder that can be used to build a JQL condition for
the issue's assignee. |
JqlClauseBuilder |
assigneeInGroup(String groupName)
Add a condition to the query that finds all issues that are assigned to users in a particular group. |
JqlClauseBuilder |
assigneeIsCurrentUser()
Add a condition to the query that finds all issues that are assigned to the current user. |
JqlClauseBuilder |
assigneeIsEmpty()
Add a condition to the query to find all unassigned issues. |
JqlClauseBuilder |
assigneeUser(String userName)
Add a condition to the query that finds issues that are assigned to the passed user. |
Clause |
buildClause()
Create the JQL clause the builder has currently constructed. |
Query |
buildQuery()
Call this method to build a Query using the current builder. |
ConditionBuilder |
category()
Return a ConditionBuilder that can be used to build a JQL condition for
issue's in a particular project category. |
JqlClauseBuilder |
category(String... categories)
Add a condition to the query that finds the issues from projects within a list of project categories. |
JqlClauseBuilder |
clear()
Reset the builder to its empty state. |
ConditionBuilder |
comment()
Return a ConditionBuilder that can be used to build a JQL condition for
issue comments. |
JqlClauseBuilder |
comment(String value)
Add a condition to the query that finds the issues that match the passed comment. |
ConditionBuilder |
component()
Return a ConditionBuilder that can be used to build a JQL condition for
the issue's component. |
JqlClauseBuilder |
component(Long... components)
Add a condition to the query to find all issues with particular components. |
JqlClauseBuilder |
component(String... components)
Add a condition to the query to find all issues with particular components. |
JqlClauseBuilder |
componentIsEmpty()
Add a condition to the query to find all issues that have not component assigned. |
ConditionBuilder |
created()
Return a ConditionBuilder that can be used to build a JQL condition for
issue's creation date. |
JqlClauseBuilder |
createdAfter(Date startDate)
Add a condition to the query that finds the issues that were created after the passed date. |
JqlClauseBuilder |
createdAfter(String startDate)
Add a condition to the query that finds the issues that were created after the passed date. |
JqlClauseBuilder |
createdBetween(Date startDate,
Date endDate)
Add a condition to the query that finds the issues that where created between the passed dates. |
JqlClauseBuilder |
createdBetween(String startDateString,
String endDateString)
Add a condition to the query that finds the issues that where created between the passed dates. |
ConditionBuilder |
currentEstimate()
Return a ConditionBuilder that can be used to build a JQL condition for
the issue's current estimate. |
ConditionBuilder |
customField(Long id)
Return a ConditionBuilder that can be used to build a JQL condition for
a custom field with the passed id. |
JqlClauseBuilder |
defaultAnd()
Tell the builder to combine JQL conditions using the "AND" operator when none has been specified. |
JqlClauseBuilder |
defaultNone()
Tell the builder to stop injecting JQL "AND" or "OR" operators automatically between the generated JQL conditions. |
JqlClauseBuilder |
defaultOr()
Tell the builder to combine JQL conditions using the "OR" operator when none has been specified. |
ConditionBuilder |
description()
Return a ConditionBuilder that can be used to build a JQL condition for
issue descriptions. |
JqlClauseBuilder |
description(String value)
Add a condition to the query that finds the issues that match the passed description. |
JqlClauseBuilder |
descriptionIsEmpty()
Add a condition to the query that finds the issues that have no description. |
ConditionBuilder |
due()
Return a ConditionBuilder that can be used to build a JQL condition for
issue's due date. |
JqlClauseBuilder |
dueAfter(Date startDate)
Add a condition to the query that finds the issues that are due after the passed date. |
JqlClauseBuilder |
dueAfter(String startDate)
Add a condition to the query that finds the issues that are due after the passed date. |
JqlClauseBuilder |
dueBetween(Date startDate,
Date endDate)
Add a condition to the query that finds the issues that where due between the passed dates. |
JqlClauseBuilder |
dueBetween(String startDateString,
String endDateString)
Add a condition to the query that finds the issues that where due between the passed dates. |
JqlClauseBuilder |
endsub()
End the current sub JQL expression. |
JqlQueryBuilder |
endWhere()
Call this to get a handle on the associated JqlQueryBuilder . |
ConditionBuilder |
environment()
Return a ConditionBuilder that can be used to build a JQL condition for
issue environments. |
JqlClauseBuilder |
environment(String value)
Add a condition to the query that finds the issues that match the passed environment. |
JqlClauseBuilder |
environmentIsEmpty()
Add a condition to the query that finds the issues that have no environment. |
ConditionBuilder |
field(String jqlName)
Return a ConditionBuilder that can be used to build a JQL condition for
the passed name. |
ConditionBuilder |
fixVersion()
Return a ConditionBuilder that can be used to build a JQL condition for
the fix version. |
JqlClauseBuilder |
fixVersion(Long... versions)
Add a condition to the query that finds the issues associated particular set of fix versions. |
JqlClauseBuilder |
fixVersion(Long version)
Add a condtion to the query that finds the issues associated with a particular fix version. |
JqlClauseBuilder |
fixVersion(String... versions)
Add a condition to the query that finds the issues associated particular set of fix versions. |
JqlClauseBuilder |
fixVersion(String version)
Add a condtion to the query that finds the issues associated with a particular fix version. |
JqlClauseBuilder |
fixVersionIsEmpty()
Adds adds a condition to the query to find issues with no assigned fix version. |
ConditionBuilder |
issue()
Return a ConditionBuilder that can be used to build a JQL condition for
the issue's id or key. |
JqlClauseBuilder |
issue(String... keys)
Add a condition to the query that will find all issues with the passed key. |
JqlClauseBuilder |
issueInHistory()
Add a condition to the query that will find all issues currently within the user's history. |
JqlClauseBuilder |
issueInVotedIssues()
Add a condition to the query that will find all issues the user has voted on. |
JqlClauseBuilder |
issueInWatchedIssues()
Add a condition to the query that will find all issues currently watched by the user. |
ConditionBuilder |
issueParent()
Return a ConditionBuilder that can be used to build a JQL condition for
the issue's parent. |
JqlClauseBuilder |
issueParent(String... keys)
Add a condition to the query that will find all issues that have the passed issues as parents. |
ConditionBuilder |
issueType()
Return a ConditionBuilder that can be used to build a JQL condition for
issue types. |
JqlClauseBuilder |
issueType(String... types)
Add a condition to the query that finds the issues of a particular type. |
JqlClauseBuilder |
issueTypeIsStandard()
Add a condition to the query that finds the "standard" issue types. |
JqlClauseBuilder |
issueTypeIsSubtask()
Add a condition to the query that finds the "sub-task" issue types. |
ConditionBuilder |
labels()
Return a ConditionBuilder that can be used to build a JQL condition for
the issue's labels. |
JqlClauseBuilder |
labels(String... labels)
Add a condition to the query to find all issues with particular labels. |
JqlClauseBuilder |
labelsIsEmpty()
Add a condition to the query to find all issues that have no labels. |
ConditionBuilder |
level()
Return a ConditionBuilder that can be used to build a JQL condition for
the issue's security level. |
JqlClauseBuilder |
level(String... levels)
Add a condition to the query that will find all issues with the passed security levels. |
JqlClauseBuilder |
not()
Add the JQL "NOT" operator to the JQL expression currently being built. |
JqlClauseBuilder |
or()
Add the JQL "OR" operator to the JQL expression currently being built. |
ConditionBuilder |
originalEstimate()
Return a ConditionBuilder that can be used to build a JQL condition for
the issue's original estimate. |
ConditionBuilder |
priority()
Return a ConditionBuilder that can be used to build a JQL condition for
the priority. |
JqlClauseBuilder |
priority(String... priorities)
Add a condition to the query that finds the issues associated particular set of priorities. |
ConditionBuilder |
project()
Return a ConditionBuilder that can be used to build a JQL condition for
an issue's project. |
JqlClauseBuilder |
project(Long... pids)
Add a condition to the query that finds the issues within a particular project. |
JqlClauseBuilder |
project(String... projects)
Add a condition to the query that finds the issues within a particular project. |
ConditionBuilder |
reporter()
Return a ConditionBuilder that can be used to build a JQL condition for
the issue's reporter. |
JqlClauseBuilder |
reporterInGroup(String groupName)
Add a condition to the query that finds all issues that were reported by users in a particular group. |
JqlClauseBuilder |
reporterIsCurrentUser()
Add a condition to the query that finds all issues that were reported by the current user. |
JqlClauseBuilder |
reporterIsEmpty()
Add a condition to the query to find issues without a reporter. |
JqlClauseBuilder |
reporterUser(String userName)
Add a condition to the query that finds issues that where reported by the passed user. |
ConditionBuilder |
resolution()
Return a ConditionBuilder that can be used to build a JQL condition for
resolution. |
JqlClauseBuilder |
resolution(String... resolutions)
Add a condition to the query that finds the issues associated particular set of resolutions. |
ConditionBuilder |
resolutionDate()
Return a ConditionBuilder that can be used to build a JQL condition for
issue's resolution date. |
JqlClauseBuilder |
resolutionDateAfter(Date startDate)
Add a condition to the query that finds the issues that were reolved after the passed date. |
JqlClauseBuilder |
resolutionDateAfter(String startDate)
Add a condition to the query that finds the issues that were resolved after the passed date. |
JqlClauseBuilder |
resolutionDateBetween(Date startDate,
Date endDate)
Add a condition to the query that finds the issues that where resolved between the passed dates. |
JqlClauseBuilder |
resolutionDateBetween(String startDateString,
String endDateString)
Add a condition to the query that finds the issues that where resolved between the passed dates. |
ConditionBuilder |
savedFilter()
Return a ConditionBuilder that can be used to add saved filters as conditions
to the query. |
JqlClauseBuilder |
savedFilter(String... filters)
Add a condition to the query that will inclue the results from the passed filters in the search. |
ConditionBuilder |
status()
Return a ConditionBuilder that can be used to build a JQL condition for
status. |
JqlClauseBuilder |
status(String... statuses)
Add a condition to the query that finds the issues associated particular set of statuses. |
JqlClauseBuilder |
sub()
Create a new sub expression in the current JQL. |
ConditionBuilder |
summary()
Return a ConditionBuilder that can be used to build a JQL condition for
issue summaries. |
JqlClauseBuilder |
summary(String value)
Add a condition to the query that finds the issues match the passed summary. |
ConditionBuilder |
timeSpent()
Return a ConditionBuilder that can be used to build a JQL condition for
the issue's timespent field. |
JqlClauseBuilder |
unresolved()
Add a condition to query that finds the issues that have not been resolved. |
ConditionBuilder |
updated()
Return a ConditionBuilder that can be used to build a JQL condition for
issue's updated date. |
JqlClauseBuilder |
updatedAfter(Date startDate)
Add a condition to the query that finds the issues that were updated after the passed date. |
JqlClauseBuilder |
updatedAfter(String startDate)
Add a condition to the query that finds the issues that were updated after the passed date. |
JqlClauseBuilder |
updatedBetween(Date startDate,
Date endDate)
Add a condition to the query that finds the issues that where updated between the passed dates. |
JqlClauseBuilder |
updatedBetween(String startDateString,
String endDateString)
Add a condition to the query that finds the issues that where updated between the passed dates. |
ConditionBuilder |
voter()
Return a ConditionBuilder that can be used to build a JQL condition for
the number of votes on an issue. |
JqlClauseBuilder |
voterInGroup(String groupName)
Add a condition to the query that finds all issues that were voted for by users in a particular group. |
JqlClauseBuilder |
voterIsCurrentUser()
Add a condition to the query that finds all issues that were voted for by the current user. |
JqlClauseBuilder |
voterIsEmpty()
Add a condition to the query to find issues without any votes. |
JqlClauseBuilder |
voterUser(String userName)
Add a condition to the query that finds issues that are voted for by the passed user. |
ConditionBuilder |
votes()
Return a ConditionBuilder that can be used to build a JQL condition for
the number of votes on an issue. |
ConditionBuilder |
watcher()
Return a ConditionBuilder that can be used to build a JQL condition for
the number of watches on an issue. |
JqlClauseBuilder |
watcherInGroup(String groupName)
Add a condition to the query that finds all issues that were watched by users in a particular group. |
JqlClauseBuilder |
watcherIsCurrentUser()
Add a condition to the query that finds all issues that were watched by the current user. |
JqlClauseBuilder |
watcherIsEmpty()
Add a condition to the query to find issues without any watchers. |
JqlClauseBuilder |
watcherUser(String userName)
Add a condition to the query that finds issues that are watched by the passed user. |
ConditionBuilder |
watches()
Return a ConditionBuilder that can be used to build a JQL condition for
the number of watches on an issue. |
ConditionBuilder |
workRatio()
Return a ConditionBuilder that can be used to build a JQL condition for
the issue's work ratio field. |
Method Detail |
---|
JqlQueryBuilder endWhere()
JqlQueryBuilder
.
JqlQueryBuilder
. Null may be returned to indicate
there is no associated builder.Query buildQuery()
Query
using the current builder. When endWhere()
is not null, this
equates to calling endWhere().buildQuery()
. When endWhere()
is null, this equates to calling
new QueryImpl(buildClause())
.
IllegalStateException
- if it is not possible to build the current query given the state of the builder.JqlClauseBuilder clear()
JqlClauseBuilder defaultAnd()
and()
or or()
is placed between calls to create JQL
conditions. Calling this method on the builder tells it to automatically add a JQL "AND"
between JQL conditions when no calls to either and
or or
have been made. This mode will remain
active until one of defaultNone()
, defaultOr()
or clear()
is called.
While in this mode it is still possible to explicitly call and
or or
to overide the default
operator for the current condition.
For example builder.where().assigneeIsEmpty().or().defaultAnd().reporterIsCurrentUser().affectedVersion("10.5").defaultOr().issueType("bug").buildQuery()
will build the JQL query "assignee is empty or reporter = currentUser() and affectedVersion = '10.5' or issuetype = bug".
JqlClauseBuilder defaultOr()
and()
or or()
is placed between calls to create JQL
conditions. Calling this method on the builder tells it to automatically add a JQL "OR"
between JQL conditions when no calls to either and
or or
have been made. This mode will remain
active until one of defaultNone()
, defaultAnd()
or clear()
is called.
While in this mode it is still possible to explicitly call and
or or
to overide the default
operator for the current condition.
For example builder.where().assigneeIsEmpty().and().defaultOr().reporterIsCurrentUser().affectedVersion("10.5").defaultOr().issueType("bug").buildQuery()
will build the JQL query "assignee is empty and reporter = currentUser() or affectedVersion = '10.5' or issuetype = bug".
JqlClauseBuilder defaultNone()
defaultAnd()
or defaultOr()
.
JqlClauseBuilder and()
sub()
and endsub()
calls. For example, builder.not().affectedVersion("11").and().effectedVersion("12")
produces the JQL NOT (affectedVersion = "11") and affectedVersion = "12"
as the "NOT"
operator
has a higher precedence than "AND". On the other hand, builder.not().sub().affectedVersion("11").and().effectedVersion("12").endsub()
produces the JQL NOT(affectedVersion = "11" andaffectedVersion = "12")
.
IllegalStateException
- if it is not possible to add the AND operator given the current state of the
builder.JqlClauseBuilder or()
sub()
and endsub()
calls. For example, builder.issueType("bug").and().affectedVersion("11").or().affectedVersion("12")
produces the JQL (issueType = "bug" andaffectedVersion = "11") or affectedVersion = "12"
as the "AND" operator
has a higher precedence than "OR". On the other hand, builder.issueType("bug").and().sub().affectedVersion("11").or().affectedVersion("12").endsub()
produces the JQL
issueType = "bug" and (affectedVersion = "11" or affectedVersion = "12")
.
IllegalStateException
- if it is not possible to add the OR operator given the current state of the
builder.JqlClauseBuilder not()
sub()
and endsub()
calls. For example, builder.not().affectedVersion("11").and().effectedVersion("12")
produces the JQL NOT (affectedVersion = "11") and affectedVersion = "12"
as the and()
"AND"
operator} has a lower precedence than "NOT". On the other hand, builder.not().sub().affectedVersion("11").and().effectedVersion("12").endsub()
produces the JQL NOT(affectedVersion = "11" andaffectedVersion = "12")
.
IllegalStateException
- if it is not possible to add the NOT operator given the current state of the
builder.JqlClauseBuilder sub()
close bracket
are grouped together. This
can be used to override JQL's precedence rules. For example, builder.sub().affectedVersion("12").or().affectedVersion("11").endsub().and().issueType("bug")
will produce the JQL query (affectedVersion = "12" oraffectedVersion = "12") and type = "bug"
.
IllegalStateException
- if it is not possible to create a sub JQL expression given the current state of the
builder.JqlClauseBuilder endsub()
open bracket
.
IllegalStateException
- if there is not current sub expression to close, that is, there is no matching call
to sub()
.sub()
JqlClauseBuilder affectedVersion(String version)
affectedVersion = "value"
to the query being built.
version
- the version to search for. Can be passed as its name (e.g. "1.2") or the string representation of
its internal JIRA ID (e.g. "102020"). Must not be null.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder affectedVersion(String... versions)
affectedVersion in (versions)
to the query being built.
versions
- the affected versions to search for. Each version can be specified either by its name (e.g.
"1.2") or by its JIRA ID as a string (e.g. "10000"). Must not be null, empty or contain any null values.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder affectedVersionIsEmpty()
affectedVersion IS EMPTY
to the query being built.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.ConditionBuilder affectedVersion()
ConditionBuilder
that can be used to build a JQL condition for
the affected version.
JqlClauseBuilder fixVersion(String version)
fixVersion = "value"
to the query being built.
version
- the version to search for. Can be passed as its name (e.g. "1.2") or the string representation of
its internal JIRA ID (e.g. "102020"). Must not be null.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder fixVersion(String... versions)
fixVersion in (versions)
to the query being built.
versions
- the fix versions to search for. Each version can be specified either by its name (e.g. "1.2") or
by its JIRA ID as a string (e.g. "10000"). Must not be null, empty or contain any null values.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder fixVersion(Long version)
fixVersion = version
to the query being built.
version
- the version to search for. Must not be null.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder fixVersion(Long... versions)
fixVersion in (versions)
to the query being built.
versions
- the fix versions to search for. Must not be null, empty or contain any null values.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder fixVersionIsEmpty()
fixVersion IS EMPTY
to the query being built.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.ConditionBuilder fixVersion()
ConditionBuilder
that can be used to build a JQL condition for
the fix version.
JqlClauseBuilder priority(String... priorities)
priority in (priorities)
to the query being built.
priorities
- the JIRA priorities to search for. Each priority can be specified either by its name (e.g.
"Major") or by its JIRA ID as a string (e.g. "10000"). Must not be null, empty or contain any null values.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.ConditionBuilder priority()
ConditionBuilder
that can be used to build a JQL condition for
the priority.
JqlClauseBuilder resolution(String... resolutions)
resolution in (resultions)
to the query being built.
resolutions
- the JIRA resolutions to search for. Each resolution can be specified either by its name (e.g.
"Resolved") or by its JIRA ID as a string (e.g. "10000"). Must not be null, empty or contain any null values.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder unresolved()
resolution IS EMPTY
to the query being built.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.ConditionBuilder resolution()
ConditionBuilder
that can be used to build a JQL condition for
resolution.
JqlClauseBuilder status(String... statuses)
status in (statuses)
to the query being built.
statuses
- the JIRA statuses to search for. Each status can be specified either by its name (e.g. "Won't
Fix") or by its JIRA ID as a string (e.g. "10000"). Must not be null, empty or contain any null values.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.ConditionBuilder status()
ConditionBuilder
that can be used to build a JQL condition for
status.
JqlClauseBuilder issueType(String... types)
issuetype in (types)
to the query being built.
types
- the JIRA issue types to search for. Each type can be specified either by its name (e.g. "Bug") or by
its JIRA ID as a string (e.g. "10000"). Must not be null, empty or contain any null values.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder issueTypeIsStandard()
issuetype in standardIssueTypes()
to the query being
built.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder issueTypeIsSubtask()
issuetype in subTaskIssueTypes()
to the query being built.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.ConditionBuilder issueType()
ConditionBuilder
that can be used to build a JQL condition for
issue types.
JqlClauseBuilder description(String value)
description ~ "value"
to the query being built.
NOTE: The description field performs apporximate text matching not exact text matching.
value
- the value of the condition.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder descriptionIsEmpty()
description IS EMPTY
to the query being built.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.ConditionBuilder description()
ConditionBuilder
that can be used to build a JQL condition for
issue descriptions.
JqlClauseBuilder summary(String value)
summary ~ "value"
to the query being built.
NOTE: The summary field performs apporximate text matching not exact text matching.
value
- the value of the condition.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.ConditionBuilder summary()
ConditionBuilder
that can be used to build a JQL condition for
issue summaries.
JqlClauseBuilder environment(String value)
environment ~ "value"
to the query being built.
NOTE: The environment field performs apporximate text matching not exact text matching.
value
- the value of the condition.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder environmentIsEmpty()
environment IS EMPTY
to the query being built.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.ConditionBuilder environment()
ConditionBuilder
that can be used to build a JQL condition for
issue environments.
JqlClauseBuilder comment(String value)
comment ~ "value"
to the query being built.
NOTE: The comment field performs apporximate text matching not exact text matching.
value
- the value of the condition.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.ConditionBuilder comment()
ConditionBuilder
that can be used to build a JQL condition for
issue comments.
JqlClauseBuilder project(String... projects)
project in (projects)
to the query being built.
projects
- the JIRA projects to search for. Each project can be specified by its name (e.g. "JIRA"), its key
(e.g. "JRA") or by its JIRA ID as a string (e.g. "10000"). Must not be null, empty or contain any null values.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder project(Long... pids)
project in (pids)
to the query being built.
pids
- the JIRA id's of the projects to search for. Cannot be null, empty or contain null values.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.ConditionBuilder project()
ConditionBuilder
that can be used to build a JQL condition for
an issue's project.
JqlClauseBuilder category(String... categories)
category in (categories)
to the query being built.
categories
- the JIRA project categories for the condition. Each project can be specified by its name (e.g.
"Atlassian Products") or by its JIRA ID as a string (e.g. "10000"). Must not be null, empty or contain any null
values.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.ConditionBuilder category()
ConditionBuilder
that can be used to build a JQL condition for
issue's in a particular project category. An issue is in a project category only when it is in a project that is
part of the category.
JqlClauseBuilder createdAfter(Date startDate)
created >= startDate
to the query being built.
startDate
- the date that issues must be created after. Cannot be null.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder createdAfter(String startDate)
created >= startDate
to the query being built.
startDate
- the date that issues must be created after. Can be a date (e.g. "2008-10-23") or a
period (e.g. "-3w"). Cannot be null.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder createdBetween(Date startDate, Date endDate)
created >= startDate AND created <= endDate
to the query being built.
It is also possible to create an open interval by passing one of the arguments as null
. Passing a non-null
startDate
with a null endDate
will add the condition created >= startDate
. Passing a
non-null endDate
with a null startDate
will add the condition created <= endDate
.
Passing a null startDate
and null endDate
is illegal.
startDate
- the date that issues must be created on or after. May be null if endDate
is not null.endDate
- the date that issues must be created on or before. May be null if startDate
is not null.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.
IllegalArgumentException
- if both startDate
and endDate
are null.JqlClauseBuilder createdBetween(String startDateString, String endDateString)
created >= startDateString AND created <= endDateString
to the query being built.
It is also possible to create an open interval by passing one of the arguments as null
. Passing a
non-null startDateString
with a null endDateString
will add the condition created >=
startDateString
. Passing a non-null endDateString
with a null startDateString
will add the
condition created <= endDateString
. Passing a null startDateString
and null endDateString
is illegal.
startDateString
- the date that issues must be created on or after. Can be a date (e.g. "2008-10-23") or a
period (e.g. "-3w"). May be null if endDateString
is not null.endDateString
- the date that issues must be created on or before. Can be a date (e.g. "2008-10-23") or a
period (e.g. "-3w"). May be null if startDateString
is not null.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.
IllegalArgumentException
- if both startDateString
and endDateString
are null.ConditionBuilder created()
ConditionBuilder
that can be used to build a JQL condition for
issue's creation date.
JqlClauseBuilder updatedAfter(Date startDate)
updated >= startDate
to the query being built.
startDate
- the date that issues must be updated after. Cannot be null.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder updatedAfter(String startDate)
updated >= startDate
to the query being built.
startDate
- the date that issues must be updated after. Can be a date (e.g. "2008-10-23") or a
period (e.g. "-3w"). Cannot be null.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder updatedBetween(Date startDate, Date endDate)
updated >= startDate AND updated <= endDate
to the query being built. It is
also possible to create an open interval by passing one of the arguments as null
. Passing a non-null
startDate
with a null endDate
will add the condition updated >= startDate
. Passing a
non-null endDate
with a null startDate
will add the condition updated <= endDate
.
Passing a null startDate
and null endDate
is illegal.
startDate
- the date that issues must be updated on or after. May be null if endDate
is not null.endDate
- the date that issues must be updated on or before. May be null if startDate
is not null.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.
IllegalArgumentException
- if both startDate
and endDate
are null.JqlClauseBuilder updatedBetween(String startDateString, String endDateString)
updated >= startDateString AND updated <= endDateString
to the query being built.
It is also possible to create an open interval by passing one of the arguments as null
. Passing a
non-null startDateString
with a null endDateString
will add the condition updated >=
startDateString
. Passing a non-null endDateString
with a null startDateString
will add the
condition updated <= endDateString
. Passing a null startDateString
and null endDateString
is illegal.
startDateString
- the date that issues must be updated on or after. Can be a date (e.g. "2008-10-23") or a
period (e.g. "-3w"). May be null if endDateString
is not null.endDateString
- the date that issues must be updated on or before. Can be a date (e.g. "2008-10-23") or a
period (e.g. "-3w"). May be null if startDateString
is not null.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.
IllegalArgumentException
- if both startDateString
and endDateString
are null.ConditionBuilder updated()
ConditionBuilder
that can be used to build a JQL condition for
issue's updated date.
JqlClauseBuilder dueAfter(Date startDate)
duedate >= startDate
to the query being built.
startDate
- the date that issues must be due after. Cannot be null.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder dueAfter(String startDate)
duedate >= startDate
to the query being built.
startDate
- the date that issues must be due after. Can be a date (e.g. "2008-10-23") or a
period (e.g. "-3w"). Cannot be null.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder dueBetween(Date startDate, Date endDate)
duedate >= startDate AND duedate <= endDate
to the query being built. It is also
possible to create an open interval by passing one of the arguments as null
. Passing a non-null startDate
with a null endDate
will add the condition duedate >= startDate
. Passing a non-null
endDate
with a null startDate
will add the condition duedate <= endDate
. Passing a
null startDate
and null endDate
is illegal.
startDate
- the date that issues must be due on or after. May be null if endDate
is not null.endDate
- the date that issues must be due on or before. May be null if startDate
is not null.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.
IllegalArgumentException
- if both startDate
and endDate
are null.JqlClauseBuilder dueBetween(String startDateString, String endDateString)
duedate >= startDateString AND duedate <= endDateString
to the query being built. It
is also possible to create an open interval by passing one of the arguments as null
. Passing a non-null
startDateString
with a null endDateString
will add the condition duedate >=
startDateString
. Passing a non-null endDateString
with a null startDateString
will add the
condition duedate <= endDateString
. Passing a null startDateString
and null endDateString
is illegal.
startDateString
- the date that issues must be due on or after. Can be a date (e.g. "2008-10-23") or a
period (e.g. "-3w"). May be null if endDateString
is not null.endDateString
- the date that issues must be due on or before. Can be a date (e.g. "2008-10-23") or a period
(e.g. "-3w"). May be null if startDateString
is not null.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.
IllegalArgumentException
- if both startDateString
and endDateString
are null.ConditionBuilder due()
ConditionBuilder
that can be used to build a JQL condition for
issue's due date.
JqlClauseBuilder resolutionDateAfter(Date startDate)
resolutiondate >= startDate
to the query being built.
startDate
- the date that issues must be resolved after. Cannot be null.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder resolutionDateAfter(String startDate)
resolutiondate >= startDate
to the query being built.
startDate
- the date that issues must be resolved after. Can be a date (e.g. "2008-10-23") or a
period (e.g. "-3w"). Cannot be null.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder resolutionDateBetween(Date startDate, Date endDate)
resolutiondate >= startDate AND resolutiondate <= endDate
to the query being built.
It is also possible to create an open interval by passing one of the arguments as null
. Passing a
non-null startDate
with a null endDate
will add the condition resolutiondate >=
startDate
. Passing a non-null endDate
with a null startDate
will add the condition resolutiondate <= endDate
. Passing a null startDate
and null endDate
is illegal.
startDate
- the date that issues must be resolved on or after. May be null if endDate
is not null.endDate
- the date that issues must be resolved on or before. May be null if startDate
is not null.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.
IllegalArgumentException
- if both startDate
and endDate
are null.JqlClauseBuilder resolutionDateBetween(String startDateString, String endDateString)
resolutiondate >= startDateString AND resolutiondate <= endDateString
to the query
being built. It is also possible to create an open interval by passing one of the arguments as null
.
Passing a non-null startDateString
with a null endDateString
will add the condition resolutiondate >= startDateString
. Passing a non-null endDateString
with a null startDateString
will add the condition resolutiondate <= endDateString
. Passing a null startDateString
and null endDateString
is illegal.
startDateString
- the date that issues must be resolved on or after. Can be a date (e.g. "2008-10-23") or a
period (e.g. "-3w"). May be null if endDateString
is not null.endDateString
- the date that issues must be resolved on or before. Can be a date (e.g. "2008-10-23") or a
period (e.g. "-3w"). May be null if startDateString
is not null.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.
IllegalArgumentException
- if both startDateString
and endDateString
are null.ConditionBuilder resolutionDate()
ConditionBuilder
that can be used to build a JQL condition for
issue's resolution date.
JqlClauseBuilder reporterUser(String userName)
reporter = userName
to the query being built.
userName
- the username to search for. Cannot be null.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder reporterInGroup(String groupName)
reporter in memboersOf("groupName")
to the query being built.
groupName
- the group for the condition. Cannot be null.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder reporterIsCurrentUser()
reporter = currentUser()
to the query being built.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder reporterIsEmpty()
reporter IS EMPTY
to the query being built.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.ConditionBuilder reporter()
ConditionBuilder
that can be used to build a JQL condition for
the issue's reporter.
JqlClauseBuilder assigneeUser(String userName)
assignee = userName
to the query being built.
userName
- the username to search for. Cannot be null.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder assigneeInGroup(String groupName)
assignee in memboersOf("groupName")
to the query being built.
groupName
- the group for the condition. Cannot be null.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder assigneeIsCurrentUser()
assignee = currentUser()
to the query being built.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder assigneeIsEmpty()
assignee IS EMPTY
to the query being built.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.ConditionBuilder assignee()
ConditionBuilder
that can be used to build a JQL condition for
the issue's assignee.
JqlClauseBuilder component(String... components)
component in (components)
to the query.
components
- the JIRA components to search for. Each component can be specified by its name (e.g. "Web") or by
its JIRA ID as a string (e.g. "10000"). Must not be null, empty or contain any null values.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder component(Long... components)
component in (components)
to the query.
components
- the ids of the components to search for. Must not be null, contain nulls or be empty.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder componentIsEmpty()
component IS EMTPY
to the query.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.ConditionBuilder component()
ConditionBuilder
that can be used to build a JQL condition for
the issue's component.
JqlClauseBuilder labels(String... labels)
labels in (labels)
to the query.
labels
- the labels to search for. Must not be null, contain nulls or be empty.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder labelsIsEmpty()
labels IS EMTPY
to the query.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.ConditionBuilder labels()
ConditionBuilder
that can be used to build a JQL condition for
the issue's labels.
JqlClauseBuilder issue(String... keys)
key IN (keys)
to the query.
keys
- the issues keys to search for. Cannot be null, empty or contain any nulls.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder issueInHistory()
key IN issueHistory()
to the query.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder issueInWatchedIssues()
key IN watchedIssues()
to the query.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder issueInVotedIssues()
key IN votedIssues()
to the query.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.ConditionBuilder issue()
ConditionBuilder
that can be used to build a JQL condition for
the issue's id or key.
JqlClauseBuilder issueParent(String... keys)
parent IN (keys)
to the query.
keys
- the issues keys to search for. Cannot be null, empty or contain any nulls.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.ConditionBuilder issueParent()
ConditionBuilder
that can be used to build a JQL condition for
the issue's parent.
ConditionBuilder currentEstimate()
ConditionBuilder
that can be used to build a JQL condition for
the issue's current estimate.
ConditionBuilder originalEstimate()
ConditionBuilder
that can be used to build a JQL condition for
the issue's original estimate.
ConditionBuilder timeSpent()
ConditionBuilder
that can be used to build a JQL condition for
the issue's timespent field.
ConditionBuilder workRatio()
ConditionBuilder
that can be used to build a JQL condition for
the issue's work ratio field.
JqlClauseBuilder level(String... levels)
level IN (levels)
to the query.
levels
- the security levels to search for. Cannot be null, empty or contain nulls.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.ConditionBuilder level()
ConditionBuilder
that can be used to build a JQL condition for
the issue's security level.
JqlClauseBuilder savedFilter(String... filters)
filter IN (filters)
to the condition.
filters
- the filters to include in the search. They can be specified by the name (e.g. "JIRA Unresolved") or
by their JIRA id (e.g. "10000"). Cannot be null, empty or contain any nulls.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.ConditionBuilder savedFilter()
ConditionBuilder
that can be used to add saved filters as conditions
to the query.
ConditionBuilder votes()
ConditionBuilder
that can be used to build a JQL condition for
the number of votes on an issue.
JqlClauseBuilder voterUser(String userName)
voter = userName
to the query being built.
userName
- the username to search for. Cannot be null.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder voterInGroup(String groupName)
voter in membersOf("groupName")
to the query being built.
groupName
- the group for the condition. Cannot be null.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder voterIsCurrentUser()
voter = currentUser()
to the query being built.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder voterIsEmpty()
voter IS EMPTY
to the query being built.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.ConditionBuilder voter()
ConditionBuilder
that can be used to build a JQL condition for
the number of votes on an issue.
ConditionBuilder watches()
ConditionBuilder
that can be used to build a JQL condition for
the number of watches on an issue.
JqlClauseBuilder watcherUser(String userName)
watcher = userName
to the query being built.
userName
- the username to search for. Cannot be null.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder watcherInGroup(String groupName)
watcher in membersOf("groupName")
to the query being built.
groupName
- the group for the condition. Cannot be null.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder watcherIsCurrentUser()
watcher = currentUser()
to the query being built.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder watcherIsEmpty()
watcher IS EMPTY
to the query being built.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.ConditionBuilder watcher()
ConditionBuilder
that can be used to build a JQL condition for
the number of watches on an issue.
ConditionBuilder field(String jqlName)
ConditionBuilder
that can be used to build a JQL condition for
the passed name.
jqlName
- the name of the JQL condition. Cannot be null.
ConditionBuilder customField(Long id)
ConditionBuilder
that can be used to build a JQL condition for
a custom field with the passed id.
id
- the ID for the custom field. Cannot be null.
JqlClauseBuilder addClause(Clause clause)
clause
- the clause to add. Must not be null.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder addDateCondition(String clauseName, Operator operator, Date date)
clausename operator date
to the query being built.
clauseName
- name of the clause in the condition. Must not be null.operator
- one of the enumerated Operator
s. Must not be null.date
- the date for the condition. Must not be null.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder addDateCondition(String clauseName, Date... dates)
clauseName in (dates)
to the query being built.
clauseName
- name of the clause in the condition. Must not be null.dates
- dates for the condition. Must not be null, empty or contain any null values.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder addDateCondition(String clauseName, Operator operator, Date... dates)
clauseName operator (clauseValues)
to the query being built.
clauseName
- name of the clause in the condition. Must not be null.operator
- one of the enumerated Operator
s. Must not be null.dates
- date values for the condition. Must not be null, empty or contain any null values.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder addDateCondition(String clauseName, Collection<Date> dates)
clauseName in (dates)
to the query being built.
clauseName
- name of the clause in the condition. Must not be null.dates
- dates for the condition. Must not be null, empty or contain any null values.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder addDateCondition(String clauseName, Operator operator, Collection<Date> dates)
clauseName operator (clauseValues)
to the query being built.
clauseName
- name of the clause in the condition. Must not be null.operator
- one of the enumerated Operator
s. Must not be null.dates
- date values for the condition. Must not be null, empty or contain any null values.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder addDateRangeCondition(String clauseName, Date startDate, Date endDate)
clauseName >= startDate AND clauseName <= endDate
to the query being built. It is also possible to
create an open interval by passing one of the arguments as null
. Passing a non-null startDate
with a null endDate
will add the condition clauseName >= startDate
. Passing a non-null endDate
with a null startDate
will add the condition clauseName <= endDate
. Passing a null
startDate
and null endDate
is illegal.
clauseName
- name of the clause in the condition. Must not be null.startDate
- the date for the start of the range. May be null if endDate
is not null.endDate
- the date for the end of the range. May be null if startDate
is not null.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.
IllegalArgumentException
- if both startDate
and endDate
are null.JqlClauseBuilder addFunctionCondition(String clauseName, String functionName)
clauseName = functionName()
to the query being built.
clauseName
- name of the clause in the condition. Must not be null.functionName
- name of the function to call. Must not be null.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder addFunctionCondition(String clauseName, String functionName, String... args)
clauseName = functionName(arg1, arg2, arg3, ..., argN)
to the query being built.
clauseName
- name of the clause in the condition. Must not be null.functionName
- name of the function to call. Must not be null.args
- the arguments to add to the function. Must not be null or contain any null values.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder addFunctionCondition(String clauseName, String functionName, Collection<String> args)
clauseName = functionName(arg1, arg2, arg3, ..., argN)
to the query being built.
clauseName
- name of the clause in the condition. Must not be null.functionName
- name of the function to call. Must not be null.args
- the arguments to add to the function. Must not be null or contain any null values.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder addFunctionCondition(String clauseName, Operator operator, String functionName)
clauseName operator functionName()
to the query being built.
clauseName
- name of the clause in the condition. Must not be null.operator
- one of the enumerated Operator
s. Must not be null.functionName
- name of the function to call. Must not be null.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder addFunctionCondition(String clauseName, Operator operator, String functionName, String... args)
clauseName operator functionName(arg1, arg2, arg3, ..., argN)
to the query being
built.
clauseName
- name of the clause in the condition. Must not be null.operator
- one of the enumerated Operator
s. Must not be null.functionName
- name of the function to call. Must not be null.args
- the arguments to add to the function. Must not be null or contain any null values.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder addFunctionCondition(String clauseName, Operator operator, String functionName, Collection<String> args)
clauseName operator functionName(arg1, arg2, arg3, ..., argN)
to the query being
built.
clauseName
- name of the clause in the condition. Must not be null.operator
- one of the enumerated Operator
s. Must not be null.functionName
- name of the function to call. Must not be null.args
- the arguments to add to the function. Must not be null or contain any null values.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder addStringCondition(String clauseName, String clauseValue)
clauseName = "clauseValue"
to the query being built.
clauseName
- name of the clause in the condition. Must not be null.clauseValue
- string value for the condition. Must not be null.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder addStringCondition(String clauseName, String... clauseValues)
clauseName in (clauseValues)
to the query being built.
clauseName
- name of the clause in the condition. Must not be null.clauseValues
- string values for the condition. Must not be null, empty or contain any null values.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder addStringCondition(String clauseName, Collection<String> clauseValues)
clauseName in (clauseValues)
to the query being built.
clauseName
- name of the clause in the condition. Must not be null.clauseValues
- string values for the condition. Must not be null, empty or contain any null values.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder addStringCondition(String clauseName, Operator operator, String clauseValue)
clauseName operator "clauseValue"
to the query being built.
clauseName
- name of the clause in the condition. Must not be null.operator
- one of the enumerated Operator
s. Must not be null.clauseValue
- string value for the condition. Must not be null.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder addStringCondition(String clauseName, Operator operator, String... clauseValues)
clauseName operator (clauseValues)
to the query being built.
clauseName
- name of the clause in the condition. Must not be null.operator
- one of the enumerated Operator
s. Must not be null.clauseValues
- string values for the condition. Must not be null, empty or contain any null values.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder addStringCondition(String clauseName, Operator operator, Collection<String> clauseValues)
clauseName operator (clauseValues)
to the query being built.
clauseName
- name of the clause in the condition. Must not be null.operator
- one of the enumerated Operator
s. Must not be null.clauseValues
- string values for the condition. Must not be null, empty or contain any null values.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder addStringRangeCondition(String clauseName, String start, String end)
clauseName >= start AND clauseName <= end
to the query being built. It is also
possible to create an open interval by passing one of the arguments as null
. Passing a non-null start
with a null end
will add the condition clauseName >=
start
. Passing a non-null end
with a null start
will add the
condition clauseName <= end
. Passing a null start
and null end
is illegal.
clauseName
- name of the clause in the condition. Must not be null.start
- the start of the range. May be null if end
is not null.end
- the end of the range. May be null if start
is not null.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.
IllegalArgumentException
- if both start
and end
are null.JqlClauseBuilder addNumberCondition(String clauseName, Long clauseValue)
clauseName = clauseValue
to the query being built.
clauseName
- name of the clause in the condition. Must not be null.clauseValue
- long value for the condition. Must not be null.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder addNumberCondition(String clauseName, Long... clauseValues)
clauseName in (clauseValues)
to the query being built.
clauseName
- name of the clause in the condition. Must not be null.clauseValues
- long values. Must not be null, empty or contain any null values.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder addNumberCondition(String clauseName, Collection<Long> clauseValues)
clauseName in (clauseValues)
to the query being built.
clauseName
- name of the clause in the condition. Must not be null.clauseValues
- long values for the condition. Must not be null, empty or contain any null values.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder addNumberCondition(String clauseName, Operator operator, Long clauseValue)
clauseName operator clauseValue
to the query being built.
clauseName
- name of the clause in the condition. Must not be null.operator
- one of the enumerated Operator
s. Must not be null.clauseValue
- long value for the condition. Must not be null.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder addNumberCondition(String clauseName, Operator operator, Long... clauseValues)
clauseName operator (clauseValues)
to the query being built.
clauseName
- name of the clause in the condition. Must not be null.operator
- one of the enumerated Operator
s. Must not be null.clauseValues
- long values for the condition. Must not be null, empty or contain any null values.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder addNumberCondition(String clauseName, Operator operator, Collection<Long> clauseValues)
clauseName operator (clauseValues)
to the query being built.
clauseName
- name of the clause in the condition. Must not be null.operator
- one of the enumerated Operator
s. Must not be null.clauseValues
- long values for the condition. Must not be null, empty or contain any null values.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder addNumberRangeCondition(String clauseName, Long start, Long end)
clauseName >= start AND clauseName <= end
to the query being built. It is also
possible to create an open interval by passing one of the arguments as null
. Passing a non-null start
with a null end
will add the condition clauseName >=
start
. Passing a non-null end
with a null start
will add the
condition clauseName <= end
. Passing a null start
and null end
is illegal.
clauseName
- name of the clause in the condition. Must not be null.start
- the start of the range. May be null if end
is not null.end
- the end of the range. May be null if start
is not null.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.
IllegalArgumentException
- if both start
and end
are null.ConditionBuilder addCondition(String clauseName)
ConditionBuilder
that can be used to build a JQL condition for
the passed JQL name.
clauseName
- the name of the JQL condition to add.
JqlClauseBuilder addCondition(String clauseName, Operand operand)
clauseName = operand
to the query being built.
clauseName
- name of the clause in the condition. Must not be null.operand
- defines an operand that will serve as the clause value. Must not be null.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder addCondition(String clauseName, Operand... operands)
clauseName in (operands)
to the query being built.
clauseName
- name of the clause in the condition. Must not be null.operands
- operands values for the condition. Must not be null, empty or contain any null values.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder addCondition(String clauseName, Collection<? extends Operand> operands)
clauseName in (operands)
to the query being built.
clauseName
- name of the clause in the condition. Must not be null.operands
- operands values for the condition. Must not be null, empty or contain any null values.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder addCondition(String clauseName, Operator operator, Operand operand)
clauseName operator operand
to the query being built.
clauseName
- name of the clause in the condition. Must not be null.operator
- one of the enumerated Operator
s. Must not be null.operand
- defines an operand that will serve as the clause value. Must not be null.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder addCondition(String clauseName, Operator operator, Operand... operands)
clauseName operator (operands)
to the query being built.
clauseName
- name of the clause in the condition. Must not be null.operator
- one of the enumerated Operator
s. Must not be null.operands
- values for the condition. Must not be null, empty or contain any null values.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder addCondition(String clauseName, Operator operator, Collection<? extends Operand> operands)
clauseName operator (operands)
to the query being built.
clauseName
- name of the clause in the condition. Must not be null.operator
- one of the enumerated Operator
s. Must not be null.operands
- values for the condition. Must not be null, empty or contain any null values.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.JqlClauseBuilder addRangeCondition(String clauseName, Operand start, Operand end)
clauseName >= start AND clauseName <= end
to the query being built. It is also
possible to create an open interval by passing one of the arguments as null
. Passing a non-null start
with a null end
will add the condition clauseName >=
start
. Passing a non-null end
with a null start
will add the
condition clauseName <= end
. Passing a null start
and null end
is illegal.
clauseName
- name of the clause in the condition. Must not be null.start
- the start of the range. May be null if end
is not null.end
- the end of the range. May be null if start
is not null.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the
builder.
IllegalArgumentException
- if both start
and end
are null.JqlClauseBuilder addEmptyCondition(String clauseName)
clauseName IS EMPTY
to the query being built.
clauseName
- the clause name for the new condition. Cannot be null.
IllegalStateException
- if it is not possible to add a JQL condition given the current state of the builder.Clause buildClause()
IllegalStateException
- if it is not possible to build a valid JQL query given the state of the builder.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |