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
public class LimitLimitHandler extends AbstractSimpleLimitHandler
Limit handler for MySQL and CUBRID which support the syntaxLIMIT n
andLIMIT m, n
. Note that this syntax does not allow specification of an offset without a limit.
-
-
Field Summary
Fields Modifier and Type Field Description static LimitLimitHandler
INSTANCE
-
Fields inherited from class org.hibernate.dialect.pagination.AbstractLimitHandler
NO_LIMIT
-
-
Constructor Summary
Constructors Constructor Description LimitLimitHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Pattern
getForUpdatePattern()
The offset/limit clauses typically must come before theFOR UPDATE
ish clauses, so we need a way to identify these clauses in the text of the whole query.protected String
limitClause(boolean hasFirstRow)
protected String
offsetOnlyClause()
boolean
supportsOffset()
Does this handler support offsetting query results without also specifying a limit?-
Methods inherited from class org.hibernate.dialect.pagination.AbstractSimpleLimitHandler
insert, processSql, supportsLimit, supportsVariableLimit
-
Methods 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, useMaxForLimit
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.dialect.pagination.LimitHandler
processSql
-
-
-
-
Field Detail
-
INSTANCE
public static final LimitLimitHandler INSTANCE
-
-
Method Detail
-
limitClause
protected String limitClause(boolean hasFirstRow)
- Specified by:
limitClause
in classAbstractSimpleLimitHandler
-
offsetOnlyClause
protected String offsetOnlyClause()
- Overrides:
offsetOnlyClause
in classAbstractSimpleLimitHandler
-
getForUpdatePattern
protected Pattern getForUpdatePattern()
Description copied from class:AbstractLimitHandler
The offset/limit clauses typically must come before theFOR UPDATE
ish clauses, so we need a way to identify these clauses in the text of the whole query.- Overrides:
getForUpdatePattern
in classAbstractLimitHandler
-
supportsOffset
public boolean supportsOffset()
Description copied from interface:LimitHandler
Does this handler support offsetting query results without also specifying a limit?- Specified by:
supportsOffset
in interfaceLimitHandler
- Overrides:
supportsOffset
in classAbstractSimpleLimitHandler
- Returns:
- True if this handler supports offset alone.
-
-