Package com.blazebit.persistence
Interface BaseHavingBuilder<T extends BaseHavingBuilder<T>>
- Type Parameters:
T
- The concrete builder type
- All Known Subinterfaces:
BaseCriteriaBuilder<T,X>
,BaseCTECriteriaBuilder<X>
,BaseFromQueryBuilder<T,X>
,BaseInsertCriteriaBuilder<T,X>
,BaseSubqueryBuilder<X>
,CriteriaBuilder<T>
,FullSelectCTECriteriaBuilder<X>
,GroupByBuilder<X>
,HavingAndBuilder<T>
,HavingBuilder<T>
,HavingOrBuilder<T>
,InsertCriteriaBuilder<T>
,LeafOngoingSetOperationCriteriaBuilder<X>
,LeafOngoingSetOperationCTECriteriaBuilder<X>
,LeafOngoingSetOperationSubqueryBuilder<X>
,OngoingSetOperationCriteriaBuilder<T,Y>
,OngoingSetOperationCTECriteriaBuilder<T,Y>
,OngoingSetOperationSubqueryBuilder<T,Y>
,ReturningInsertCriteriaBuilder<T,X>
,SelectBaseCTECriteriaBuilder<X>
,SelectCTECriteriaBuilder<X>
,SelectRecursiveCTECriteriaBuilder<X>
,StartOngoingSetOperationCriteriaBuilder<X,Y>
,StartOngoingSetOperationCTECriteriaBuilder<X,Y>
,StartOngoingSetOperationSubqueryBuilder<X,Y>
,SubqueryBuilder<T>
public interface BaseHavingBuilder<T extends BaseHavingBuilder<T>>
A base interface for builders that support having.
This is related to the fact, that a query builder supports group by and having clauses.
- Since:
- 1.0.0
- Author:
- Christian Beikov
-
Method Summary
Modifier and Type Method Description RestrictionBuilder<T>
having(String expression)
Starts aRestrictionBuilder
for a having predicate with the given expression as left hand expression.CaseWhenStarterBuilder<RestrictionBuilder<T>>
havingCase()
Starts aCaseWhenBuilder
for a where predicate.SubqueryInitiator<T>
havingExists()
Starts an exists predicate for the having clause with a subquery on the right hand side.SubqueryBuilder<T>
havingExists(FullQueryBuilder<?,?> criteriaBuilder)
Starts an exists predicate for the having clause with a subquery on the right hand side based on the given criteria builder.T
havingExpression(String expression)
Adds the given expression as expression to the having clause.MultipleSubqueryInitiator<T>
havingExpressionSubqueries(String expression)
Starts aMultipleSubqueryInitiator
for expression of the having clause.SubqueryInitiator<T>
havingNotExists()
Starts an exists predicate for the having clause with a subquery on the right hand side.SubqueryBuilder<T>
havingNotExists(FullQueryBuilder<?,?> criteriaBuilder)
Starts an exists predicate for the having clause with a subquery on the right hand side based on the given criteria builder.SimpleCaseWhenStarterBuilder<RestrictionBuilder<T>>
havingSimpleCase(String expression)
Starts aSimpleCaseWhenBuilder
for a where predicate.MultipleSubqueryInitiator<RestrictionBuilder<T>>
havingSubqueries(String expression)
Starts aMultipleSubqueryInitiator
for the left hand side of a predicate.SubqueryInitiator<RestrictionBuilder<T>>
havingSubquery()
Starts aSubqueryInitiator
for the left hand side of a predicate.SubqueryBuilder<RestrictionBuilder<T>>
havingSubquery(FullQueryBuilder<?,?> criteriaBuilder)
Starts aSubqueryBuilder
base on the given criteria builder for the left hand side of a predicate.SubqueryInitiator<RestrictionBuilder<T>>
havingSubquery(String subqueryAlias, String expression)
Starts aSubqueryInitiator
for the left hand side of a predicate.SubqueryBuilder<RestrictionBuilder<T>>
havingSubquery(String subqueryAlias, String expression, FullQueryBuilder<?,?> criteriaBuilder)
Starts aSubqueryBuilder
base on the given criteria builder for the left hand side of a predicate.
-
Method Details
-
havingSubquery
SubqueryInitiator<RestrictionBuilder<T>> havingSubquery()Starts aSubqueryInitiator
for the left hand side of a predicate. When the subquery builder and the restriction builder for the right hand side are finished, the predicate is added to the parent predicate container represented by the typeT
.- Returns:
- The subquery initiator for building a subquery
-
havingSubquery
Starts aSubqueryInitiator
for the left hand side of a predicate. All occurrences ofsubqueryAlias
inexpression
will be replaced by the subquery. When the subquery builder and the restriction builder for the right hand side are finished, the predicate is added to the parent predicate container represented by the typeT
.- 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- Returns:
- The subquery initiator for building a subquery
-
havingSubqueries
Starts aMultipleSubqueryInitiator
for the left hand side of a 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 the predicate.- Parameters:
expression
- The expression which will be used as left hand side of a predicate- Returns:
- The subquery initiator for building multiple subqueries for their respective subqueryAliases
- Since:
- 1.2.0
-
havingSubquery
Starts aSubqueryBuilder
base on the given criteria builder for the left hand side of a predicate. When the subquery builder and the restriction builder for the right hand side are finished, the predicate is added to the parent predicate container represented by the typeT
.- Parameters:
criteriaBuilder
- The criteria builder to base the subquery on- Returns:
- The subquery builder for building a subquery
- Since:
- 1.2.0
-
havingSubquery
SubqueryBuilder<RestrictionBuilder<T>> havingSubquery(String subqueryAlias, String expression, FullQueryBuilder<?,?> criteriaBuilder)Starts aSubqueryBuilder
base on the given criteria builder for the left hand side of a predicate. All occurrences ofsubqueryAlias
inexpression
will be replaced by the subquery. When the subquery builder and the restriction builder for the right hand side are finished, the predicate is added to the parent predicate container represented by the typeT
.- 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 predicatecriteriaBuilder
- The criteria builder to base the subquery on- Returns:
- The subquery builder for building a subquery
- Since:
- 1.2.0
-
havingExpression
Adds the given expression as expression to the having clause.- Parameters:
expression
- The having expression- Returns:
- The builder
- Since:
- 1.4.0
-
havingExpressionSubqueries
Starts aMultipleSubqueryInitiator
for expression of the having clause.All occurrences of subsequently defined
subqueryAlias
es inexpression
will be replaced by the respective subquery. When the builder finishes, the resulting expression is added as expression to the having clause.- Parameters:
expression
- The having expression- Returns:
- The subquery initiator for building multiple subqueries for their respective subqueryAliases
- Since:
- 1.4.0
-
having
Starts aRestrictionBuilder
for a having predicate with the given expression as left hand expression. When the builder finishes, the predicate is added to the parent predicate container represented by the typeT
.- Parameters:
expression
- The left hand expression for a having predicate- Returns:
- The restriction builder for the given expression
-
havingCase
CaseWhenStarterBuilder<RestrictionBuilder<T>> havingCase()Starts aCaseWhenBuilder
for a where predicate. When theCaseWhenBuilder
and the restriction builder for the right hand side are finished, the predicate is added to the parent predicate container represented by the typeT
.- Returns:
- A
CaseWhenBuilder
-
havingSimpleCase
Starts aSimpleCaseWhenBuilder
for a where predicate. When theCaseWhenBuilder
and the restriction builder for the right hand side are finished, the predicate is added to the parent predicate container represented by the typeT
.- Parameters:
expression
- Case operand expression- Returns:
- A
CaseWhenBuilder
-
havingExists
SubqueryInitiator<T> havingExists()Starts an exists predicate for the having clause with a subquery on the right hand side. When the builder finishes, the predicate is added to the parent predicate container represented by the typeT
.- Returns:
- The subquery initiator for building a subquery
-
havingNotExists
SubqueryInitiator<T> havingNotExists()Starts an exists predicate for the having clause with a subquery on the right hand side. When the builder finishes, the predicate is added to the parent predicate container represented by the typeT
.- Returns:
- The subquery initiator for building a subquery
-
havingExists
Starts an exists predicate for the having clause with a subquery on the right hand side based on the given criteria builder. When the builder finishes, the predicate is added to the parent predicate container represented by the typeT
.- Parameters:
criteriaBuilder
- The criteria builder to base the subquery on- Returns:
- The subquery builder for building a subquery
- Since:
- 1.2.0
-
havingNotExists
Starts an exists predicate for the having clause with a subquery on the right hand side based on the given criteria builder. When the builder finishes, the predicate is added to the parent predicate container represented by the typeT
.- Parameters:
criteriaBuilder
- The criteria builder to base the subquery on- Returns:
- The subquery builder for building a subquery
- Since:
- 1.2.0
-