Class AbstractNoOffsetLimitHandler
java.lang.Object
org.hibernate.dialect.pagination.spi.AbstractLimitHandler
org.hibernate.dialect.pagination.spi.AbstractNoOffsetLimitHandler
- All Implemented Interfaces:
LimitHandler
- Direct Known Subclasses:
FetchLimitHandler, TopLimitHandler
@SPI({USE,IMPLEMENT})
public abstract class AbstractNoOffsetLimitHandler
extends AbstractLimitHandler
Superclass for
LimitHandlers that don't support
offsets at all.- Since:
- 8.0
-
Field Summary
Fields inherited from class AbstractLimitHandler
NO_LIMIT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract booleanDoes the offset/limit clause come at the start of theSELECTstatement, or at the end of the query?protected abstract Stringprotected abstract StringlimitClause(PaginationRequest request) processSql(PaginationRequest request) Apply pagination to a complete SQL string.final booleanDoes this handler support limiting query results?final booleanDoes this handler support combinations of limit and offset?final booleanDoes this handler support bind variables (JDBC prepared statement parameters) for its limit/offset?Methods inherited from class AbstractLimitHandler
bindLimitParametersInReverseOrder, bindLimitParameterValues, convertToFirstRowValue, forceLimitUsage, getFirstRow, getForUpdatePattern, getMaxOrLimit, hasFirstRow, hasMaxRows, insertAfterDistinct, insertAfterSelect, insertAtEnd, insertBeforeForUpdate, jdbcInstructions, jdbcMaxRows, parameterPositionStart, result, rowsToSkip, supportsOffset, useMaxForLimit
-
Constructor Details
-
AbstractNoOffsetLimitHandler
-
-
Method Details
-
limitClause
-
insert
-
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
-
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.
-
supportsLimitOffset
public final boolean supportsLimitOffset()Description copied from interface:LimitHandlerDoes this handler support combinations of limit and offset?- Specified by:
supportsLimitOffsetin interfaceLimitHandler- Overrides:
supportsLimitOffsetin classAbstractLimitHandler- Returns:
- True if the handler supports an offset within the limit support.
-
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
-
bindLimitParametersFirst
Description copied from class:AbstractLimitHandlerDoes the offset/limit clause come at the start of theSELECTstatement, or at the end of the query?- Overrides:
bindLimitParametersFirstin classAbstractLimitHandler- Returns:
- true if limit parameters come before other parameters
-