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.-
Field Summary
Fields inherited from class org.litebridge.orm.api.select.impl.DelegatingSelectTerminal
litebridgeContext, node, pendingNode, selectEngineTerminal -
Constructor Summary
ConstructorsConstructorDescriptionLimitClauseTerminalImpl(Integer limit, @Nullable QueryNode node, SelectEngineTerminal selectEngineTerminal, LitebridgeContext litebridgeContext) Creates a newLimitClauseTerminalImplinstance with a limit.LimitClauseTerminalImpl(@Nullable QueryNode node, SelectEngineTerminal selectEngineTerminal, LitebridgeContext litebridgeContext) Creates a newLimitClauseTerminalImplinstance without an explicit limit. -
Method Summary
Modifier and TypeMethodDescriptionoffset(int offset) Sets an offset to skip a specified number of rows in the result set.Methods inherited from class org.litebridge.orm.api.select.impl.DelegatingSelectTerminal
first, firstOrNull, firstOrThrow, firstOrThrow, list, litebridgeContext, node, one, oneOrNull, oneOrThrow, oneOrThrow, stream, toSqlMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.litebridge.orm.api.select.SelectTerminal
first, firstOrNull, firstOrThrow, firstOrThrow, list, one, oneOrNull, oneOrThrow, oneOrThrow, stream, toSql
-
Constructor Details
-
LimitClauseTerminalImpl
public LimitClauseTerminalImpl(@Nullable QueryNode node, SelectEngineTerminal selectEngineTerminal, LitebridgeContext litebridgeContext) Creates a newLimitClauseTerminalImplinstance without an explicit limit.- Parameters:
node- the query nodeselectEngineTerminal- the terminal select enginelitebridgeContext- the Litebridge context
-
LimitClauseTerminalImpl
public LimitClauseTerminalImpl(Integer limit, @Nullable QueryNode node, SelectEngineTerminal selectEngineTerminal, LitebridgeContext litebridgeContext) Creates a newLimitClauseTerminalImplinstance with a limit.- Parameters:
limit- the maximum number of rows to returnnode- the query nodeselectEngineTerminal- the terminal select enginelitebridgeContext- the Litebridge context
-
-
Method Details
-
offset
Description copied from interface:LimitClauseTerminalSets 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:
offsetin interfaceLimitClauseTerminal<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
-