@NotThreadSafe public class JqlQueryBuilder extends Object
Query
's that can be used to perform issue searching in JIRA.
This gives you access to a JqlClauseBuilder
which can be used to build up the
where clause of the JQL and also a JqlOrderByBuilder
which can be used to build
up the order by clause of the JQL.
This object can also be used as a factory for JqlClauseBuilder
and
JqlOrderByBuilder
instances.
JqlClauseBuilder
,
JqlOrderByBuilder
Modifier and Type | Method and Description |
---|---|
Query |
buildQuery()
This will find the root of the clause tree and build a
Query whos where clause will
return the generated clause and Order By clause will return the generated search order. |
JqlQueryBuilder |
clear()
Reset the builder to its empty state.
|
static JqlQueryBuilder |
newBuilder() |
static JqlQueryBuilder |
newBuilder(Query existingQuery)
Creates a new builder that clones the state of the passed in query so that you can use the resulting builder to
create a slightly modified query.
|
static JqlClauseBuilder |
newClauseBuilder()
Build a new
JqlClauseBuilder . |
static JqlClauseBuilder |
newClauseBuilder(Clause copy)
Build a new
JqlClauseBuilder and initialise it with the passed clause. |
static JqlClauseBuilder |
newClauseBuilder(Query query)
Build a new
JqlClauseBuilder and initialise it with the clause from the
passed query. |
static JqlOrderByBuilder |
newOrderByBuilder()
Build a new
JqlOrderByBuilder . |
static JqlOrderByBuilder |
newOrderByBuilder(OrderBy copy)
Build a new
JqlOrderByBuilder and initialise it with the passed order. |
static JqlOrderByBuilder |
newOrderByBuilder(Query query)
Build a new
JqlOrderByBuilder and initialise it with the order from the passed query. |
JqlOrderByBuilder |
orderBy()
Creates an
JqlOrderByBuilder that can be used to modify the order by
statements of the JqlQueryBuilder instance. |
JqlClauseBuilder |
where()
Creates an
JqlClauseBuilder which is used to modify the where clause portion
of the JqlQueryBuilder instance. |
@Nonnull public static JqlQueryBuilder newBuilder()
@Nonnull public static JqlQueryBuilder newBuilder(Query existingQuery)
existingQuery
- the template to clone, both the where clause and order by clause will be cloned.@Nonnull public static JqlClauseBuilder newClauseBuilder()
JqlClauseBuilder
. The returned builder will have no associated
JqlQueryBuilder
.@Nonnull public static JqlClauseBuilder newClauseBuilder(Clause copy)
JqlClauseBuilder
and initialise it with the passed clause.
The returned builder will have no associated JqlQueryBuilder
.copy
- the claue to add to the new builder. Can be null.@Nonnull public static JqlClauseBuilder newClauseBuilder(Query query)
JqlClauseBuilder
and initialise it with the clause from the
passed query. The returned builder will have no associated JqlQueryBuilder
.query
- the query whose where clause will be copied into the new builder. Can be null.@Nonnull public static JqlOrderByBuilder newOrderByBuilder()
JqlOrderByBuilder
. The returned builder will have no associated
JqlQueryBuilder
.@Nonnull public static JqlOrderByBuilder newOrderByBuilder(OrderBy copy)
JqlOrderByBuilder
and initialise it with the passed order. The returned builder will have
no associated JqlQueryBuilder
.copy
- the order to copy. Can be null.@Nonnull public static JqlOrderByBuilder newOrderByBuilder(Query query)
JqlOrderByBuilder
and initialise it with the order from the passed query. The returned builder will have
no associated JqlQueryBuilder
.query
- the query whose order will be copied into the new builder. Can be null.@Nonnull public JqlOrderByBuilder orderBy()
JqlOrderByBuilder
that can be used to modify the order by
statements of the JqlQueryBuilder
instance.JqlQueryBuilder
instance.@Nonnull public JqlClauseBuilder where()
JqlClauseBuilder
which is used to modify the where clause portion
of the JqlQueryBuilder
instance.JqlQueryBuilder
instance.@Nonnull public Query buildQuery()
Query
whos where clause will
return the generated clause and Order By clause will return the generated search order.
NOTE: Calling this method does not change the state of the builder, there are no limitations on the number of times this method can be invoked.
public JqlQueryBuilder clear()
Copyright © 2002-2023 Atlassian. All Rights Reserved.