Interface BinaryPredicateBuilder<T>

  • Type Parameters:
    T - The builder type that is returned on terminal operations
    All Known Subinterfaces:
    LikeBuilder<T>, QuantifiableBinaryPredicateBuilder<T>

    public interface BinaryPredicateBuilder<T>
    The interface for binary predicate builders. The left hand side and the operator are already known to the builder and the methods of this builder terminate the building process.
    Since:
    1.0.0
    Author:
    Christian Beikov, Moritz Becker
    • Method Detail

      • value

        T value​(Object value)
        Uses the given value as right hand side for the binary predicate. Finishes the binary predicate and adds it to the parent predicate container represented by the type T.
        Parameters:
        value - The value to use for the right hand side of the binary predicate
        Returns:
        The parent predicate container builder
      • literal

        T literal​(Object value)
        Uses the given value as right hand side for the binary predicate rendered as literal. Finishes the binary predicate and adds it to the parent predicate container represented by the type T.
        Parameters:
        value - The value to use for the right hand side of the binary predicate
        Returns:
        The parent predicate container builder
        Since:
        1.4.0
      • expression

        T expression​(String expression)
        Uses the given expression as right hand side for the binary predicate. Finishes the binary predicate and adds it to the parent predicate container represented by the type T.
        Parameters:
        expression - The expression to use for the right hand side of the binary predicate
        Returns:
        The parent predicate container builder
      • subqueries

        MultipleSubqueryInitiator<T> subqueries​(String expression)
        Starts a MultipleSubqueryInitiator that uses the given expression as right hand side for the binary predicate.

        All occurrences of subsequently defined subqueryAliases in expression will be replaced by the respective subquery. When the builder finishes, the predicate is added to the parent predicate container represented by the type T.

        Parameters:
        expression - The expression to use for the right hand side of the binary predicate
        Returns:
        The subquery initiator for building multiple subqueries for their respective subqueryAliases
        Since:
        1.2.0
      • caseWhenSubquery

        SubqueryInitiator<RestrictionBuilder<CaseWhenThenBuilder<CaseWhenBuilder<T>>>> caseWhenSubquery​(String subqueryAlias,
                                                                                                        String expression)
        Starts a SubqueryInitiator to create a when expression with a single predicate in which the left hand side will be a subquery.

        When the subquery builder and the restriction builder for the right hand side are finished, the when predicate in conjunction with its then expression are added to the case when builder.

        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:
        More details about this method
      • caseWhenSubquery

        SubqueryBuilder<RestrictionBuilder<CaseWhenThenBuilder<CaseWhenBuilder<T>>>> caseWhenSubquery​(FullQueryBuilder<?,​?> criteriaBuilder)
        Starts a SubqueryBuilder based on the given criteria builder to create a when expression with a single predicate in which the left hand side will be a subquery.

        When the subquery builder and the restriction builder for the right hand side are finished, the when predicate in conjunction with its then expression are added to the case when builder.

        Parameters:
        criteriaBuilder - The criteria builder to base the subquery on
        Returns:
        The subquery builder for building a subquery
        Since:
        1.2.0
        See Also:
        More details about this method
      • caseWhenSubquery

        SubqueryBuilder<RestrictionBuilder<CaseWhenThenBuilder<CaseWhenBuilder<T>>>> caseWhenSubquery​(String subqueryAlias,
                                                                                                      String expression,
                                                                                                      FullQueryBuilder<?,​?> criteriaBuilder)
        Starts a SubqueryBuilder based on the given criteria builder to create a when expression with a single predicate in which the left hand side will be a subquery.

        When the subquery builder and the restriction builder for the right hand side are finished, the when predicate in conjunction with its then expression are added to the case when builder.

        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:
        More details about this method
      • caseWhenSubqueries

        MultipleSubqueryInitiator<RestrictionBuilder<CaseWhenThenBuilder<CaseWhenBuilder<T>>>> caseWhenSubqueries​(String expression)
        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 select item is added to the parent container represented by the type X.

        Parameters:
        expression - The expression which will be added as select item. This expression contains the subqueryAlias to define the insertion points for the subquery.
        Returns:
        The subquery initiator for building a subquery
        Since:
        1.2.0
      • simpleCase

        SimpleCaseWhenBuilder<T> simpleCase​(String caseOperand)
        Starts a SimpleCaseWhenBuilder for building a simple case when expression.

        When the builder finishes, the when predicate in conjunction with its then expression are added to the case when builder.

        Parameters:
        caseOperand - The case operand
        Returns:
        The or predicate builder for the when expression
        See Also:
        More details about this method