Class LimitClauseTerminalImpl<DTO>

java.lang.Object
org.litebridge.orm.api.select.impl.DelegatingSelectTerminal<DTO>
org.litebridge.orm.api.select.impl.LimitClauseTerminalImpl<DTO>
Type Parameters:
DTO - the mapped DTO/entity type or row type
All Implemented Interfaces:
LimitClauseTerminal<DTO>, SelectTerminal<DTO>
Direct Known Subclasses:
OrderByClauseTerminalImpl

public class LimitClauseTerminalImpl<DTO> extends DelegatingSelectTerminal<DTO> implements LimitClauseTerminal<DTO>
Implementation of LimitClauseTerminal for LIMIT and OFFSET clauses.
  • Constructor Details

    • LimitClauseTerminalImpl

      public LimitClauseTerminalImpl(@Nullable QueryNode node, SelectEngineTerminal selectEngineTerminal, LitebridgeContext litebridgeContext)
      Creates a new LimitClauseTerminalImpl instance without an explicit limit.
      Parameters:
      node - the query node
      selectEngineTerminal - the terminal select engine
      litebridgeContext - the Litebridge context
    • LimitClauseTerminalImpl

      public LimitClauseTerminalImpl(Integer limit, @Nullable QueryNode node, SelectEngineTerminal selectEngineTerminal, LitebridgeContext litebridgeContext)
      Creates a new LimitClauseTerminalImpl instance with a limit.
      Parameters:
      limit - the maximum number of rows to return
      node - the query node
      selectEngineTerminal - the terminal select engine
      litebridgeContext - the Litebridge context
  • Method Details

    • offset

      public SelectTerminal<DTO> offset(int offset)
      Description copied from interface: LimitClauseTerminal
      Sets an offset to skip a specified number of rows in the result set. This is typically used in combination with a limit clause for implementing pagination in queries.
      Specified by:
      offset in interface LimitClauseTerminal<DTO>
      Parameters:
      offset - the number of rows to skip in the result set, must be a non-negative integer
      Returns:
      an instance of SelectTerminal<DTO> to continue building or executing the query