Package org.hibernate.dialect.pagination
Class AbstractSimpleLimitHandler
java.lang.Object
org.hibernate.dialect.pagination.AbstractLimitHandler
org.hibernate.dialect.pagination.AbstractSimpleLimitHandler
- All Implemented Interfaces:
LimitHandler
- Direct Known Subclasses:
LimitLimitHandler,LimitOffsetLimitHandler
Superclass for simple
LimitHandlers that don't
support specifying an offset without a limit.-
Field Summary
Fields inherited from class org.hibernate.dialect.pagination.AbstractLimitHandler
NO_LIMIT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Stringprotected abstract StringlimitClause(boolean hasFirstRow) protected StringlimitClause(boolean hasFirstRow, int jdbcParameterCount, ParameterMarkerStrategy parameterMarkerStrategy) protected Stringprotected StringoffsetOnlyClause(int jdbcParameterCount, ParameterMarkerStrategy parameterMarkerStrategy) processSql(String sql, int jdbcParameterCount, @Nullable ParameterMarkerStrategy parameterMarkerStrategy, QueryOptions queryOptions) Applies the limit from theQueryOptionsto the SQL with the givenParameterMarkerStrategy.processSql(String sql, Limit limit) 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 org.hibernate.dialect.pagination.AbstractLimitHandler
bindLimitParameters, bindLimitParametersAtEndOfQuery, bindLimitParametersAtStartOfQuery, bindLimitParametersFirst, bindLimitParametersInReverseOrder, convertToFirstRowValue, forceLimitUsage, getFirstRow, getForUpdatePattern, getMaxOrLimit, hasFirstRow, hasMaxRows, insertAfterDistinct, insertAfterSelect, insertAtEnd, insertBeforeForUpdate, setMaxRows, supportsLimitOffset, useMaxForLimitMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.hibernate.dialect.pagination.LimitHandler
getParameterPositionStart, processSql, processSqlMutatesState
-
Constructor Details
-
AbstractSimpleLimitHandler
public AbstractSimpleLimitHandler()
-
-
Method Details
-
limitClause
-
limitClause
protected String limitClause(boolean hasFirstRow, int jdbcParameterCount, ParameterMarkerStrategy parameterMarkerStrategy) -
offsetOnlyClause
-
offsetOnlyClause
protected String offsetOnlyClause(int jdbcParameterCount, ParameterMarkerStrategy parameterMarkerStrategy) -
processSql
- Specified by:
processSqlin interfaceLimitHandler- Overrides:
processSqlin classAbstractLimitHandler
-
processSql
public String processSql(String sql, int jdbcParameterCount, @Nullable ParameterMarkerStrategy parameterMarkerStrategy, QueryOptions queryOptions) Description copied from interface:LimitHandlerApplies the limit from theQueryOptionsto the SQL with the givenParameterMarkerStrategy. -
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.
-