Class AbstractSimpleLimitHandler
java.lang.Object
org.hibernate.dialect.pagination.spi.AbstractLimitHandler
org.hibernate.dialect.pagination.spi.AbstractSimpleLimitHandler
- All Implemented Interfaces:
LimitHandler
- Direct Known Subclasses:
LimitLimitHandler, LimitOffsetLimitHandler
Superclass for simple
LimitHandlers that don't
support specifying an offset without a limit.- Since:
- 8.0
-
Field Summary
Fields inherited from class AbstractLimitHandler
NO_LIMIT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Stringprotected abstract StringlimitClause(boolean hasFirstRow, PaginationRequest request) protected StringoffsetOnlyClause(PaginationRequest request) processSql(PaginationRequest request) Apply pagination to a complete SQL string.final booleanDoes this handler support limiting query results?booleanDoes this handler support offsetting query results without also specifying a limit?final booleanDoes this handler support bind variables (JDBC prepared statement parameters) for its limit/offset?Methods inherited from class AbstractLimitHandler
bindLimitParametersFirst, bindLimitParametersInReverseOrder, bindLimitParameterValues, convertToFirstRowValue, forceLimitUsage, getFirstRow, getForUpdatePattern, getMaxOrLimit, hasFirstRow, hasMaxRows, insertAfterDistinct, insertAfterSelect, insertAtEnd, insertBeforeForUpdate, jdbcInstructions, jdbcMaxRows, parameterPositionStart, result, rowsToSkip, supportsLimitOffset, useMaxForLimit
-
Constructor Details
-
AbstractSimpleLimitHandler
-
-
Method Details
-
limitClause
@SPI(IMPLEMENT) protected abstract String limitClause(boolean hasFirstRow, PaginationRequest request) -
offsetOnlyClause
-
processSql
Description copied from interface:LimitHandlerApply pagination to a complete SQL string.
Return
PaginationResult.unchanged(String)when the request needs no SQL or JDBC pagination. The returned JDBC instructions must describe every pagination parameter introduced by the rewritten SQL.- Specified by:
processSqlin interfaceLimitHandler- Overrides:
processSqlin classAbstractLimitHandler- Parameters:
request- immutable completed-SQL pagination input- Returns:
- rewritten SQL and the JDBC work needed to execute it
-
insert
-
supportsLimit
public final boolean supportsLimit()Description copied from interface:LimitHandlerDoes this handler support limiting query results?- Specified by:
supportsLimitin interfaceLimitHandler- Overrides:
supportsLimitin classAbstractLimitHandler- Returns:
- True if this handler supports limit alone.
-
supportsVariableLimit
public final boolean supportsVariableLimit()Description copied from class:AbstractLimitHandlerDoes this handler support bind variables (JDBC prepared statement parameters) for its limit/offset?- Overrides:
supportsVariableLimitin classAbstractLimitHandler- Returns:
- true if bind variables can be used
-
supportsOffset
public boolean supportsOffset()Description copied from interface:LimitHandlerDoes this handler support offsetting query results without also specifying a limit?- Specified by:
supportsOffsetin interfaceLimitHandler- Overrides:
supportsOffsetin classAbstractLimitHandler- Returns:
- True if this handler supports offset alone.
-