Top Description Fields Constructors Methods
org.hibernate.dialect.pagination

public Class LegacyOracleLimitHandler

extends AbstractLimitHandler
Class Inheritance
Imports
org.hibernate.dialect.DatabaseVersion, org.hibernate.query.spi.Limit, java.util.regex.Matcher

A LimitHandler for Oracle prior to 12c, which uses ROWNUM.

Field Summary

Modifier and TypeField and Description
private final DatabaseVersion
Inherited from org.hibernate.dialect.pagination.AbstractLimitHandler:
NO_LIMIT

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
bindLimitParametersInReverseOrder()

Overrides org.hibernate.dialect.pagination.AbstractLimitHandler.bindLimitParametersInReverseOrder.

Usually, the offset comes before the limit, but occasionally the offset is specified after the limit.
public boolean
forceLimitUsage()

Overrides org.hibernate.dialect.pagination.AbstractLimitHandler.forceLimitUsage.

Generally, if there is no limit applied to a Hibernate query we do not apply any limits to the SQL query.
public String
public boolean
public boolean
supportsOffset()

Overrides org.hibernate.dialect.pagination.AbstractLimitHandler.supportsOffset.

Implements org.hibernate.dialect.pagination.LimitHandler.supportsOffset.

Does this handler support offsetting query results without also specifying a limit?
public boolean
useMaxForLimit()

Overrides org.hibernate.dialect.pagination.AbstractLimitHandler.useMaxForLimit.

Does the limit clause expect the number of the last row, or the "page size", the maximum number of rows we want to receive?
Inherited from org.hibernate.dialect.pagination.AbstractLimitHandler:
bindLimitParametersbindLimitParametersAtEndOfQuerybindLimitParametersAtStartOfQuerybindLimitParametersFirstconvertToFirstRowValuegetFirstRowgetForUpdatePatterngetMaxOrLimithasFirstRowhasMaxRowsinsertAfterDistinctinsertAfterSelectinsertAtEndinsertBeforeForUpdatesetMaxRowssupportsLimitOffsetsupportsVariableLimit

Field Detail

versionback to summary
private final DatabaseVersion version

Constructor Detail

LegacyOracleLimitHandlerback to summary
public LegacyOracleLimitHandler(DatabaseVersion version)

Method Detail

bindLimitParametersInReverseOrderback to summary
public boolean bindLimitParametersInReverseOrder()

Overrides org.hibernate.dialect.pagination.AbstractLimitHandler.bindLimitParametersInReverseOrder.

Doc from org.hibernate.dialect.pagination.AbstractLimitHandler.bindLimitParametersInReverseOrder.

Usually, the offset comes before the limit, but occasionally the offset is specified after the limit. Does this dialect require us to bind the parameters in reverse order?

Returns:boolean

true if the correct order is limit then offset

Annotations
@Override
forceLimitUsageback to summary
public boolean forceLimitUsage()

Overrides org.hibernate.dialect.pagination.AbstractLimitHandler.forceLimitUsage.

Doc from org.hibernate.dialect.pagination.AbstractLimitHandler.forceLimitUsage.

Generally, if there is no limit applied to a Hibernate query we do not apply any limits to the SQL query. This option forces that the limit be written to the SQL query.

Returns:boolean

true to force limit into SQL query even if none specified in Hibernate query; false otherwise.

Annotations
@Override
processSqlback to summary
public String processSql(String sql, Limit limit)

Overrides org.hibernate.dialect.pagination.AbstractLimitHandler.processSql.

Implements org.hibernate.dialect.pagination.LimitHandler.processSql.

Annotations
@Override
supportsLimitback to summary
public boolean supportsLimit()

Overrides org.hibernate.dialect.pagination.AbstractLimitHandler.supportsLimit.

Implements org.hibernate.dialect.pagination.LimitHandler.supportsLimit.

Doc from org.hibernate.dialect.pagination.LimitHandler.supportsLimit.

Does this handler support limiting query results?

Returns:boolean

True if this handler supports limit alone.

Annotations
@Override
supportsOffsetback to summary
public boolean supportsOffset()

Overrides org.hibernate.dialect.pagination.AbstractLimitHandler.supportsOffset.

Implements org.hibernate.dialect.pagination.LimitHandler.supportsOffset.

Doc from org.hibernate.dialect.pagination.LimitHandler.supportsOffset.

Does this handler support offsetting query results without also specifying a limit?

Returns:boolean

True if this handler supports offset alone.

Annotations
@Override
useMaxForLimitback to summary
public boolean useMaxForLimit()

Overrides org.hibernate.dialect.pagination.AbstractLimitHandler.useMaxForLimit.

Doc from org.hibernate.dialect.pagination.AbstractLimitHandler.useMaxForLimit.

Does the limit clause expect the number of the last row, or the "page size", the maximum number of rows we want to receive? Hibernate's Query#setMaxResults(int) accepts the page size, so the number of the last row is obtained by adding the number of the first row, which is one greater than Query#setFirstResult(int).

Returns:boolean

true if the limit clause expects the number of the last row, false if it expects the page size

Annotations
@Override