Package com.blazebit.persistence
Interface SelectObjectBuilder<T extends FullQueryBuilder<?,T>>
- Type Parameters:
T
- The query builder that is returned on terminal operations
public interface SelectObjectBuilder<T extends FullQueryBuilder<?,T>>
The builder interface for a select new select clause.
- Since:
- 1.0.0
- Author:
- Christian Beikov
-
Method Summary
Modifier and TypeMethodDescriptionend()
Finishes the select object builder.Likewith(int, java.lang.String, java.lang.String)
but without an alias.Adds the given expression at the given position to the arguments for the select new select clause.Likewith(java.lang.String, java.lang.String)
but without an alias.Adds the given expression to the arguments for the select new select clause.withSubqueries
(int position, String expression) LikewithSubqueries(int,java.lang.String,java.lang.String)
but without an alias.withSubqueries
(int position, String expression, String selectAlias) LikewithSubqueries(java.lang.String,java.lang.String)
but adds the resulting expression to the given position.withSubqueries
(String expression) LikeSelectBuilder.selectSubqueries(java.lang.String,java.lang.String)
but without a select alias.withSubqueries
(String expression, String selectAlias) Starts aMultipleSubqueryInitiator
for a new argument for the select new clause with the given select alias.LikewithSubquery(java.lang.String)
but without an alias.withSubquery
(int position) LikewithSubquery(int,java.lang.String)
but without an alias.withSubquery
(int position, FullQueryBuilder<?, ?> criteriaBuilder) LikewithSubquery(int,java.lang.String,FullQueryBuilder)
but without an alias.withSubquery
(int position, String alias) LikewithSubquery(java.lang.String)
but adds the resulting subquery expression to the given position.withSubquery
(int position, String alias, FullQueryBuilder<?, ?> criteriaBuilder) LikewithSubquery(java.lang.String,FullQueryBuilder)
but adds the resulting subquery expression to the given position.withSubquery
(int position, String subqueryAlias, String expression) LikewithSubquery(java.lang.String,java.lang.String,java.lang.String)
but adds the resulting subquery expression to the given position.withSubquery
(int position, String subqueryAlias, String expression, FullQueryBuilder<?, ?> criteriaBuilder) LikewithSubquery(java.lang.String,java.lang.String,java.lang.String,FullQueryBuilder)
but adds the resulting subquery expression to the given position.withSubquery
(int position, String subqueryAlias, String expression, String selectAlias) LikewithSubquery(java.lang.String,java.lang.String,java.lang.String)
but adds the resulting subquery expression to the given position.withSubquery
(int position, String subqueryAlias, String expression, String selectAlias, FullQueryBuilder<?, ?> criteriaBuilder) LikewithSubquery(java.lang.String,java.lang.String,java.lang.String,FullQueryBuilder)
but adds the resulting subquery expression to the given position.withSubquery
(FullQueryBuilder<?, ?> criteriaBuilder) LikewithSubquery(java.lang.String, FullQueryBuilder)
but without an alias.withSubquery
(String alias) Starts a subquery builder which allows the result of the specified subquery to be passed as argument to the select new clause.withSubquery
(String alias, FullQueryBuilder<?, ?> criteriaBuilder) Starts aSubqueryBuilder
based on the given criteria builder which allows the result of the specified subquery to be passed as argument to the select new clause.withSubquery
(String subqueryAlias, String expression) LikeSelectBuilder.selectSubquery(java.lang.String,java.lang.String,java.lang.String)
but without a select alias.withSubquery
(String subqueryAlias, String expression, FullQueryBuilder<?, ?> criteriaBuilder) LikeSelectBuilder.selectSubquery(java.lang.String,java.lang.String,java.lang.String,FullQueryBuilder)
but without a select alias.withSubquery
(String subqueryAlias, String expression, String selectAlias) Starts aSubqueryInitiator
for a new argument for the select new clause with the given select alias.withSubquery
(String subqueryAlias, String expression, String selectAlias, FullQueryBuilder<?, ?> criteriaBuilder) Starts aSubqueryBuilder
based on the given criteria builder for a new argument for the select new clause with the given select alias.
-
Method Details
-
withSubquery
SubqueryInitiator<SelectObjectBuilder<T>> withSubquery()LikewithSubquery(java.lang.String)
but without an alias.- Returns:
- The subquery initiator for building a subquery
-
withSubquery
Starts a subquery builder which allows the result of the specified subquery to be passed as argument to the select new clause.- Parameters:
alias
- The alias for the subquery- Returns:
- A starting point for the subquery specification
-
withSubquery
SubqueryInitiator<SelectObjectBuilder<T>> withSubquery(String subqueryAlias, String expression, String selectAlias) Starts aSubqueryInitiator
for a new argument for the select new clause 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
- Since:
- 1.2.0
-
withSubquery
LikeSelectBuilder.selectSubquery(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
- Since:
- 1.2.0
-
withSubqueries
MultipleSubqueryInitiator<SelectObjectBuilder<T>> withSubqueries(String expression, String selectAlias) Starts aMultipleSubqueryInitiator
for a new argument for the select new clause 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 multiple subqueries for their respective subqueryAliases
- Since:
- 1.2.0
-
withSubqueries
LikeSelectBuilder.selectSubqueries(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 multiple subqueries for their respective subqueryAliases
- Since:
- 1.2.0
-
withSubquery
LikewithSubquery(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
-
withSubquery
SubqueryBuilder<SelectObjectBuilder<T>> withSubquery(String alias, FullQueryBuilder<?, ?> criteriaBuilder) Starts aSubqueryBuilder
based on the given criteria builder which allows the result of the specified subquery to be passed as argument to the select new clause.- Parameters:
alias
- The alias for the subquerycriteriaBuilder
- The criteria builder to base the subquery on- Returns:
- The subquery builder for building a subquery
- Since:
- 1.2.0
-
withSubquery
SubqueryBuilder<SelectObjectBuilder<T>> withSubquery(String subqueryAlias, String expression, String selectAlias, FullQueryBuilder<?, ?> criteriaBuilder) Starts aSubqueryBuilder
based on the given criteria builder for a new argument for the select new clause 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
-
withSubquery
SubqueryBuilder<SelectObjectBuilder<T>> withSubquery(String subqueryAlias, String expression, FullQueryBuilder<?, ?> criteriaBuilder) LikeSelectBuilder.selectSubquery(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
-
with
Likewith(java.lang.String, java.lang.String)
but without an alias.- Parameters:
expression
- The expression to add- Returns:
- A starting point for the subquery specification
-
with
Adds the given expression to the arguments for the select new select clause.- Parameters:
expression
- The expression to addalias
- The alias for the expression- Returns:
- This select object builder
- Throws:
IllegalStateException
- Is thrown when the argument position is already taken
-
with
Likewith(int, java.lang.String, java.lang.String)
but without an alias.- Parameters:
position
- The position at which the expression should be addedexpression
- The expression to add- Returns:
- A starting point for the subquery specification
-
with
Adds the given expression at the given position to the arguments for the select new select clause.- Parameters:
position
- The position at which the expression should be addedexpression
- The expression to addalias
- The alias for the expression- Returns:
- This select object builder
- Throws:
IllegalStateException
- Is thrown when the argument position is already taken
-
withSubquery
LikewithSubquery(int,java.lang.String)
but without an alias.- Parameters:
position
- The position at which the expression should be added- Returns:
- The subquery initiator for building a subquery
- Since:
- 1.2.0
-
withSubquery
LikewithSubquery(java.lang.String)
but adds the resulting subquery expression to the given position.- Parameters:
position
- The position at which the expression should be addedalias
- The alias for the subquery- Returns:
- The subquery initiator for building a subquery
- Since:
- 1.2.0
-
withSubquery
SubqueryInitiator<SelectObjectBuilder<T>> withSubquery(int position, String subqueryAlias, String expression, String selectAlias) LikewithSubquery(java.lang.String,java.lang.String,java.lang.String)
but adds the resulting subquery expression to the given position.- Parameters:
position
- The position at which the expression should be addedsubqueryAlias
- The alias for the subquery which will be replaced by the actual subqueryexpression
- The expression which will be added as select item.selectAlias
- The select alias for the expression- Returns:
- The subquery initiator for building a subquery
- Since:
- 1.2.0
-
withSubquery
SubqueryInitiator<SelectObjectBuilder<T>> withSubquery(int position, String subqueryAlias, String expression) LikewithSubquery(java.lang.String,java.lang.String,java.lang.String)
but adds the resulting subquery expression to the given position.- Parameters:
position
- The position at which the expression should be addedsubqueryAlias
- 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
- Since:
- 1.2.0
-
withSubqueries
MultipleSubqueryInitiator<SelectObjectBuilder<T>> withSubqueries(int position, String expression, String selectAlias) LikewithSubqueries(java.lang.String,java.lang.String)
but adds the resulting expression to the given position.- Parameters:
position
- The position at which the expression should be addedexpression
- The expression which will be added as select item.selectAlias
- The select alias for the expression- Returns:
- The subquery initiator for building multiple subqueries for their respective subqueryAliases
- Since:
- 1.2.0
-
withSubqueries
LikewithSubqueries(int,java.lang.String,java.lang.String)
but without an alias.- Parameters:
position
- The position at which the expression should be addedexpression
- The expression which will be added as select item.- Returns:
- The subquery initiator for building multiple subqueries for their respective subqueryAliases
- Since:
- 1.2.0
-
withSubquery
SubqueryBuilder<SelectObjectBuilder<T>> withSubquery(int position, FullQueryBuilder<?, ?> criteriaBuilder) LikewithSubquery(int,java.lang.String,FullQueryBuilder)
but without an alias.- Parameters:
position
- The position at which the expression should be addedcriteriaBuilder
- The criteria builder to base the subquery on- Returns:
- The subquery builder for building a subquery
- Since:
- 1.2.0
-
withSubquery
SubqueryBuilder<SelectObjectBuilder<T>> withSubquery(int position, String alias, FullQueryBuilder<?, ?> criteriaBuilder) LikewithSubquery(java.lang.String,FullQueryBuilder)
but adds the resulting subquery expression to the given position.- Parameters:
position
- The position at which the expression should be addedalias
- The alias for the subquerycriteriaBuilder
- The criteria builder to base the subquery on- Returns:
- The subquery builder for building a subquery
- Since:
- 1.2.0
-
withSubquery
SubqueryBuilder<SelectObjectBuilder<T>> withSubquery(int position, String subqueryAlias, String expression, String selectAlias, FullQueryBuilder<?, ?> criteriaBuilder) LikewithSubquery(java.lang.String,java.lang.String,java.lang.String,FullQueryBuilder)
but adds the resulting subquery expression to the given position.- Parameters:
position
- The position at which the expression should be addedsubqueryAlias
- The alias for the subquery which will be replaced by the actual subqueryexpression
- The expression which will be added as select item.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
-
withSubquery
SubqueryBuilder<SelectObjectBuilder<T>> withSubquery(int position, String subqueryAlias, String expression, FullQueryBuilder<?, ?> criteriaBuilder) LikewithSubquery(java.lang.String,java.lang.String,java.lang.String,FullQueryBuilder)
but adds the resulting subquery expression to the given position.- Parameters:
position
- The position at which the expression should be addedsubqueryAlias
- The alias for the subquery which will be replaced by the actual subqueryexpression
- The expression which will be added as select item.criteriaBuilder
- The criteria builder to base the subquery on- Returns:
- The subquery builder for building a subquery
- Since:
- 1.2.0
-
end
T end()Finishes the select object builder.- Returns:
- The query builder
-