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 Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RestrictionBuilder<CaseWhenThenBuilder<CaseWhenBuilder<T>>>
caseWhen(String expression)
Starts aRestrictionBuilder
to create a when expression with a single predicate in whichexpression
will be on the left hand side of the predicate.CaseWhenAndThenBuilder<CaseWhenBuilder<T>>
caseWhenAnd()
Starts aCaseWhenAndThenBuilder
for building a when expression with conjunctively connected predicates.SubqueryInitiator<CaseWhenThenBuilder<CaseWhenBuilder<T>>>
caseWhenExists()
Starts aSubqueryInitiator
to create a when expression with a single exists predicate.SubqueryBuilder<CaseWhenThenBuilder<CaseWhenBuilder<T>>>
caseWhenExists(FullQueryBuilder<?,?> criteriaBuilder)
Starts aSubqueryInitiator
to create a when expression with a single exists predicate.SubqueryInitiator<CaseWhenThenBuilder<CaseWhenBuilder<T>>>
caseWhenNotExists()
Starts aSubqueryInitiator
to create a when expression with a single negated exists predicate.SubqueryBuilder<CaseWhenThenBuilder<CaseWhenBuilder<T>>>
caseWhenNotExists(FullQueryBuilder<?,?> criteriaBuilder)
Starts aSubqueryInitiator
to create a when expression with a single negated exists predicate.CaseWhenOrThenBuilder<CaseWhenBuilder<T>>
caseWhenOr()
Starts aCaseWhenOrThenBuilder
for building a when expression with disjunctively connected predicates.MultipleSubqueryInitiator<RestrictionBuilder<CaseWhenThenBuilder<CaseWhenBuilder<T>>>>
caseWhenSubqueries(String expression)
Starts aSubqueryInitiator
for the left hand side of a when predicate.SubqueryInitiator<RestrictionBuilder<CaseWhenThenBuilder<CaseWhenBuilder<T>>>>
caseWhenSubquery()
Starts aSubqueryInitiator
to create a when expression with a single predicate in which the left hand side will be a subquery.SubqueryBuilder<RestrictionBuilder<CaseWhenThenBuilder<CaseWhenBuilder<T>>>>
caseWhenSubquery(FullQueryBuilder<?,?> criteriaBuilder)
Starts aSubqueryBuilder
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.SubqueryInitiator<RestrictionBuilder<CaseWhenThenBuilder<CaseWhenBuilder<T>>>>
caseWhenSubquery(String subqueryAlias, String expression)
Starts aSubqueryInitiator
to create a when expression with a single predicate in which the left hand side will be a subquery.SubqueryBuilder<RestrictionBuilder<CaseWhenThenBuilder<CaseWhenBuilder<T>>>>
caseWhenSubquery(String subqueryAlias, String expression, FullQueryBuilder<?,?> criteriaBuilder)
Starts aSubqueryBuilder
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.T
expression(String expression)
Uses the given expression as right hand side for the binary predicate.T
literal(Object value)
Uses the given value as right hand side for the binary predicate rendered as literal.SimpleCaseWhenBuilder<T>
simpleCase(String caseOperand)
Starts aSimpleCaseWhenBuilder
for building a simple case when expression.MultipleSubqueryInitiator<T>
subqueries(String expression)
Starts aMultipleSubqueryInitiator
that uses the given expression as right hand side for the binary predicate.T
value(Object value)
Uses the given value as right hand side for the binary predicate.
-
-
-
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 typeT
.- 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 typeT
.- 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 typeT
.- 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 aMultipleSubqueryInitiator
that uses the given expression as right hand side for the binary predicate.All occurrences of subsequently defined
subqueryAlias
es inexpression
will be replaced by the respective subquery. When the builder finishes, the predicate is added to the parent predicate container represented by the typeT
.- 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
-
caseWhen
RestrictionBuilder<CaseWhenThenBuilder<CaseWhenBuilder<T>>> caseWhen(String expression)
Starts aRestrictionBuilder
to create a when expression with a single predicate in whichexpression
will be on the left hand side of the predicate.- Parameters:
expression
- The left hand side expression for a when predicate- Returns:
- The restriction builder for the given expression
- See Also:
More details about this method
-
caseWhenSubquery
SubqueryInitiator<RestrictionBuilder<CaseWhenThenBuilder<CaseWhenBuilder<T>>>> caseWhenSubquery()
Starts aSubqueryInitiator
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.
- Returns:
- The subquery initiator for building a subquery
- See Also:
More details about this method
-
caseWhenSubquery
SubqueryInitiator<RestrictionBuilder<CaseWhenThenBuilder<CaseWhenBuilder<T>>>> caseWhenSubquery(String subqueryAlias, String expression)
Starts aSubqueryInitiator
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 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:
More details about this method
-
caseWhenSubquery
SubqueryBuilder<RestrictionBuilder<CaseWhenThenBuilder<CaseWhenBuilder<T>>>> caseWhenSubquery(FullQueryBuilder<?,?> criteriaBuilder)
Starts aSubqueryBuilder
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 aSubqueryBuilder
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 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:
More details about this method
-
caseWhenSubqueries
MultipleSubqueryInitiator<RestrictionBuilder<CaseWhenThenBuilder<CaseWhenBuilder<T>>>> caseWhenSubqueries(String expression)
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 select item is added to the parent container represented by the typeX
.- Parameters:
expression
- The expression which will be added as select item. This expression contains thesubqueryAlias
to define the insertion points for the subquery.- Returns:
- The subquery initiator for building a subquery
- Since:
- 1.2.0
-
caseWhenExists
SubqueryInitiator<CaseWhenThenBuilder<CaseWhenBuilder<T>>> caseWhenExists()
Starts aSubqueryInitiator
to create a when expression with a single exists predicate.When the builder finishes, the when predicate in conjunction with its then expression are added to the case when builder.
- Returns:
- The subquery initiator for building a subquery
- See Also:
More details about this method
-
caseWhenNotExists
SubqueryInitiator<CaseWhenThenBuilder<CaseWhenBuilder<T>>> caseWhenNotExists()
Starts aSubqueryInitiator
to create a when expression with a single negated exists predicate.When the builder finishes, the when predicate in conjunction with its then expression are added to the case when builder.
- Returns:
- The subquery initiator for building a subquery
- See Also:
More details about this method
-
caseWhenExists
SubqueryBuilder<CaseWhenThenBuilder<CaseWhenBuilder<T>>> caseWhenExists(FullQueryBuilder<?,?> criteriaBuilder)
Starts aSubqueryInitiator
to create a when expression with a single exists predicate.When the builder finishes, 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
-
caseWhenNotExists
SubqueryBuilder<CaseWhenThenBuilder<CaseWhenBuilder<T>>> caseWhenNotExists(FullQueryBuilder<?,?> criteriaBuilder)
Starts aSubqueryInitiator
to create a when expression with a single negated exists predicate.When the builder finishes, 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
-
caseWhenAnd
CaseWhenAndThenBuilder<CaseWhenBuilder<T>> caseWhenAnd()
Starts aCaseWhenAndThenBuilder
for building a when expression with conjunctively connected predicates.When the builder finishes, the when predicate in conjunction with its then expression are added to the case when builder.
- Returns:
- The and predicate builder for the when expression
- See Also:
More details about this method
-
caseWhenOr
CaseWhenOrThenBuilder<CaseWhenBuilder<T>> caseWhenOr()
Starts aCaseWhenOrThenBuilder
for building a when expression with disjunctively connected predicates.When the builder finishes, the when predicate in conjunction with its then expression are added to the case when builder.
- Returns:
- The or predicate builder for the when expression
- See Also:
More details about this method
-
simpleCase
SimpleCaseWhenBuilder<T> simpleCase(String caseOperand)
Starts aSimpleCaseWhenBuilder
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
-
-