T
- The builder type that is returned on terminal operationspublic interface CaseWhenStarterBuilder<T>
Modifier and Type | Method and Description |
---|---|
RestrictionBuilder<CaseWhenThenBuilder<CaseWhenBuilder<T>>> |
when(String expression)
Starts a
RestrictionBuilder to create a when predicate where expression will be on the left hand side of the predicate. |
CaseWhenAndThenBuilder<CaseWhenBuilder<T>> |
whenAnd()
Starts a
CaseWhenAndThenBuilder which is a predicate consisting only of
conjunctive connected predicates. |
SubqueryInitiator<CaseWhenThenBuilder<CaseWhenBuilder<T>>> |
whenExists()
Starts an exists predicate for the when clause with a subquery on the right hand side.
|
SubqueryInitiator<CaseWhenThenBuilder<CaseWhenBuilder<T>>> |
whenNotExists()
Starts an exists predicate for the when clause with a subquery on the right hand side.
|
CaseWhenOrThenBuilder<CaseWhenBuilder<T>> |
whenOr()
Starts a
CaseWhenOrThenBuilder which is a predicate consisting only of
disjunctiv connected predicates. |
SubqueryInitiator<RestrictionBuilder<CaseWhenThenBuilder<CaseWhenBuilder<T>>>> |
whenSubquery()
Starts a
SubqueryInitiator for the left hand side of a when predicate. |
SubqueryInitiator<RestrictionBuilder<CaseWhenThenBuilder<CaseWhenBuilder<T>>>> |
whenSubquery(String subqueryAlias,
String expression)
Starts a
SubqueryInitiator for the left hand side of a when predicate. |
RestrictionBuilder<CaseWhenThenBuilder<CaseWhenBuilder<T>>> when(String expression)
RestrictionBuilder
to create a when predicate where expression will be on the left hand side of the predicate.expression
- The left hand expression for a when predicateSubqueryInitiator<RestrictionBuilder<CaseWhenThenBuilder<CaseWhenBuilder<T>>>> whenSubquery()
SubqueryInitiator
for the left hand side of a when predicate.
When the subquery builder and the restriction builder for the right hand side are finished,
the when predicate in conjunction with it's then expression are added to the case when builder.SubqueryInitiator<RestrictionBuilder<CaseWhenThenBuilder<CaseWhenBuilder<T>>>> whenSubquery(String subqueryAlias, String expression)
SubqueryInitiator
for the left hand side of a when predicate. All occurrences of
subqueryAlias
in expression
will be replaced by the subquery. This allows to build
expressions containing subqueries like following example shows:
whenSubquery("x", "x * 2 + 1").from(Person.class, "p").select("COUNT(p)").end();
results in:
(SELECT COUNT(p) FROM Person p) * 2 + 1
When the subquery builder and the restriction builder for the right hand side are finished, the when predicate in conjunction with it's then expression are added to the case when builder.
subqueryAlias
- The alias for the subquery which will be replaced by the actual subqueryexpression
- The expression which will be used as left hand side of a predicate.
This expression contains the subqueryAlias
to define the insertion points for the subquery.SubqueryInitiator<CaseWhenThenBuilder<CaseWhenBuilder<T>>> whenExists()
SubqueryInitiator<CaseWhenThenBuilder<CaseWhenBuilder<T>>> whenNotExists()
CaseWhenAndThenBuilder<CaseWhenBuilder<T>> whenAnd()
CaseWhenAndThenBuilder
which is a predicate consisting only of
conjunctive connected predicates. When the builder finishes, the when predicate
in conjunction with it's then expression are added to the case when builder.CaseWhenOrThenBuilder<CaseWhenBuilder<T>> whenOr()
CaseWhenOrThenBuilder
which is a predicate consisting only of
disjunctiv connected predicates. When the builder finishes, the when predicate
in conjunction with it's then expression are added to the case when builder.Copyright © 2015 Blazebit. All Rights Reserved.