Interface CaseWhenOrBuilder<T>
- Type Parameters:
T
- The builder type that is returned on terminal operations
- Since:
- 1.0.0
- Author:
- Christian Beikov
-
Method Summary
Modifier and TypeMethodDescriptionand()
Starts a case when and builder which connects it's predicates with the AND operator.endOr()
Finishes the OR predicate and adds it to the parent predicate container represented by the typeT
.Starts aRestrictionBuilder
for a case when predicate with the given expression as left hand expression.orExists()
Starts an exists predicate for the when clause with a subquery on the right hand side.orExists
(FullQueryBuilder<?, ?> criteriaBuilder) Starts an exists predicate for the when clause with a subquery on the right hand side based on the given criteria builder.Starts an exists predicate for the when clause with a subquery on the right hand side.orNotExists
(FullQueryBuilder<?, ?> criteriaBuilder) Starts an exists predicate for the when clause with a subquery on the right hand side based on the given criteria builder.orSubqueries
(String expression) Starts aSubqueryInitiator
for the left hand side of a when predicate.Starts aSubqueryInitiator
for the left hand side of a when predicate.orSubquery
(FullQueryBuilder<?, ?> criteriaBuilder) Starts aSubqueryBuilder
based on the given criteria builder for the left hand side of a when predicate.orSubquery
(String subqueryAlias, String expression) Starts aSubqueryInitiator
for the left hand side of a when predicate.orSubquery
(String subqueryAlias, String expression, FullQueryBuilder<?, ?> criteriaBuilder) Starts aSubqueryBuilder
based on the given criteria builder for the left hand side of a when predicate.
-
Method Details
-
or
Starts aRestrictionBuilder
for a case when predicate with the given expression as left hand expression. When the builder finishes, the predicate is added this predicate container.- Parameters:
expression
- The left hand expression for a case when predicate- Returns:
- The restriction builder for the given expression
-
orSubquery
SubqueryInitiator<RestrictionBuilder<CaseWhenOrBuilder<T>>> orSubquery()Starts aSubqueryInitiator
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 this predicate container as disjunct.- Returns:
- The subquery initiator for building a subquery
-
orSubquery
SubqueryInitiator<RestrictionBuilder<CaseWhenOrBuilder<T>>> orSubquery(String subqueryAlias, String expression) Starts aSubqueryInitiator
for the left hand side of a when predicate.All occurrences of
subqueryAlias
inexpression
will be replaced by the subquery. 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 this predicate container as disjunct.- Parameters:
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 thesubqueryAlias
to define the insertion points for the subquery.- Returns:
- The subquery initiator for building a subquery
- See Also:
-
orSubqueries
Starts aSubqueryInitiator
for the left hand side of a when predicate.All occurrences of subsequently defined
subqueryAlias
es inexpression
will be replaced by the respective subquery. When the builder finishes, the resulting expression is used for the left hand side of a when predicate.- Parameters:
expression
- The expression which will be used as left hand side of a when predicate- Returns:
- The subquery initiator for building multiple subqueries for their respective subqueryAliases
- Since:
- 1.2.0
-
orSubquery
SubqueryBuilder<RestrictionBuilder<CaseWhenOrBuilder<T>>> orSubquery(FullQueryBuilder<?, ?> criteriaBuilder) Starts aSubqueryBuilder
based on the given criteria builder 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 this predicate container as disjunct.- Parameters:
criteriaBuilder
- The criteria builder to base the subquery on- Returns:
- The subquery builder for building a subquery
- Since:
- 1.2.0
-
orSubquery
SubqueryBuilder<RestrictionBuilder<CaseWhenOrBuilder<T>>> orSubquery(String subqueryAlias, String expression, FullQueryBuilder<?, ?> criteriaBuilder) Starts aSubqueryBuilder
based on the given criteria builder for the left hand side of a when predicate.All occurrences of
subqueryAlias
inexpression
will be replaced by the subquery. 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 this predicate container as disjunct.- Parameters:
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 thesubqueryAlias
to define the insertion points for the subquery.criteriaBuilder
- The criteria builder to base the subquery on- Returns:
- The subquery builder for building a subquery
- Since:
- 1.2.0
- See Also:
-
orExists
SubqueryInitiator<CaseWhenOrBuilder<T>> orExists()Starts an exists predicate for the when clause with a subquery on the right hand side. When the builder finishes, the when predicate in conjunction with it's then expression are added to this predicate container as disjunct.- Returns:
- The subquery initiator for building a subquery
-
orNotExists
SubqueryInitiator<CaseWhenOrBuilder<T>> orNotExists()Starts an exists predicate for the when clause with a subquery on the right hand side. When the builder finishes, the when predicate in conjunction with it's then expression are added to this predicate container as disjunct.- Returns:
- The subquery initiator for building a subquery
-
orExists
Starts an exists predicate for the when clause with a subquery on the right hand side based on the given criteria builder. When the builder finishes, the when predicate in conjunction with it's then expression are added to this predicate container as disjunct.- Parameters:
criteriaBuilder
- The criteria builder to base the subquery on- Returns:
- The subquery builder for building a subquery
- Since:
- 1.2.0
-
orNotExists
Starts an exists predicate for the when clause with a subquery on the right hand side based on the given criteria builder. When the builder finishes, the when predicate in conjunction with it's then expression are added to this predicate container as disjunct.- Parameters:
criteriaBuilder
- The criteria builder to base the subquery on- Returns:
- The subquery builder for building a subquery
- Since:
- 1.2.0
-
and
CaseWhenAndBuilder<CaseWhenOrBuilder<T>> and()Starts a case when and builder which connects it's predicates with the AND operator. When the builder finishes, the predicate is added to this predicate container as disjunct.- Returns:
- The case when and builder
-
endOr
T endOr()Finishes the OR predicate and adds it to the parent predicate container represented by the typeT
.- Returns:
- The parent predicate container builder
-