Package org.hibernate.dialect.pagination
Class LimitLimitHandler
java.lang.Object
org.hibernate.dialect.pagination.AbstractLimitHandler
org.hibernate.dialect.pagination.AbstractSimpleLimitHandler
org.hibernate.dialect.pagination.LimitLimitHandler
- All Implemented Interfaces:
LimitHandler
Limit handler for MySQL and CUBRID which support the syntax
LIMIT n and LIMIT m, n. Note that this
syntax does not allow specification of an offset without
a limit.-
Field Summary
FieldsFields inherited from class org.hibernate.dialect.pagination.AbstractLimitHandler
NO_LIMIT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected PatternThe offset/limit clauses typically must come before theFOR UPDATEish clauses, so we need a way to identify these clauses in the text of the whole query.protected StringlimitClause(boolean hasFirstRow) protected StringlimitClause(boolean hasFirstRow, int jdbcParameterCount, ParameterMarkerStrategy parameterMarkerStrategy) protected Stringprotected StringoffsetOnlyClause(int jdbcParameterCount, ParameterMarkerStrategy parameterMarkerStrategy) booleanReturns whetherLimitHandler.processSql(String, int, ParameterMarkerStrategy, QueryOptions)mutates the state of this limit handler and needs to be called for certain other methods to work correctly.booleanDoes this handler support offsetting query results without also specifying a limit?Methods inherited from class org.hibernate.dialect.pagination.AbstractSimpleLimitHandler
insert, processSql, processSql, supportsLimit, supportsVariableLimitMethods inherited from class org.hibernate.dialect.pagination.AbstractLimitHandler
bindLimitParameters, bindLimitParametersAtEndOfQuery, bindLimitParametersAtStartOfQuery, bindLimitParametersFirst, bindLimitParametersInReverseOrder, convertToFirstRowValue, forceLimitUsage, getFirstRow, 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
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
LimitLimitHandler
public LimitLimitHandler()
-
-
Method Details
-
limitClause
- Specified by:
limitClausein classAbstractSimpleLimitHandler
-
limitClause
protected String limitClause(boolean hasFirstRow, int jdbcParameterCount, ParameterMarkerStrategy parameterMarkerStrategy) - Overrides:
limitClausein classAbstractSimpleLimitHandler
-
offsetOnlyClause
- Overrides:
offsetOnlyClausein classAbstractSimpleLimitHandler
-
offsetOnlyClause
protected String offsetOnlyClause(int jdbcParameterCount, ParameterMarkerStrategy parameterMarkerStrategy) - Overrides:
offsetOnlyClausein classAbstractSimpleLimitHandler
-
getForUpdatePattern
Description copied from class:AbstractLimitHandlerThe offset/limit clauses typically must come before theFOR UPDATEish clauses, so we need a way to identify these clauses in the text of the whole query.- Overrides:
getForUpdatePatternin classAbstractLimitHandler
-
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 classAbstractSimpleLimitHandler- Returns:
- True if this handler supports offset alone.
-
processSqlMutatesState
public boolean processSqlMutatesState()Description copied from interface:LimitHandlerReturns whetherLimitHandler.processSql(String, int, ParameterMarkerStrategy, QueryOptions)mutates the state of this limit handler and needs to be called for certain other methods to work correctly.
-