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

public Class Oracle12LimitHandler

extends AbstractLimitHandler
Class Inheritance
Imports
java.util.Locale, org.hibernate.LockMode, .LockOptions, org.hibernate.query.spi.Limit, .QueryOptions

A LimitHandler for databases which support the ANSI SQL standard syntax FETCH FIRST m ROWS ONLY and OFFSET n ROWS FETCH NEXT m ROWS ONLY.
Author
Gavin King

Field Summary

Modifier and TypeField and Description
private boolean
public static final Oracle12LimitHandler
private boolean
private boolean
Inherited from org.hibernate.dialect.pagination.AbstractLimitHandler:
NO_LIMIT

Constructor Summary

AccessConstructor and Description
pack-priv

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.
private int
public String
protected String
processSql(String sql, boolean hasFirstRow, LockOptions lockOptions)

Deprecated for removal. Use processSql(String, boolean, boolean, LockOptions) instead
protected String
processSql(String sql, boolean hasFirstRow, boolean hasMaxRows, LockOptions lockOptions)

protected String
processSql(String sql, int forUpdateIndex, boolean hasFirstRow)

Deprecated for removal. Use processSql(String, int, boolean, boolean) instead
protected String
processSql(String sql, int forUpdateIndex, boolean hasFirstRow, boolean hasMaxRows)

protected String
processSqlOffsetFetch(String sql, boolean hasFirstRow)

Deprecated for removal. Use processSqlOffsetFetch(String, boolean, boolean) instead
protected String
processSqlOffsetFetch(String sql, boolean hasFirstRow, boolean hasMaxRows)

public final 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:
bindLimitParametersbindLimitParametersAtEndOfQuerybindLimitParametersAtStartOfQuerybindLimitParametersFirstconvertToFirstRowValueforceLimitUsagegetFirstRowgetForUpdatePatterngetMaxOrLimithasFirstRowhasMaxRowsinsertAfterDistinctinsertAfterSelectinsertAtEndinsertBeforeForUpdateprocessSqlsetMaxRowssupportsLimitOffsetsupportsVariableLimit

Field Detail

bindLimitParametersInReverseOrderback to summary
private boolean bindLimitParametersInReverseOrder
INSTANCEback to summary
public static final Oracle12LimitHandler INSTANCE
supportOffsetback to summary
private boolean supportOffset
useMaxForLimitback to summary
private boolean useMaxForLimit

Constructor Detail

Oracle12LimitHandlerback to summary
pack-priv Oracle12LimitHandler()

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
getForUpdateIndexback to summary
private int getForUpdateIndex(String sql)
processSqlback to summary
public String processSql(String sql, Limit limit, QueryOptions queryOptions)

Overrides default org.hibernate.dialect.pagination.LimitHandler.processSql.

Annotations
@Override
processSqlback to summary
protected String processSql(String sql, boolean hasFirstRow, LockOptions lockOptions)

Deprecated

for removal.

Use processSql(String, boolean, boolean, LockOptions) instead

Annotations
@Deprecated
forRemoval:true
processSqlback to summary
protected String processSql(String sql, boolean hasFirstRow, boolean hasMaxRows, LockOptions lockOptions)
processSqlback to summary
protected String processSql(String sql, int forUpdateIndex, boolean hasFirstRow)

Deprecated

for removal.

Use processSql(String, int, boolean, boolean) instead

Annotations
@Deprecated
forRemoval:true
processSqlback to summary
protected String processSql(String sql, int forUpdateIndex, boolean hasFirstRow, boolean hasMaxRows)
processSqlOffsetFetchback to summary
protected String processSqlOffsetFetch(String sql, boolean hasFirstRow)

Deprecated

for removal.

Use processSqlOffsetFetch(String, boolean, boolean) instead

Annotations
@Deprecated
forRemoval:true
processSqlOffsetFetchback to summary
protected String processSqlOffsetFetch(String sql, boolean hasFirstRow, boolean hasMaxRows)
supportsLimitback to summary
public final 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