Package com.blazebit.persistence
Interface SelectBuilder<X>
-
- Type Parameters:
X
- The result type
- All Known Subinterfaces:
BaseCriteriaBuilder<T,X>
,BaseQueryBuilder<T,X>
,BaseSubqueryBuilder<X>
,CriteriaBuilder<T>
,FullQueryBuilder<T,X>
,LeafOngoingSetOperationCriteriaBuilder<X>
,LeafOngoingSetOperationSubqueryBuilder<X>
,OngoingSetOperationCriteriaBuilder<T,Y>
,OngoingSetOperationSubqueryBuilder<T,Y>
,PaginatedCriteriaBuilder<T>
,QueryBuilder<T,X>
,StartOngoingSetOperationCriteriaBuilder<X,Y>
,StartOngoingSetOperationSubqueryBuilder<X,Y>
,SubqueryBuilder<T>
public interface SelectBuilder<X>
An interface for builders that support selecting. This is related to the fact, that a query builder supports select clauses.- Since:
- 1.0.0
- Author:
- Christian Beikov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description X
select(String expression)
Adds a select clause with the given expression to the query.X
select(String expression, String alias)
Adds a select clause with the given expression and alias to the query.CaseWhenStarterBuilder<X>
selectCase()
LikeselectCase(java.lang.String)
but without an alias.CaseWhenStarterBuilder<X>
selectCase(String alias)
Starts aCaseWhenBuilder
with the given alias as select alias.SimpleCaseWhenStarterBuilder<X>
selectSimpleCase(String caseOperand)
LikeselectSimpleCase(java.lang.String, java.lang.String)
but without an alias.SimpleCaseWhenStarterBuilder<X>
selectSimpleCase(String caseOperand, String alias)
Starts aSimpleCaseWhenBuilder
with the given alias as select alias.MultipleSubqueryInitiator<X>
selectSubqueries(String expression)
LikeselectSubqueries(java.lang.String,java.lang.String)
but without a select alias.MultipleSubqueryInitiator<X>
selectSubqueries(String expression, String selectAlias)
Starts aMultipleSubqueryInitiator
for a new select item with the given select alias.SubqueryInitiator<X>
selectSubquery()
LikeselectSubquery(java.lang.String)
but without an alias.SubqueryBuilder<X>
selectSubquery(FullQueryBuilder<?,?> criteriaBuilder)
LikeselectSubquery(java.lang.String, FullQueryBuilder)
but without an alias.SubqueryInitiator<X>
selectSubquery(String alias)
Starts aSubqueryInitiator
for the select item with the given alias.SubqueryBuilder<X>
selectSubquery(String alias, FullQueryBuilder<?,?> criteriaBuilder)
Starts aSubqueryBuilder
based on the given criteria builder for the select item with the given alias.SubqueryInitiator<X>
selectSubquery(String subqueryAlias, String expression)
LikeselectSubquery(java.lang.String,java.lang.String,java.lang.String)
but without a select alias.SubqueryBuilder<X>
selectSubquery(String subqueryAlias, String expression, FullQueryBuilder<?,?> criteriaBuilder)
LikeselectSubquery(java.lang.String,java.lang.String,java.lang.String, FullQueryBuilder)
but without a select alias.SubqueryInitiator<X>
selectSubquery(String subqueryAlias, String expression, String selectAlias)
Starts aSubqueryInitiator
for a new select item with the given select alias.SubqueryBuilder<X>
selectSubquery(String subqueryAlias, String expression, String selectAlias, FullQueryBuilder<?,?> criteriaBuilder)
Starts aSubqueryBuilder
based on the given criteria builder for a new select item with the given select alias.
-
-
-
Method Detail
-
selectCase
CaseWhenStarterBuilder<X> selectCase()
LikeselectCase(java.lang.String)
but without an alias.- Returns:
- The case when builder
-
selectCase
CaseWhenStarterBuilder<X> selectCase(String alias)
Starts aCaseWhenBuilder
with the given alias as select alias.- Parameters:
alias
- The select alias for the case when expression- Returns:
- The case when builder
-
selectSimpleCase
SimpleCaseWhenStarterBuilder<X> selectSimpleCase(String caseOperand)
LikeselectSimpleCase(java.lang.String, java.lang.String)
but without an alias.- Parameters:
caseOperand
- The case operand- Returns:
- The simple case when builder
-
selectSimpleCase
SimpleCaseWhenStarterBuilder<X> selectSimpleCase(String caseOperand, String alias)
Starts aSimpleCaseWhenBuilder
with the given alias as select alias. The expression is the case operand which will be compared to the when expressions defined in the subsequent SimpleCaseWhenBuilder.- Parameters:
caseOperand
- The case operandalias
- The select alias for the simple case when expression- Returns:
- The simple case when builder
-
selectSubquery
SubqueryInitiator<X> selectSubquery()
LikeselectSubquery(java.lang.String)
but without an alias.- Returns:
- The subquery initiator for building a subquery
-
selectSubquery
SubqueryInitiator<X> selectSubquery(String alias)
Starts aSubqueryInitiator
for the select item with the given alias. When the builder finishes, the select item is added to the parent container represented by the typeX
.- Parameters:
alias
- The select alias for the subquery- Returns:
- The subquery initiator for building a subquery
-
selectSubquery
SubqueryInitiator<X> selectSubquery(String subqueryAlias, String expression, String selectAlias)
Starts aSubqueryInitiator
for a new select item with the given select alias.All occurrences of
subqueryAlias
inexpression
will be replaced by the subquery. When the builder finishes, the select item is added to the parent container represented by the typeX
.- Parameters:
subqueryAlias
- The alias for the subquery which will be replaced by the actual subqueryexpression
- The expression which will be added as select item. This expression contains thesubqueryAlias
to define the insertion points for the subquery.selectAlias
- The select alias for the expression- Returns:
- The subquery initiator for building a subquery
-
selectSubquery
SubqueryInitiator<X> selectSubquery(String subqueryAlias, String expression)
LikeselectSubquery(java.lang.String,java.lang.String,java.lang.String)
but without a select alias.- Parameters:
subqueryAlias
- The alias for the subquery which will be replaced by the actual subqueryexpression
- The expression which will be added as select item- Returns:
- The subquery initiator for building a subquery
-
selectSubqueries
MultipleSubqueryInitiator<X> selectSubqueries(String expression, String selectAlias)
Starts aMultipleSubqueryInitiator
for a new select item with the given select alias.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.selectAlias
- The select alias for the expression- Returns:
- The subquery initiator for building a subquery
- Since:
- 1.2.0
-
selectSubqueries
MultipleSubqueryInitiator<X> selectSubqueries(String expression)
LikeselectSubqueries(java.lang.String,java.lang.String)
but without a select alias.- Parameters:
expression
- The expression which will be added as select item- Returns:
- The subquery initiator for building a subquery
- Since:
- 1.2.0
-
selectSubquery
SubqueryBuilder<X> selectSubquery(FullQueryBuilder<?,?> criteriaBuilder)
LikeselectSubquery(java.lang.String, FullQueryBuilder)
but without an alias.- Parameters:
criteriaBuilder
- The criteria builder to base the subquery on- Returns:
- The subquery builder for building a subquery
- Since:
- 1.2.0
-
selectSubquery
SubqueryBuilder<X> selectSubquery(String alias, FullQueryBuilder<?,?> criteriaBuilder)
Starts aSubqueryBuilder
based on the given criteria builder for the select item with the given alias. When the builder finishes, the select item is added to the parent container represented by the typeX
.- Parameters:
alias
- The select alias for the subquerycriteriaBuilder
- The criteria builder to base the subquery on- Returns:
- The subquery builder for building a subquery
- Since:
- 1.2.0
-
selectSubquery
SubqueryBuilder<X> selectSubquery(String subqueryAlias, String expression, String selectAlias, FullQueryBuilder<?,?> criteriaBuilder)
Starts aSubqueryBuilder
based on the given criteria builder for a new select item with the given select alias.All occurrences of
subqueryAlias
inexpression
will be replaced by the subquery. When the builder finishes, the select item is added to the parent container represented by the typeX
.- Parameters:
subqueryAlias
- The alias for the subquery which will be replaced by the actual subqueryexpression
- The expression which will be added as select item. This expression contains thesubqueryAlias
to define the insertion points for the subquery.selectAlias
- The select alias for the expressioncriteriaBuilder
- The criteria builder to base the subquery on- Returns:
- The subquery builder for building a subquery
- Since:
- 1.2.0
-
selectSubquery
SubqueryBuilder<X> selectSubquery(String subqueryAlias, String expression, FullQueryBuilder<?,?> criteriaBuilder)
LikeselectSubquery(java.lang.String,java.lang.String,java.lang.String, FullQueryBuilder)
but without a select alias.- Parameters:
subqueryAlias
- The alias for the subquery which will be replaced by the actual subqueryexpression
- The expression which will be added as select itemcriteriaBuilder
- The criteria builder to base the subquery on- Returns:
- The subquery builder for building a subquery
- Since:
- 1.2.0
-
select
X select(String expression)
Adds a select clause with the given expression to the query.- Parameters:
expression
- The expression for the select clause- Returns:
- The query builder for chaining calls
-
-