Interface OrderByClauseChain<DTO,OBC extends OrderByClause<DTO,OBC,OBCC>,OBCC extends OrderByClauseChain<DTO,OBC,OBCC>>

Type Parameters:
DTO - the data transfer object (DTO) type that represents the result of the query
OBC - the type of the OrderByClause used to define the ordering for a single set of expressions
OBCC - the type of the OrderByClauseChain used to continue chaining additional ordering clauses
All Superinterfaces:
LimitClauseTerminal<DTO>, OrderByClauseTerminal<DTO>, SelectTerminal<DTO>
All Known Implementing Classes:
DtoOrderByClauseChain, SqlOrderByClauseChain

public interface OrderByClauseChain<DTO,OBC extends OrderByClause<DTO,OBC,OBCC>,OBCC extends OrderByClauseChain<DTO,OBC,OBCC>> extends OrderByClauseTerminal<DTO>
Chainable clause for constructing complex ORDER BY clauses in a type-safe and fluent API for SQL query construction.

This interface allows chaining of multiple ORDER BY expressions, enabling the specification of ordering for various expressions or fields with explicit directions.

  • Method Details

    • then

      OBC then(String... columns)
      Adds another ordering expression which again requires an explicit direction. Each call to this method appends another ordering expression.
      Parameters:
      columns - Table column(s) or DTO field(s) to order by
      Returns:
      a selector chain with ordering applied
    • then

      OBC then(ExpressionSpec... columns)
      Adds another ordering expression which again requires an explicit direction. Each call to this method appends another ordering expression.
      Parameters:
      columns - expressions to order by
      Returns:
      a selector chain with ordering applied