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

public Class LegacyDB2LimitHandler

extends AbstractLimitHandler
Class Inheritance
Imports
org.hibernate.query.spi.Limit

A LimitHandler for DB2. Uses FETCH FIRST n ROWS ONLY, together with ROWNUMBER() when there is an offset. (DB2 does not support the ANSI syntax OFFSET n ROWS.)

Field Summary

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

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private String
public String
public final boolean
public final boolean
supportsVariableLimit()

Overrides org.hibernate.dialect.pagination.AbstractLimitHandler.supportsVariableLimit.

Does this handler support bind variables (JDBC prepared statement parameters) for its limit/offset?
public final 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:
bindLimitParametersbindLimitParametersAtEndOfQuerybindLimitParametersAtStartOfQuerybindLimitParametersFirstbindLimitParametersInReverseOrderconvertToFirstRowValueforceLimitUsagegetFirstRowgetForUpdatePatterngetMaxOrLimithasFirstRowhasMaxRowsinsertAfterDistinctinsertAfterSelectinsertAtEndinsertBeforeForUpdatesetMaxRowssupportsLimitOffsetsupportsOffset

Field Detail

INSTANCEback to summary
public static final LegacyDB2LimitHandler INSTANCE

Constructor Detail

LegacyDB2LimitHandlerback to summary
public LegacyDB2LimitHandler()

Method Detail

fetchFirstRowsback to summary
private String fetchFirstRows(Limit limit)
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 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
supportsVariableLimitback to summary
public final boolean supportsVariableLimit()

Overrides org.hibernate.dialect.pagination.AbstractLimitHandler.supportsVariableLimit.

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

Does this handler support bind variables (JDBC prepared statement parameters) for its limit/offset?

Returns:boolean

true if bind variables can be used

Annotations
@Override
useMaxForLimitback to summary
public final 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