Package org.hibernate.dialect.pagination
Class AbstractNoOffsetLimitHandler
- java.lang.Object
-
- org.hibernate.dialect.pagination.AbstractLimitHandler
-
- org.hibernate.dialect.pagination.AbstractNoOffsetLimitHandler
-
- All Implemented Interfaces:
LimitHandler
- Direct Known Subclasses:
FetchLimitHandler
,TopLimitHandler
public abstract class AbstractNoOffsetLimitHandler extends AbstractLimitHandler
Superclass forLimitHandler
s that don't support offsets at all.
-
-
Field Summary
-
Fields inherited from class org.hibernate.dialect.pagination.AbstractLimitHandler
NO_LIMIT
-
-
Constructor Summary
Constructors Constructor Description AbstractNoOffsetLimitHandler(boolean variableLimit)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract boolean
bindLimitParametersFirst()
Does the offset/limit clause come at the start of theSELECT
statement, or at the end of the query?protected abstract String
insert(String limitClause, String sql)
protected abstract String
limitClause()
The SQL fragment to insert, with a ? placeholder for the actual numerical limit.String
processSql(String sql, Limit limit)
boolean
supportsLimit()
Does this handler support limiting query results?boolean
supportsLimitOffset()
Does this handler support combinations of limit and offset?boolean
supportsVariableLimit()
Does 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, bindLimitParametersInReverseOrder, convertToFirstRowValue, forceLimitUsage, getFirstRow, getForUpdatePattern, getMaxOrLimit, hasFirstRow, hasMaxRows, insertAfterDistinct, insertAfterSelect, insertAtEnd, insertBeforeForUpdate, setMaxRows, supportsOffset, 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
-
-
-
-
Method Detail
-
limitClause
protected abstract String limitClause()
The SQL fragment to insert, with a ? placeholder for the actual numerical limit.
-
processSql
public String processSql(String sql, Limit limit)
- Specified by:
processSql
in interfaceLimitHandler
- Overrides:
processSql
in classAbstractLimitHandler
-
supportsLimit
public final boolean supportsLimit()
Description copied from interface:LimitHandler
Does this handler support limiting query results?- Specified by:
supportsLimit
in interfaceLimitHandler
- Overrides:
supportsLimit
in classAbstractLimitHandler
- Returns:
- True if this handler supports limit alone.
-
supportsLimitOffset
public final boolean supportsLimitOffset()
Description copied from interface:LimitHandler
Does this handler support combinations of limit and offset?- Specified by:
supportsLimitOffset
in interfaceLimitHandler
- Overrides:
supportsLimitOffset
in classAbstractLimitHandler
- Returns:
- True if the handler supports an offset within the limit support.
-
supportsVariableLimit
public final boolean supportsVariableLimit()
Description copied from class:AbstractLimitHandler
Does this handler support bind variables (JDBC prepared statement parameters) for its limit/offset?- Overrides:
supportsVariableLimit
in classAbstractLimitHandler
- Returns:
- true if bind variables can be used
-
bindLimitParametersFirst
public abstract boolean bindLimitParametersFirst()
Description copied from class:AbstractLimitHandler
Does the offset/limit clause come at the start of theSELECT
statement, or at the end of the query?- Overrides:
bindLimitParametersFirst
in classAbstractLimitHandler
- Returns:
- true if limit parameters come before other parameters
-
-