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 forLimitHandlers 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 booleanbindLimitParametersFirst()Does the offset/limit clause come at the start of theSELECTstatement, or at the end of the query?protected abstract Stringinsert(String limitClause, String sql)protected abstract StringlimitClause()The SQL fragment to insert, with a ? placeholder for the actual numerical limit.StringprocessSql(String sql, Limit limit)booleansupportsLimit()Does this handler support limiting query results?booleansupportsLimitOffset()Does this handler support combinations of limit and offset?booleansupportsVariableLimit()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:
processSqlin interfaceLimitHandler- Overrides:
processSqlin classAbstractLimitHandler
-
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
public abstract boolean 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
-
-