Top Description Constructors Methods
org.hibernate.dialect

public Class DB2390Dialect

extends DB2Dialect
Class Inheritance

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

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
getIdentitySelectString()

Overrides org.hibernate.dialect.DB2Dialect.getIdentitySelectString.

Get the select command to use to retrieve the last generated IDENTITY value.
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.Dialect.getLimitString.

Given a limit and an offset, apply the limit clause to the query.
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.Dialect.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:
convertToFirstRowValuedoesReadCommittedCauseWritersToBlockReadersdropConstraintsgenerateTemporaryTableNamegetAddColumnStringgetCreateSequenceStringgetCreateTemporaryTablePostfixgetCreateTemporaryTableStringgetCrossJoinSeparatorgetCurrentTimestampSelectStringgetDropSequenceStringgetForUpdateStringgetIdentityColumnStringgetIdentityInsertStringgetLimitStringgetLowercaseFunctiongetQuerySequencesStringgetResultSetgetSelectClauseNullStringgetSequenceNextValStringisCurrentTimestampSelectStringCallablemainregisterResultSetOutParameterrequiresCastingOfParametersInSelectClausesupportsCommentOnsupportsCurrentTimestampSelectionsupportsEmptyInListsupportsIdentityColumnssupportsLobValueChangePropogationsupportsNotNullUniquesupportsOuterJoinForUpdatesupportsParametersInInsertSelectsupportsPooledSequencessupportsResultSetPositionQueryMethodsOnForwardOnlyCursorsupportsTemporaryTablessupportsTupleDistinctCountssupportsUnionAll

Constructor Detail

DB2390Dialectback to summary
public DB2390Dialect()

Method Detail

getIdentitySelectStringback to summary
public String getIdentitySelectString()

Overrides org.hibernate.dialect.DB2Dialect.getIdentitySelectString.

Doc from org.hibernate.dialect.Dialect.getIdentitySelectString.

Get the select command to use to retrieve the last generated IDENTITY value.

Returns:String

The appropriate select command

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

Overrides org.hibernate.dialect.Dialect.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.

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.

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.

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.

supportsVariableLimitback to summary
public boolean supportsVariableLimit()

Overrides org.hibernate.dialect.Dialect.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.

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.