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 Details

    • selectCase

      CaseWhenStarterBuilder<X> selectCase()
      Like selectCase(java.lang.String) but without an alias.
      Returns:
      The case when builder
    • selectCase

      CaseWhenStarterBuilder<X> selectCase​(String alias)
      Starts a CaseWhenBuilder 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)
      Parameters:
      caseOperand - The case operand
      Returns:
      The simple case when builder
    • selectSimpleCase

      SimpleCaseWhenStarterBuilder<X> selectSimpleCase​(String caseOperand, String alias)
      Starts a SimpleCaseWhenBuilder 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 operand
      alias - The select alias for the simple case when expression
      Returns:
      The simple case when builder
    • selectSubquery

      SubqueryInitiator<X> selectSubquery()
      Like selectSubquery(java.lang.String) but without an alias.
      Returns:
      The subquery initiator for building a subquery
    • selectSubquery

      SubqueryInitiator<X> selectSubquery​(String alias)
      Starts a SubqueryInitiator for the select item with the given alias. When the builder finishes, the select item is added to the parent container represented by the type X.
      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 a SubqueryInitiator for a new select item with the given select alias.

      All occurrences of subqueryAlias in expression will be replaced by the subquery. When the builder finishes, the select item is added to the parent container represented by the type X.

      Parameters:
      subqueryAlias - The alias for the subquery which will be replaced by the actual subquery
      expression - The expression which will be added as select item. This expression contains the subqueryAlias 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)
      Parameters:
      subqueryAlias - The alias for the subquery which will be replaced by the actual subquery
      expression - 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 a MultipleSubqueryInitiator for a new select item with the given select alias.

      All occurrences of subsequently defined subqueryAliases in expression will be replaced by the respective subquery. When the builder finishes, the select item is added to the parent container represented by the type X.

      Parameters:
      expression - The expression which will be added as select item. This expression contains the subqueryAlias 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)
      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)
      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 a SubqueryBuilder 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 type X.
      Parameters:
      alias - The select alias for the subquery
      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 subqueryAlias, String expression, String selectAlias, FullQueryBuilder<?,​?> criteriaBuilder)
      Starts a SubqueryBuilder based on the given criteria builder for a new select item with the given select alias.

      All occurrences of subqueryAlias in expression will be replaced by the subquery. When the builder finishes, the select item is added to the parent container represented by the type X.

      Parameters:
      subqueryAlias - The alias for the subquery which will be replaced by the actual subquery
      expression - The expression which will be added as select item. This expression contains the subqueryAlias to define the insertion points for the subquery.
      selectAlias - The select alias for the expression
      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 subqueryAlias, String expression, FullQueryBuilder<?,​?> criteriaBuilder)
      Parameters:
      subqueryAlias - The alias for the subquery which will be replaced by the actual subquery
      expression - 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
    • 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
    • select

      X select​(String expression, String alias)
      Adds a select clause with the given expression and alias to the query.
      Parameters:
      expression - The expression for the select clause
      alias - The alias for the expression
      Returns:
      The query builder for chaining calls