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
Superclass for
LimitHandlers that don't support
offsets at all.-
Field Summary
Fields inherited from class org.hibernate.dialect.pagination.AbstractLimitHandler
NO_LIMIT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract booleanDoes the offset/limit clause come at the start of theSELECTstatement, or at the end of the query?protected abstract Stringprotected abstract StringThe SQL fragment to insert, with a ? placeholder for the actual numerical limit.protected StringlimitClause(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?final booleanDoes this handler support combinations of limit and offset?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, bindLimitParametersInReverseOrder, convertToFirstRowValue, forceLimitUsage, getFirstRow, getForUpdatePattern, getMaxOrLimit, hasFirstRow, hasMaxRows, insertAfterDistinct, insertAfterSelect, insertAtEnd, insertBeforeForUpdate, setMaxRows, supportsOffset, 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
-
AbstractNoOffsetLimitHandler
public AbstractNoOffsetLimitHandler(boolean variableLimit)
-
-
Method Details
-
limitClause
The SQL fragment to insert, with a ? placeholder for the actual numerical limit. -
limitClause
protected String limitClause(int jdbcParameterCount, ParameterMarkerStrategy parameterMarkerStrategy) -
insert
-
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. -
processSql
- 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
-