T
- The builder type that is returned on terminal operationspublic interface BetweenBuilder<T>
This builder allows the specification of the upper bound of the between predicate. The left hand side expression of the between
predicate as well as the lower bound expression are already known to the builder and the methods of this builder either terminate the
building process or start a SubqueryInitiator
.
Modifier and Type | Method | Description |
---|---|---|
T |
and(Object end) |
Constructs a between predicate with a parameter as upper bound.
|
T |
andExpression(String end) |
Constructs a between predicate with an expression as upper bound.
|
SubqueryInitiator<T> |
andSubqery() |
Constructs a between predicate with a subquery as upper bound.
|
SubqueryBuilder<T> |
andSubqery(FullQueryBuilder<?,?> criteriaBuilder) |
Constructs a between predicate with a subquery based on the given criteria builder as upper bound.
|
SubqueryInitiator<T> |
andSubqery(String subqueryAlias,
String expression) |
Constructs a between predicate with an expression containing a subquery as upper bound.
|
SubqueryBuilder<T> |
andSubqery(String subqueryAlias,
String expression,
FullQueryBuilder<?,?> criteriaBuilder) |
Constructs a between predicate with an expression containing a subquery as upper bound.
|
MultipleSubqueryInitiator<T> |
andSubqueries(String expression) |
Constructs a between predicate with an expression containing the given expression as upper bound.
|
T and(Object end)
end
- The parameter for the upper boundT andExpression(String end)
end
- The upper bound expressionSubqueryInitiator<T> andSubqery()
SubqueryInitiator
for building the upper bound subquery.SubqueryInitiator<T> andSubqery(String subqueryAlias, String expression)
All occurrences of subqueryAlias
in expression
will be replaced by the subquery. This allows to build
expressions containing subqueries like following example shows:
andSubquery("x", "x * 2 + 1").from(Person.class, "p").select("COUNT(p)").end();
results in:
(SELECT COUNT(p) FROM Person p) * 2 + 1
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
for building the upper bound subquery.MultipleSubqueryInitiator<T> andSubqueries(String expression)
All occurrences of subsequently defined subqueryAlias
es in expression
will be replaced by the respective subquery.
When the builder finishes, the resulting expression is used for the upper bound of the between predicate.
expression
- The expression which will be used as upper bound of a the between predicateSubqueryBuilder<T> andSubqery(FullQueryBuilder<?,?> criteriaBuilder)
criteriaBuilder
- The criteria builder to base the subquery onSubqueryBuilder<T> andSubqery(String subqueryAlias, String expression, FullQueryBuilder<?,?> criteriaBuilder)
All occurrences of subqueryAlias
in expression
will be replaced by the subquery. This allows to build
expressions containing subqueries like following example shows:
andSubquery("x", "x * 2 + 1").from(Person.class, "p").select("COUNT(p)").end();
results in:
(SELECT COUNT(p) FROM Person p) * 2 + 1
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.criteriaBuilder
- The criteria builder to base the subquery onCopyright © 2014–2018 Blazebit. All rights reserved.