Interface CaseWhenAndThenBuilder<T extends CaseWhenBuilder<?>>

Type Parameters:
T - The builder type that is returned on terminal operations
All Superinterfaces:
CaseWhenThenBuilder<T>

public interface CaseWhenAndThenBuilder<T extends CaseWhenBuilder<?>> extends CaseWhenThenBuilder<T>
The builder interface for a when predicate container that connects predicates with the AND operator.
Since:
1.0.0
Author:
Christian Beikov
  • Method Details

    • and

      Starts a RestrictionBuilder 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
    • andSubquery

      Starts a 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 this predicate container as conjunct.
      Returns:
      The subquery initiator for building a subquery
    • andSubquery

      SubqueryInitiator<RestrictionBuilder<CaseWhenAndThenBuilder<T>>> andSubquery(String subqueryAlias, String expression)
      Starts a SubqueryInitiator for the left hand side of a when predicate.

      All occurrences of subqueryAlias in expression 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 conjunct.

      Parameters:
      subqueryAlias - The alias for the subquery which will be replaced by the actual subquery
      expression - 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.
      Returns:
      The subquery initiator for building a subquery
      See Also:
    • andSubqueries

      Starts a SubqueryInitiator for the left hand side of a when predicate.

      All occurrences of subsequently defined subqueryAliases in expression 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
    • andSubquery

      Starts a SubqueryBuilder 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 conjunct.
      Parameters:
      criteriaBuilder - The criteria builder to base the subquery on
      Returns:
      The subquery builder for building a subquery
      Since:
      1.2.0
    • andSubquery

      SubqueryBuilder<RestrictionBuilder<CaseWhenAndThenBuilder<T>>> andSubquery(String subqueryAlias, String expression, FullQueryBuilder<?,?> criteriaBuilder)
      Starts a SubqueryBuilder based on the given criteria builder for the left hand side of a when predicate.

      All occurrences of subqueryAlias in expression 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 conjunct.

      Parameters:
      subqueryAlias - The alias for the subquery which will be replaced by the actual subquery
      expression - 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.
      criteriaBuilder - The criteria builder to base the subquery on
      Returns:
      The subquery builder for building a subquery
      Since:
      1.2.0
      See Also:
    • andExists

      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 conjunct.
      Returns:
      The subquery initiator for building a subquery
    • andNotExists

      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 conjunct.
      Returns:
      The subquery initiator for building a subquery
    • andExists

      SubqueryBuilder<CaseWhenAndThenBuilder<T>> andExists(FullQueryBuilder<?,?> criteriaBuilder)
      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 conjunct.
      Parameters:
      criteriaBuilder - The criteria builder to base the subquery on
      Returns:
      The subquery builder for building a subquery
      Since:
      1.2.0
    • andNotExists

      SubqueryBuilder<CaseWhenAndThenBuilder<T>> andNotExists(FullQueryBuilder<?,?> criteriaBuilder)
      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 conjunct.
      Parameters:
      criteriaBuilder - The criteria builder to base the subquery on
      Returns:
      The subquery builder for building a subquery
      Since:
      1.2.0
    • or

      Starts a case when or builder which connects it's predicates with the OR operator. When the builder finishes, the predicate is added to this predicate container as conjunct.
      Returns:
      The case when or builder