Top Description Fields Constructors Methods
org.hibernate.dialect

public Class DB2390Dialect

extends DB2Dialect
Class Inheritance
Known Direct Subclasses
org.hibernate.dialect.DB2390V8Dialect
Imports
org.hibernate.dialect.identity.DB2390IdentityColumnSupport, .IdentityColumnSupport, org.hibernate.dialect.pagination.AbstractLimitHandler, .LimitHandler, .LimitHelper, org.hibernate.engine.spi.RowSelection

An SQL dialect for DB2/390. This class provides support for DB2 Universal Database for OS/390, also known as DB2/390.
Author
Kristoffer Dyrkorn

Field Summary

Modifier and TypeField and Description
private static final AbstractLimitHandler
private static final AbstractLimitHandler

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public IdentityColumnSupport
public LimitHandler
getLimitHandler()

Overrides org.hibernate.dialect.DB2Dialect.getLimitHandler.

Returns the delegate managing LIMIT clause.
public String
getLimitString(String
The query to which to apply the limit.
sql
,
int
The offset of the limit
offset
,
int
The limit of the limit ;)
limit
)

Overrides org.hibernate.dialect.DB2Dialect.getLimitString.

Given a limit and an offset, apply the limit clause to the query.
public String
getQuerySequencesString()

Overrides org.hibernate.dialect.DB2Dialect.getQuerySequencesString.

Get the select command used retrieve the names of all sequences.
public boolean
supportsLimit()

Overrides org.hibernate.dialect.DB2Dialect.supportsLimit.

Does this dialect support some form of limiting query results via a SQL clause?
public boolean
supportsLimitOffset()

Overrides org.hibernate.dialect.Dialect.supportsLimitOffset.

Does this dialect's LIMIT support (if any) additionally support specifying an offset?
public boolean
supportsSequences()

Overrides org.hibernate.dialect.DB2Dialect.supportsSequences.

Does this dialect support sequences?
public boolean
supportsVariableLimit()

Overrides org.hibernate.dialect.DB2Dialect.supportsVariableLimit.

Does this dialect support bind variables (i.e., prepared statement parameters) for its limit/offset?
public boolean
useMaxForLimit()

Overrides org.hibernate.dialect.DB2Dialect.useMaxForLimit.

Does the LIMIT clause take a "maximum" row number instead of a total number of returned rows?
Inherited from org.hibernate.dialect.DB2Dialect:
buildSQLExceptionConversionDelegateconvertToFirstRowValuedoesReadCommittedCauseWritersToBlockReadersdropConstraintsgetAddColumnStringgetCreateSequenceStringgetCrossJoinSeparatorgetCurrentTimestampSelectStringgetDefaultMultiTableBulkIdStrategygetDropSchemaCommandgetDropSequenceStringgetForUpdateStringgetInExpressionCountLimitgetLowercaseFunctiongetNotExpressiongetResultSetgetSelectClauseNullStringgetSelectSequenceNextValStringgetSequenceInformationExtractorgetSequenceNextValStringgetSqlTypeDescriptorOverridegetUniqueDelegateisCurrentTimestampSelectStringCallableregisterResultSetOutParameterrenderOrderByElementrequiresCastingOfParametersInSelectClausesupportsCommentOnsupportsCurrentTimestampSelectionsupportsEmptyInListsupportsExistsInSelectsupportsLobValueChangePropogationsupportsLockTimeoutssupportsOuterJoinForUpdatesupportsParametersInInsertSelectsupportsPartitionBysupportsPooledSequencessupportsResultSetPositionQueryMethodsOnForwardOnlyCursorsupportsTupleDistinctCountssupportsUnionAll

Field Detail

LEGACY_LIMIT_HANDLERback to summary
private static final AbstractLimitHandler LEGACY_LIMIT_HANDLER
LIMIT_HANDLERback to summary
private static final AbstractLimitHandler LIMIT_HANDLER

Hides org.hibernate.dialect.DB2Dialect.LIMIT_HANDLER.

Constructor Detail

