com.atlassian.jira.jql.builder
Interface JqlClauseBuilder


@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.

This builder provided methods to build terminal clauses specific to system fields (e.g. reporter()) and short cuts for common terminal clauses (e.g. #unresolved() which produce the terminal clause {@code resolution = Unresolved}. But also allows the programmer to define his terminal clause components manually, for example {@code 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 {@code project = HSP and issuetype = bug} the builder would be used as such {@code builder.project("HSP").and().issueType("bug").buildQuery()} or {@code builder.defaultAnd().project("HSP").issueType("bug").buildQuery()}. Not defining the operator, such as {@code builder.project("HSP").issueType("bug").buildQuery()} will cause an illegal state exception.

Different logical operators can be specified by the programmer by using the {@link com.atlassian.jira.jql.builder.ConditionBuilder} returned by the field level methods such as {@link #project()}. For instance to create the terminal clause {@code component != searching} the programmer would use the builder as such {@code 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 {@link #sub()} and {@link #endsub()} methods, which effectively add opening and closing parenthesis to the JQL respectively. For instance to create the JQL {@code (resolution is unresolved and assignee is empty) or resolution = fixed} the programmer would use the builder as such {@code 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 {@link IllegalArgumentException}.

JQL values are of two types {@link String} and {@link 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.

Since:
v4.0

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.
 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 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 votes()
          Return a ConditionBuilder that can be used to build a JQL condition for the number of votes 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

endWhere

JqlQueryBuilder endWhere()
Call this to get a handle on the associated JqlQueryBuilder.

Returns:
the associated JqlQueryBuilder. Null may be returned to indicate there is no associated builder.

buildQuery

Query buildQuery()
Call this method to build a 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()).

Returns:
the newly generated query query.
Throws:
IllegalStateException - if it is not possible to build the current query given the state of the builder.

clear

JqlClauseBuilder clear()
Reset the builder to its empty state.

Returns:
the reset builder.

defaultAnd

JqlClauseBuilder defaultAnd()
Tell the builder to combine JQL conditions using the "AND" operator when none has been specified. Normally the caller must ensure that a call to either 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".

Returns:
a builder that can be used to further extends the current JQL expression.

defaultOr

JqlClauseBuilder defaultOr()
Tell the builder to combine JQL conditions using the "OR" operator when none has been specified. Normally the caller must ensure that a call to either 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".

Returns:
a builder that can be used to further extends the current JQL expression.

defaultNone

JqlClauseBuilder defaultNone()
Tell the builder to stop injecting JQL "AND" or "OR" operators automatically between the generated JQL conditions. This essentially turns off the behaviour started by calling either defaultAnd() or defaultOr().

Returns:
a builder that can be used to further extends the current JQL expression.

and

JqlClauseBuilder and()
Add the JQL "AND" operator to the JQL expression currently being built. The builder takes into account operator precendence when generating the JQL expression, and as such, the caller may need to group JQL conditions using the 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").

Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add the AND operator given the current state of the builder.

or

JqlClauseBuilder or()
Add the JQL "OR" operator to the JQL expression currently being built. The builder takes into account operator precendence when generating the JQL expression, and as such, the caller may need to group JQL conditions using the 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").

Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add the OR operator given the current state of the builder.

not

JqlClauseBuilder not()
Add the JQL "NOT" operator to the JQL expression currently being built. The builder takes into account operator precendence when generating the JQL expression, and as such, the caller may need to group JQL conditions using the 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").

Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add the NOT operator given the current state of the builder.

sub

JqlClauseBuilder sub()
Create a new sub expression in the current JQL. This essentialy opens a bracket in the JQL query such that all the JQL expressions from now until the next matching 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".

Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to create a sub JQL expression given the current state of the builder.

endsub

JqlClauseBuilder endsub()
End the current sub JQL expression. This essentially adds a close bracket to the JQL query which will close the last open bracket.

Returns:
a reference to the current builder.
Throws:
IllegalStateException - if there is not current sub expression to close, that is, there is no matching call to sub().
See Also:
sub()

affectedVersion

JqlClauseBuilder affectedVersion(String version)
Add a condtion to the query that finds the issues associated with a particular affected version. This essentially adds the JQL condition affectedVersion = "value" to the query being built.

Parameters:
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.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

affectedVersion

JqlClauseBuilder affectedVersion(String... versions)
Add a condition to the query that finds the issues associated particular set of affected versions. This essentially adds the JQL condition affectedVersion in (versions) to the query being built.

Parameters:
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.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

affectedVersionIsEmpty

JqlClauseBuilder affectedVersionIsEmpty()
Adds adds a condition to the query to find issues with no assigned affected version. This essentially adds the JQL condition affectedVersion IS EMPTY to the query being built.

Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

affectedVersion

ConditionBuilder affectedVersion()
Return a ConditionBuilder that can be used to build a JQL condition for the affected version.

Returns:
a reference to a condition builder for affected version.

fixVersion

JqlClauseBuilder fixVersion(String version)
Add a condtion to the query that finds the issues associated with a particular fix version. This essentially adds the JQL condition fixVersion = "value" to the query being built.

Parameters:
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.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

fixVersion

JqlClauseBuilder fixVersion(String... versions)
Add a condition to the query that finds the issues associated particular set of fix versions. This essentially adds the JQL condition fixVersion in (versions) to the query being built.

Parameters:
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.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

fixVersion

JqlClauseBuilder fixVersion(Long version)
Add a condtion to the query that finds the issues associated with a particular fix version. This essentially adds the JQL condition fixVersion = version to the query being built.

Parameters:
version - the version to search for. Must not be null.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

fixVersion

JqlClauseBuilder fixVersion(Long... versions)
Add a condition to the query that finds the issues associated particular set of fix versions. This essentially adds the JQL condition fixVersion in (versions) to the query being built.

Parameters:
versions - the fix versions to search for. Must not be null, empty or contain any null values.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

fixVersionIsEmpty

JqlClauseBuilder fixVersionIsEmpty()
Adds adds a condition to the query to find issues with no assigned fix version. This essentially adds the JQL condition fixVersion IS EMPTY to the query being built.

Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

fixVersion

ConditionBuilder fixVersion()
Return a ConditionBuilder that can be used to build a JQL condition for the fix version.

Returns:
a reference to a ConditionBuilder for fix version.

priority

JqlClauseBuilder priority(String... priorities)
Add a condition to the query that finds the issues associated particular set of priorities. This essentially adds the JQL condition priority in (priorities) to the query being built.

Parameters:
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.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

priority

ConditionBuilder priority()
Return a ConditionBuilder that can be used to build a JQL condition for the priority.

Returns:
a reference to a ConditionBuilder for priority.

resolution

JqlClauseBuilder resolution(String... resolutions)
Add a condition to the query that finds the issues associated particular set of resolutions. This essentially adds the JQL condition resolution in (resultions) to the query being built.

Parameters:
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.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

unresolved

JqlClauseBuilder unresolved()
Add a condition to query that finds the issues that have not been resolved. This essentially adds the JQL condition resolution IS EMPTY to the query being built.

Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

resolution

ConditionBuilder resolution()
Return a ConditionBuilder that can be used to build a JQL condition for resolution.

Returns:
a reference to a ConditionBuilder for resolution.

status

JqlClauseBuilder status(String... statuses)
Add a condition to the query that finds the issues associated particular set of statuses. This essentially adds the JQL condition status in (statuses) to the query being built.

Parameters:
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.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

status

ConditionBuilder status()
Return a ConditionBuilder that can be used to build a JQL condition for status.

Returns:
a reference to a ConditionBuilder for status.

issueType

JqlClauseBuilder issueType(String... types)
Add a condition to the query that finds the issues of a particular type. This essentially adds the JQL condition issuetype in (types) to the query being built.

Parameters:
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.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

issueTypeIsStandard

JqlClauseBuilder issueTypeIsStandard()
Add a condition to the query that finds the "standard" issue types. Standard issues types are those that are not sub-tasks. This essentially adds the JQL condition issuetype in standardIssueTypes() to the query being built.

Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

issueTypeIsSubtask

JqlClauseBuilder issueTypeIsSubtask()
Add a condition to the query that finds the "sub-task" issue types. This essentially adds the JQL condition issuetype in subTaskIssueTypes() to the query being built.

Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

issueType

ConditionBuilder issueType()
Return a ConditionBuilder that can be used to build a JQL condition for issue types.

Returns:
a reference to a ConditionBuilder for issue types.

description

JqlClauseBuilder description(String value)
Add a condition to the query that finds the issues that match the passed description. This essentially adds the condition description ~ "value" to the query being built.

NOTE: The description field performs apporximate text matching not exact text matching.

Parameters:
value - the value of the condition.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

descriptionIsEmpty

JqlClauseBuilder descriptionIsEmpty()
Add a condition to the query that finds the issues that have no description. This essentially adds the condition description IS EMPTY to the query being built.

Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

description

ConditionBuilder description()
Return a ConditionBuilder that can be used to build a JQL condition for issue descriptions.

Returns:
a reference to a ConditionBuilder for issue descriptions.

summary

JqlClauseBuilder summary(String value)
Add a condition to the query that finds the issues match the passed summary. This essentially adds the condition summary ~ "value" to the query being built.

NOTE: The summary field performs apporximate text matching not exact text matching.

Parameters:
value - the value of the condition.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

summary

ConditionBuilder summary()
Return a ConditionBuilder that can be used to build a JQL condition for issue summaries.

Returns:
a reference to a ConditionBuilder for issue summaries.

environment

JqlClauseBuilder environment(String value)
Add a condition to the query that finds the issues that match the passed environment. This essentially adds the condition environment ~ "value" to the query being built.

NOTE: The environment field performs apporximate text matching not exact text matching.

Parameters:
value - the value of the condition.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

environmentIsEmpty

JqlClauseBuilder environmentIsEmpty()
Add a condition to the query that finds the issues that have no environment. This essentially adds the condition environment IS EMPTY to the query being built.

Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

environment

ConditionBuilder environment()
Return a ConditionBuilder that can be used to build a JQL condition for issue environments.

Returns:
a reference to a ConditionBuilder for issue environments.

comment

JqlClauseBuilder comment(String value)
Add a condition to the query that finds the issues that match the passed comment. This essentially adds the condition comment ~ "value" to the query being built.

NOTE: The comment field performs apporximate text matching not exact text matching.

Parameters:
value - the value of the condition.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

comment

ConditionBuilder comment()
Return a ConditionBuilder that can be used to build a JQL condition for issue comments.

Returns:
a reference to a ConditionBuilder for issue comments.

project

JqlClauseBuilder project(String... projects)
Add a condition to the query that finds the issues within a particular project. This essentially adds the JQL condition project in (projects) to the query being built.

Parameters:
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.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

project

JqlClauseBuilder project(Long... pids)
Add a condition to the query that finds the issues within a particular project. This essentially adds the JQL condition project in (pids) to the query being built.

Parameters:
pids - the JIRA id's of the projects to search for. Cannot be null, empty or contain null values.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

project

ConditionBuilder project()
Return a ConditionBuilder that can be used to build a JQL condition for an issue's project.

Returns:
a reference to a ConditionBuilder for projects

category

JqlClauseBuilder category(String... categories)
Add a condition to the query that finds the issues from projects within a list of project categories. This essentially adds the JQL condition category in (categories) to the query being built.

Parameters:
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.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

category

ConditionBuilder category()
Return a 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.

Returns:
a reference to a ConditionBuilder for project category.

createdAfter

JqlClauseBuilder createdAfter(Date startDate)
Add a condition to the query that finds the issues that were created after the passed date. This essentially adds the query created &gt;= startDate to the query being built.

Parameters:
startDate - the date that issues must be created after. Cannot be null.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

createdAfter

JqlClauseBuilder createdAfter(String startDate)
Add a condition to the query that finds the issues that were created after the passed date. This essentially adds the query created &gt;= startDate to the query being built.

Parameters:
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.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

createdBetween

JqlClauseBuilder createdBetween(Date startDate,
                                Date endDate)
Add a condition to the query that finds the issues that where created between the passed dates. This essentially adds the query created &gt;= startDate AND created &lt;= 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 &gt;= startDate. Passing a non-null endDate with a null startDate will add the condition created &lt;= endDate. Passing a null startDate and null endDate is illegal.

Parameters:
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.
Returns:
a reference to the current builder.
Throws:
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.

createdBetween

JqlClauseBuilder createdBetween(String startDateString,
                                String endDateString)
Add a condition to the query that finds the issues that where created between the passed dates. This essentially adds the query created &gt;= startDateString AND created &lt;= 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 &gt;= startDateString. Passing a non-null endDateString with a null startDateString will add the condition created &lt;= endDateString. Passing a null startDateString and null endDateString is illegal.

Parameters:
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.
Returns:
a reference to the current builder.
Throws:
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.

created

ConditionBuilder created()
Return a ConditionBuilder that can be used to build a JQL condition for issue's creation date.

Returns:
a reference to a ConditionBuilder for created date.

updatedAfter

JqlClauseBuilder updatedAfter(Date startDate)
Add a condition to the query that finds the issues that were updated after the passed date. This essentially adds the query updated &gt;= startDate to the query being built.

Parameters:
startDate - the date that issues must be updated after. Cannot be null.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

updatedAfter

JqlClauseBuilder updatedAfter(String startDate)
Add a condition to the query that finds the issues that were updated after the passed date. This essentially adds the query updated &gt;= startDate to the query being built.

Parameters:
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.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

updatedBetween

JqlClauseBuilder updatedBetween(Date startDate,
                                Date endDate)
Add a condition to the query that finds the issues that where updated between the passed dates. This essentially adds the query updated &gt;= startDate AND updated &lt;= 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 &gt;= startDate. Passing a non-null endDate with a null startDate will add the condition updated &lt;= endDate. Passing a null startDate and null endDate is illegal.

Parameters:
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.
Returns:
a reference to the current builder.
Throws:
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.

updatedBetween

JqlClauseBuilder updatedBetween(String startDateString,
                                String endDateString)
Add a condition to the query that finds the issues that where updated between the passed dates. This essentially adds the query updated &gt;= startDateString AND updated &lt;= 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 &gt;= startDateString. Passing a non-null endDateString with a null startDateString will add the condition updated &lt;= endDateString. Passing a null startDateString and null endDateString is illegal.

Parameters:
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.
Returns:
a reference to the current builder.
Throws:
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.

updated

ConditionBuilder updated()
Return a ConditionBuilder that can be used to build a JQL condition for issue's updated date.

Returns:
a reference to a ConditionBuilder for updated date.

dueAfter

JqlClauseBuilder dueAfter(Date startDate)
Add a condition to the query that finds the issues that are due after the passed date. This essentially adds the query duedate &gt;= startDate to the query being built.

Parameters:
startDate - the date that issues must be due after. Cannot be null.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

dueAfter

JqlClauseBuilder dueAfter(String startDate)
Add a condition to the query that finds the issues that are due after the passed date. This essentially adds the query duedate &gt;= startDate to the query being built.

Parameters:
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.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

dueBetween

JqlClauseBuilder dueBetween(Date startDate,
                            Date endDate)
Add a condition to the query that finds the issues that where due between the passed dates. This essentially adds the query duedate &gt;= startDate AND duedate &lt;= 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 &gt;= startDate. Passing a non-null endDate with a null startDate will add the condition duedate &lt;= endDate. Passing a null startDate and null endDate is illegal.

Parameters:
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.
Returns:
a reference to the current builder.
Throws:
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.

dueBetween

JqlClauseBuilder dueBetween(String startDateString,
                            String endDateString)
Add a condition to the query that finds the issues that where due between the passed dates. This essentially adds the query duedate &gt;= startDateString AND duedate &lt;= 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 &gt;= startDateString. Passing a non-null endDateString with a null startDateString will add the condition duedate &lt;= endDateString. Passing a null startDateString and null endDateString is illegal.

Parameters:
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.
Returns:
a reference to the current builder.
Throws:
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.

due

ConditionBuilder due()
Return a ConditionBuilder that can be used to build a JQL condition for issue's due date.

Returns:
a reference to a ConditionBuilder for due date.

resolutionDateAfter

JqlClauseBuilder resolutionDateAfter(Date startDate)
Add a condition to the query that finds the issues that were reolved after the passed date. This essentially adds the query resolutiondate &gt;= startDate to the query being built.

Parameters:
startDate - the date that issues must be resolved after. Cannot be null.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

resolutionDateAfter

JqlClauseBuilder resolutionDateAfter(String startDate)
Add a condition to the query that finds the issues that were resolved after the passed date. This essentially adds the query resolutiondate &gt;= startDate to the query being built.

Parameters:
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.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

resolutionDateBetween

JqlClauseBuilder resolutionDateBetween(Date startDate,
                                       Date endDate)
Add a condition to the query that finds the issues that where resolved between the passed dates. This essentially adds the query resolutiondate &gt;= startDate AND resolutiondate &lt;= 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 &gt;= startDate. Passing a non-null endDate with a null startDate will add the condition resolutiondate &lt;= endDate. Passing a null startDate and null endDate is illegal.

Parameters:
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.
Returns:
a reference to the current builder.
Throws:
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.

resolutionDateBetween

JqlClauseBuilder resolutionDateBetween(String startDateString,
                                       String endDateString)
Add a condition to the query that finds the issues that where resolved between the passed dates. This essentially adds the query resolutiondate &gt;= startDateString AND resolutiondate &lt;= 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 &gt;= startDateString. Passing a non-null endDateString with a null startDateString will add the condition resolutiondate &lt;= endDateString. Passing a null startDateString and null endDateString is illegal.

Parameters:
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.
Returns:
a reference to the current builder.
Throws:
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.

resolutionDate

ConditionBuilder resolutionDate()
Return a ConditionBuilder that can be used to build a JQL condition for issue's resolution date.

Returns:
a reference to a ConditionBuilder for resolution date.

reporterUser

JqlClauseBuilder reporterUser(String userName)
Add a condition to the query that finds issues that where reported by the passed user. This essentially adds the condition reporter = userName to the query being built.

Parameters:
userName - the username to search for. Cannot be null.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

reporterInGroup

JqlClauseBuilder reporterInGroup(String groupName)
Add a condition to the query that finds all issues that were reported by users in a particular group. This essentially adds the condition reporter in memboersOf("groupName") to the query being built.

Parameters:
groupName - the group for the condition. Cannot be null.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

reporterIsCurrentUser

JqlClauseBuilder reporterIsCurrentUser()
Add a condition to the query that finds all issues that were reported by the current user. This essentially adds the condition reporter = currentUser() to the query being built.

Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

reporterIsEmpty

JqlClauseBuilder reporterIsEmpty()
Add a condition to the query to find issues without a reporter. This essentially adds the condition reporter IS EMPTY to the query being built.

Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

reporter

ConditionBuilder reporter()
Return a ConditionBuilder that can be used to build a JQL condition for the issue's reporter.

Returns:
a reference to a ConditionBuilder for reporter.

assigneeUser

JqlClauseBuilder assigneeUser(String userName)
Add a condition to the query that finds issues that are assigned to the passed user. This essentially adds the condition assignee = userName to the query being built.

Parameters:
userName - the username to search for. Cannot be null.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

assigneeInGroup

JqlClauseBuilder assigneeInGroup(String groupName)
Add a condition to the query that finds all issues that are assigned to users in a particular group. This essentially adds the condition assignee in memboersOf("groupName") to the query being built.

Parameters:
groupName - the group for the condition. Cannot be null.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

assigneeIsCurrentUser

JqlClauseBuilder assigneeIsCurrentUser()
Add a condition to the query that finds all issues that are assigned to the current user. This essentially adds the condition assignee = currentUser() to the query being built.

Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

assigneeIsEmpty

JqlClauseBuilder assigneeIsEmpty()
Add a condition to the query to find all unassigned issues. This essentially adds the condition assignee IS EMPTY to the query being built.

Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

assignee

ConditionBuilder assignee()
Return a ConditionBuilder that can be used to build a JQL condition for the issue's assignee.

Returns:
a reference to a ConditionBuilder for assignee.

component

JqlClauseBuilder component(String... components)
Add a condition to the query to find all issues with particular components. This essentially adds the JQL condition component in (components) to the query.

Parameters:
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.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

component

JqlClauseBuilder component(Long... components)
Add a condition to the query to find all issues with particular components. This essentially adds the JQL condition component in (components) to the query.

Parameters:
components - the ids of the components to search for. Must not be null, contain nulls or be empty.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

componentIsEmpty

JqlClauseBuilder componentIsEmpty()
Add a condition to the query to find all issues that have not component assigned. This essentially adds the JQL condition component IS EMTPY to the query.

Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

component

ConditionBuilder component()
Return a ConditionBuilder that can be used to build a JQL condition for the issue's component.

Returns:
a reference to a ConditionBuilder for component.

issue

JqlClauseBuilder issue(String... keys)
Add a condition to the query that will find all issues with the passed key. This essentially adds the JQL condition key IN (keys) to the query.

Parameters:
keys - the issues keys to search for. Cannot be null, empty or contain any nulls.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

issueInHistory

JqlClauseBuilder issueInHistory()
Add a condition to the query that will find all issues currently within the user's history. This essentially adds the JQL condition key IN issueHistory() to the query.

Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

issue

ConditionBuilder issue()
Return a ConditionBuilder that can be used to build a JQL condition for the issue's id or key.

Returns:
a reference to a ConditionBuilder for issue id or key.

issueParent

JqlClauseBuilder issueParent(String... keys)
Add a condition to the query that will find all issues that have the passed issues as parents. This essentially adds the condition parent IN (keys) to the query.

Parameters:
keys - the issues keys to search for. Cannot be null, empty or contain any nulls.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

issueParent

ConditionBuilder issueParent()
Return a ConditionBuilder that can be used to build a JQL condition for the issue's parent.

Returns:
a reference to a ConditionBuilder for issue parent.

currentEstimate

ConditionBuilder currentEstimate()
Return a ConditionBuilder that can be used to build a JQL condition for the issue's current estimate.

Returns:
a reference to a ConditionBuilder for current estimate.

originalEstimate

ConditionBuilder originalEstimate()
Return a ConditionBuilder that can be used to build a JQL condition for the issue's original estimate.

Returns:
a reference to a ConditionBuilder for original estimate.

timeSpent

ConditionBuilder timeSpent()
Return a ConditionBuilder that can be used to build a JQL condition for the issue's timespent field.

Returns:
a reference to a ConditionBuilder for timespent.

workRatio

ConditionBuilder workRatio()
Return a ConditionBuilder that can be used to build a JQL condition for the issue's work ratio field.

Returns:
a reference to a ConditionBuilder for work ratio.

level

JqlClauseBuilder level(String... levels)
Add a condition to the query that will find all issues with the passed security levels. This essentially adds the condition level IN (levels) to the query.

Parameters:
levels - the security levels to search for. Cannot be null, empty or contain nulls.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

level

ConditionBuilder level()
Return a ConditionBuilder that can be used to build a JQL condition for the issue's security level.

Returns:
a reference to a ConditionBuilder for issue level.

savedFilter

JqlClauseBuilder savedFilter(String... filters)
Add a condition to the query that will inclue the results from the passed filters in the search. This essentially adds the condition filter IN (filters) to the condition.

Parameters:
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.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

savedFilter

ConditionBuilder savedFilter()
Return a ConditionBuilder that can be used to add saved filters as conditions to the query.

Returns:
a reference to a ConditionBuilder for saved filters.

votes

ConditionBuilder votes()
Return a ConditionBuilder that can be used to build a JQL condition for the number of votes on an issue.

Returns:
a reference to a ConditionBuilder for votes.

field

ConditionBuilder field(String jqlName)
Return a ConditionBuilder that can be used to build a JQL condition for the passed name.

Parameters:
jqlName - the name of the JQL condition. Cannot be null.
Returns:
a reference to a ConditionBuilder for the passed name.

customField

ConditionBuilder customField(Long id)
Return a ConditionBuilder that can be used to build a JQL condition for a custom field with the passed id.

Parameters:
id - the ID for the custom field. Cannot be null.
Returns:
a reference to a ConditionBuilder for the passed ID.

addClause

JqlClauseBuilder addClause(Clause clause)
Add the passed JQL condition to the query being built.

Parameters:
clause - the clause to add. Must not be null.
Returns:
a reference to the current builder. Never null.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

addDateCondition

JqlClauseBuilder addDateCondition(String clauseName,
                                  Operator operator,
                                  Date date)
Add the JQL condition clausename operator date to the query being built.

Parameters:
clauseName - name of the clause in the condition. Must not be null.
operator - one of the enumerated Operators. Must not be null.
date - the date for the condition. Must not be null.
Returns:
a reference to the current builder. Never null.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

addDateCondition

JqlClauseBuilder addDateCondition(String clauseName,
                                  Date... dates)
Add the JQL condition clauseName in (dates) to the query being built.

Parameters:
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.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

addDateCondition

JqlClauseBuilder addDateCondition(String clauseName,
                                  Operator operator,
                                  Date... dates)
Add the JQL condition clauseName operator (clauseValues) to the query being built.

Parameters:
clauseName - name of the clause in the condition. Must not be null.
operator - one of the enumerated Operators. Must not be null.
dates - date values for the condition. Must not be null, empty or contain any null values.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

addDateCondition

JqlClauseBuilder addDateCondition(String clauseName,
                                  Collection<Date> dates)
Add the JQL condition clauseName in (dates) to the query being built.

Parameters:
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.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

addDateCondition

JqlClauseBuilder addDateCondition(String clauseName,
                                  Operator operator,
                                  Collection<Date> dates)
Add the JQL condition clauseName operator (clauseValues) to the query being built.

Parameters:
clauseName - name of the clause in the condition. Must not be null.
operator - one of the enumerated Operators. Must not be null.
dates - date values for the condition. Must not be null, empty or contain any null values.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

addDateRangeCondition

JqlClauseBuilder addDateRangeCondition(String clauseName,
                                       Date startDate,
                                       Date endDate)
Add a condition range condition to the current query for the passed dates. This essentially adds the query clauseName &gt;= startDate AND clauseName &lt;= 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 &gt;= startDate. Passing a non-null endDate with a null startDate will add the condition clauseName &lt;= endDate. Passing a null startDate and null endDate is illegal.

Parameters:
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.
Returns:
a reference to the current builder.
Throws:
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.

addFunctionCondition

JqlClauseBuilder addFunctionCondition(String clauseName,
                                      String functionName)
Add the JQL condition clauseName = functionName() to the query being built.

Parameters:
clauseName - name of the clause in the condition. Must not be null.
functionName - name of the function to call. Must not be null.
Returns:
a reference to the current builder. Never null.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

addFunctionCondition

JqlClauseBuilder addFunctionCondition(String clauseName,
                                      String functionName,
                                      String... args)
Add the JQL condition clauseName = functionName(arg1, arg2, arg3, ..., argN) to the query being built.

Parameters:
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.
Returns:
a reference to the current builder. Never null.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

addFunctionCondition

JqlClauseBuilder addFunctionCondition(String clauseName,
                                      String functionName,
                                      Collection<String> args)
Add the JQL condition clauseName = functionName(arg1, arg2, arg3, ..., argN) to the query being built.

Parameters:
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.
Returns:
a reference to the current builder. Never null.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

addFunctionCondition

JqlClauseBuilder addFunctionCondition(String clauseName,
                                      Operator operator,
                                      String functionName)
Add the JQL condition clauseName operator functionName() to the query being built.

Parameters:
clauseName - name of the clause in the condition. Must not be null.
operator - one of the enumerated Operators. Must not be null.
functionName - name of the function to call. Must not be null.
Returns:
a reference to the current builder. Never null.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

addFunctionCondition

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.

Parameters:
clauseName - name of the clause in the condition. Must not be null.
operator - one of the enumerated Operators. 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.
Returns:
a reference to the current builder. Never null.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

addFunctionCondition

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.

Parameters:
clauseName - name of the clause in the condition. Must not be null.
operator - one of the enumerated Operators. 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.
Returns:
a reference to the current builder. Never null.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

addStringCondition

JqlClauseBuilder addStringCondition(String clauseName,
                                    String clauseValue)
Add the JQL condition clauseName = "clauseValue" to the query being built.

Parameters:
clauseName - name of the clause in the condition. Must not be null.
clauseValue - string value for the condition. Must not be null.
Returns:
a reference to the current builder. Never null.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

addStringCondition

JqlClauseBuilder addStringCondition(String clauseName,
                                    String... clauseValues)
Add the JQL condition clauseName in (clauseValues) to the query being built.

Parameters:
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.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

addStringCondition

JqlClauseBuilder addStringCondition(String clauseName,
                                    Collection<String> clauseValues)
Add the JQL condition clauseName in (clauseValues) to the query being built.

Parameters:
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.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

addStringCondition

JqlClauseBuilder addStringCondition(String clauseName,
                                    Operator operator,
                                    String clauseValue)
Add the JQL condition clauseName operator "clauseValue" to the query being built.

Parameters:
clauseName - name of the clause in the condition. Must not be null.
operator - one of the enumerated Operators. Must not be null.
clauseValue - string value for the condition. Must not be null.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

addStringCondition

JqlClauseBuilder addStringCondition(String clauseName,
                                    Operator operator,
                                    String... clauseValues)
Add the JQL condition clauseName operator (clauseValues) to the query being built.

Parameters:
clauseName - name of the clause in the condition. Must not be null.
operator - one of the enumerated Operators. Must not be null.
clauseValues - string values for the condition. Must not be null, empty or contain any null values.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

addStringCondition

JqlClauseBuilder addStringCondition(String clauseName,
                                    Operator operator,
                                    Collection<String> clauseValues)
Add the JQL condition clauseName operator (clauseValues) to the query being built.

Parameters:
clauseName - name of the clause in the condition. Must not be null.
operator - one of the enumerated Operators. Must not be null.
clauseValues - string values for the condition. Must not be null, empty or contain any null values.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

addStringRangeCondition

JqlClauseBuilder addStringRangeCondition(String clauseName,
                                         String start,
                                         String end)
Add a condition range condition to the current query for the passed values. This essentially adds the query clauseName &gt;= start AND clauseName &lt;= 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 &gt;= start. Passing a non-null end with a null start will add the condition clauseName &lt;= end. Passing a null start and null end is illegal.

Parameters:
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.
Returns:
a reference to the current builder.
Throws:
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.

addNumberCondition

JqlClauseBuilder addNumberCondition(String clauseName,
                                    Long clauseValue)
Add the JQL condition clauseName = clauseValue to the query being built.

Parameters:
clauseName - name of the clause in the condition. Must not be null.
clauseValue - long value for the condition. Must not be null.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

addNumberCondition

JqlClauseBuilder addNumberCondition(String clauseName,
                                    Long... clauseValues)
Add the JQL condition clauseName in (clauseValues) to the query being built.

Parameters:
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.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

addNumberCondition

JqlClauseBuilder addNumberCondition(String clauseName,
                                    Collection<Long> clauseValues)
Add the JQL condition clauseName in (clauseValues) to the query being built.

Parameters:
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.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

addNumberCondition

JqlClauseBuilder addNumberCondition(String clauseName,
                                    Operator operator,
                                    Long clauseValue)
Add the JQL condition clauseName operator clauseValue to the query being built.

Parameters:
clauseName - name of the clause in the condition. Must not be null.
operator - one of the enumerated Operators. Must not be null.
clauseValue - long value for the condition. Must not be null.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

addNumberCondition

JqlClauseBuilder addNumberCondition(String clauseName,
                                    Operator operator,
                                    Long... clauseValues)
Add the JQL condition clauseName operator (clauseValues) to the query being built.

Parameters:
clauseName - name of the clause in the condition. Must not be null.
operator - one of the enumerated Operators. Must not be null.
clauseValues - long values for the condition. Must not be null, empty or contain any null values.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

addNumberCondition

JqlClauseBuilder addNumberCondition(String clauseName,
                                    Operator operator,
                                    Collection<Long> clauseValues)
Add the JQL condition clauseName operator (clauseValues) to the query being built.

Parameters:
clauseName - name of the clause in the condition. Must not be null.
operator - one of the enumerated Operators. Must not be null.
clauseValues - long values for the condition. Must not be null, empty or contain any null values.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

addNumberRangeCondition

JqlClauseBuilder addNumberRangeCondition(String clauseName,
                                         Long start,
                                         Long end)
Add a condition range condition to the current query for the passed values. This essentially adds the query clauseName &gt;= start AND clauseName &lt;= 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 &gt;= start. Passing a non-null end with a null start will add the condition clauseName &lt;= end. Passing a null start and null end is illegal.

Parameters:
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.
Returns:
a reference to the current builder.
Throws:
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.

addCondition

ConditionBuilder addCondition(String clauseName)
Return a ConditionBuilder that can be used to build a JQL condition for the passed JQL name.

Parameters:
clauseName - the name of the JQL condition to add.
Returns:
a reference to a condition builder for the passed condition.

addCondition

JqlClauseBuilder addCondition(String clauseName,
                              Operand operand)
Add the JQL condition clauseName = operand to the query being built.

Parameters:
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.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

addCondition

JqlClauseBuilder addCondition(String clauseName,
                              Operand... operands)
Add the JQL condition clauseName in (operands) to the query being built.

Parameters:
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.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

addCondition

JqlClauseBuilder addCondition(String clauseName,
                              Collection<? extends Operand> operands)
Add the JQL condition clauseName in (operands) to the query being built.

Parameters:
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.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

addCondition

JqlClauseBuilder addCondition(String clauseName,
                              Operator operator,
                              Operand operand)
Add the JQL condition clauseName operator operand to the query being built.

Parameters:
clauseName - name of the clause in the condition. Must not be null.
operator - one of the enumerated Operators. Must not be null.
operand - defines an operand that will serve as the clause value. Must not be null.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

addCondition

JqlClauseBuilder addCondition(String clauseName,
                              Operator operator,
                              Operand... operands)
Add the JQL condition clauseName operator (operands) to the query being built.

Parameters:
clauseName - name of the clause in the condition. Must not be null.
operator - one of the enumerated Operators. Must not be null.
operands - values for the condition. Must not be null, empty or contain any null values.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

addCondition

JqlClauseBuilder addCondition(String clauseName,
                              Operator operator,
                              Collection<? extends Operand> operands)
Add the JQL condition clauseName operator (operands) to the query being built.

Parameters:
clauseName - name of the clause in the condition. Must not be null.
operator - one of the enumerated Operators. Must not be null.
operands - values for the condition. Must not be null, empty or contain any null values.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

addRangeCondition

JqlClauseBuilder addRangeCondition(String clauseName,
                                   Operand start,
                                   Operand end)
Add a condition range condition to the current query for the passed values. This essentially adds the query clauseName &gt;= start AND clauseName &lt;= 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 &gt;= start. Passing a non-null end with a null start will add the condition clauseName &lt;= end. Passing a null start and null end is illegal.

Parameters:
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.
Returns:
a reference to the current builder.
Throws:
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.

addEmptyCondition

JqlClauseBuilder addEmptyCondition(String clauseName)
Add an "IS EMPTY" condition to the current query for the passed JQL clause. This essentially adds the query clauseName IS EMPTY to the query being built.

Parameters:
clauseName - the clause name for the new condition. Cannot be null.
Returns:
a reference to the current builder.
Throws:
IllegalStateException - if it is not possible to add a JQL condition given the current state of the builder.

buildClause

Clause buildClause()
Create the JQL clause the builder has currently constructed. The builder can still be used after this method is called.

Returns:
the clause generated by the builder. Can be null if there is no clause to generate.
Throws:
IllegalStateException - if it is not possible to build a valid JQL query given the state of the builder.


Copyright © 2002-2009 Atlassian. All Rights Reserved.