DB2390Dialectback to summary
public DB2390Dialect()

Method Detail

getIdentityColumnSupportback to summary
public IdentityColumnSupport getIdentityColumnSupport()

Overrides org.hibernate.dialect.DB2Dialect.getIdentityColumnSupport.

Doc from org.hibernate.dialect.Dialect.getIdentityColumnSupport.

Get the appropriate IdentityColumnSupport

Returns:IdentityColumnSupport

the IdentityColumnSupport

Annotations
@Override
getLimitHandlerback to summary
public LimitHandler getLimitHandler()

Overrides org.hibernate.dialect.DB2Dialect.getLimitHandler.

Doc from org.hibernate.dialect.Dialect.getLimitHandler.

Returns the delegate managing LIMIT clause.

Returns:LimitHandler

LIMIT clause delegate.

Annotations
@Override
getLimitStringback to summary
public String getLimitString(String sql, int offset, int limit)

Overrides org.hibernate.dialect.DB2Dialect.getLimitString.

Doc from org.hibernate.dialect.Dialect.getLimitString.

Given a limit and an offset, apply the limit clause to the query.

Parameters
sql:String

The query to which to apply the limit.

offset:int

The offset of the limit

limit:int

The limit of the limit ;)

Returns:String

The modified query statement with the limit applied.

Annotations
@Override
getQuerySequencesStringback to summary
public String getQuerySequencesString()

Overrides org.hibernate.dialect.DB2Dialect.getQuerySequencesString.

Doc from org.hibernate.dialect.Dialect.getQuerySequencesString.

Get the select command used retrieve the names of all sequences.

Returns:String

The select command; or null if sequences are not supported.

Annotations
@Override
supportsLimitback to summary
public boolean supportsLimit()

Overrides org.hibernate.dialect.DB2Dialect.supportsLimit.

Doc from org.hibernate.dialect.Dialect.supportsLimit.

Does this dialect support some form of limiting query results via a SQL clause?

Returns:boolean

True if this dialect supports some form of LIMIT.

Annotations
@Override
supportsLimitOffsetback to summary
public boolean supportsLimitOffset()

Overrides org.hibernate.dialect.Dialect.supportsLimitOffset.

Doc from org.hibernate.dialect.Dialect.supportsLimitOffset.

Does this dialect's LIMIT support (if any) additionally support specifying an offset?

Returns:boolean

True if the dialect supports an offset within the limit support.

Annotations
@Override
@SuppressWarnings:deprecation
supportsSequencesback to summary
public boolean supportsSequences()

Overrides org.hibernate.dialect.DB2Dialect.supportsSequences.

Doc from org.hibernate.dialect.Dialect.supportsSequences.

Does this dialect support sequences?

Returns:boolean

True if sequences supported; false otherwise.

Annotations
@Override
supportsVariableLimitback to summary
public boolean supportsVariableLimit()

Overrides org.hibernate.dialect.DB2Dialect.supportsVariableLimit.

Doc from org.hibernate.dialect.Dialect.supportsVariableLimit.

Does this dialect support bind variables (i.e., prepared statement parameters) for its limit/offset?

Returns:boolean

True if bind variables can be used; false otherwise.

Annotations
@Override
useMaxForLimitback to summary
public boolean useMaxForLimit()

Overrides org.hibernate.dialect.DB2Dialect.useMaxForLimit.

Doc from org.hibernate.dialect.Dialect.useMaxForLimit.

Does the LIMIT clause take a "maximum" row number instead of a total number of returned rows?

This is easiest understood via an example. Consider you have a table with 20 rows, but you only want to retrieve rows number 11 through 20. Generally, a limit with offset would say that the offset = 11 and the limit = 10 (we only want 10 rows at a time); this is specifying the total number of returned rows. Some dialects require that we instead specify offset = 11 and limit = 20, where 20 is the "last" row we want relative to offset (i.e. total number of rows = 20 - 11 = 9)

So essentially, is limit relative from offset? Or is limit absolute?

Returns:boolean

True if limit is relative from offset; false otherwise.

Annotations
@Override