Package org.hibernate.dialect
Class DB2400Dialect
- java.lang.Object
-
- org.hibernate.dialect.Dialect
-
- org.hibernate.dialect.DB2Dialect
-
- org.hibernate.dialect.DB2400Dialect
-
- All Implemented Interfaces:
ConversionContext
public class DB2400Dialect extends DB2Dialect
An SQL dialect for DB2/400. This class provides support for DB2 Universal Database for iSeries, also known as DB2/400.
-
-
Field Summary
-
Fields inherited from class org.hibernate.dialect.Dialect
CLOSED_QUOTE, DEFAULT_BATCH_SIZE, LEGACY_LOB_MERGE_STRATEGY, NEW_LOCATOR_LOB_MERGE_STRATEGY, NO_BATCH, QUOTE, STANDARD_DEFAULT_BATCH_LOAD_SIZING_STRATEGY, STREAM_XFER_LOB_MERGE_STRATEGY
-
-
Constructor Summary
Constructors Constructor Description DB2400Dialect()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getForUpdateString()
Get the string to append to SELECT statements to acquire locks for this dialect.IdentityColumnSupport
getIdentityColumnSupport()
Get the appropriateIdentityColumnSupport
LimitHandler
getLimitHandler()
Returns the delegate managing LIMIT clause.java.lang.String
getLimitString(java.lang.String sql, int offset, int limit)
Given a limit and an offset, apply the limit clause to the query.java.lang.String
getQuerySequencesString()
Get the select command used retrieve the names of all sequences.boolean
supportsLimit()
Does this dialect support some form of limiting query results via a SQL clause?boolean
supportsLimitOffset()
Does this dialect's LIMIT support (if any) additionally support specifying an offset?boolean
supportsSequences()
Does this dialect support sequences?boolean
supportsVariableLimit()
Does this dialect support bind variables (i.e., prepared statement parameters) for its limit/offset?boolean
useMaxForLimit()
Does the LIMIT clause take a "maximum" row number instead of a total number of returned rows?-
Methods inherited from class org.hibernate.dialect.DB2Dialect
buildSQLExceptionConversionDelegate, convertToFirstRowValue, doesReadCommittedCauseWritersToBlockReaders, dropConstraints, getAddColumnString, getCreateSequenceString, getCrossJoinSeparator, getCurrentTimestampSelectString, getDefaultMultiTableBulkIdStrategy, getDropSequenceString, getLowercaseFunction, getNotExpression, getResultSet, getSelectClauseNullString, getSelectSequenceNextValString, getSequenceNextValString, getSqlTypeDescriptorOverride, getUniqueDelegate, isCurrentTimestampSelectStringCallable, registerResultSetOutParameter, renderOrderByElement, requiresCastingOfParametersInSelectClause, supportsCommentOn, supportsCurrentTimestampSelection, supportsEmptyInList, supportsExistsInSelect, supportsLobValueChangePropogation, supportsLockTimeouts, supportsOuterJoinForUpdate, supportsParametersInInsertSelect, supportsPartitionBy, supportsPooledSequences, supportsResultSetPositionQueryMethodsOnForwardOnlyCursor, supportsTupleDistinctCounts, supportsUnionAll
-
Methods inherited from class org.hibernate.dialect.Dialect
addSqlHintOrComment, appendLockHint, appendLockHint, applyLocksToSql, areStringComparisonsCaseInsensitive, augmentRecognizedTableTypes, bindLimitParametersFirst, bindLimitParametersInReverseOrder, buildIdentifierHelper, buildSQLExceptionConverter, canCreateCatalog, canCreateSchema, cast, cast, cast, closeQuote, contributeTypes, createCaseFragment, createOuterJoinFragment, defaultScrollMode, doesRepeatableReadCauseReadersToBlockWriters, escapeComment, escapeLiteral, forceLimitUsage, forceLobAsLastValue, forUpdateOfColumns, getAddColumnSuffixString, getAddForeignKeyConstraintString, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getAddUniqueConstraintString, getAlterTableString, getAuxiliaryDatabaseObjectExporter, getCallableStatementSupport, getCascadeConstraintsString, getCaseInsensitiveLike, getCastTypeName, getColumnAliasExtractor, getColumnComment, getCreateCatalogCommand, getCreateMultisetTableString, getCreateSchemaCommand, getCreateSequenceString, getCreateSequenceStrings, getCreateSequenceStrings, getCreateTableString, getCurrentSchemaCommand, getCurrentTimestampSQLFunctionName, getDefaultBatchLoadSizingStrategy, getDefaultProperties, getDialect, getDialect, getDropCatalogCommand, getDropForeignKeyString, getDropSchemaCommand, getDropSequenceStrings, getDropTableString, getForeignKeyExporter, getForUpdateNowaitString, getForUpdateNowaitString, getForUpdateSkipLockedString, getForUpdateSkipLockedString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getFunctions, getHibernateTypeName, getHibernateTypeName, getIndexExporter, getInExpressionCountLimit, getKeywords, getLimitString, getLobMergeStrategy, getLockingStrategy, getMaxAliasLength, getNameQualifierSupport, getNativeIdentifierGeneratorClass, getNativeIdentifierGeneratorStrategy, getNoColumnsInsertString, getNullColumnString, getQueryHintString, getQueryHintString, getReadLockString, getReadLockString, getResultSet, getResultSet, getSchemaNameResolver, getSelectGUIDString, getSequenceExporter, getSequenceInformationExtractor, getTableComment, getTableExporter, getTableTypeString, getTypeName, getTypeName, getUniqueKeyExporter, getViolatedConstraintNameExtracter, getWriteLockString, getWriteLockString, hasAlterTable, hasSelfReferentialForeignKeyBug, inlineLiteral, isJdbcLogWarningsEnabledByDefault, isLegacyLimitHandlerBehaviorEnabled, isLockTimeoutParameterized, isTypeNameRegistered, openQuote, prependComment, qualifyIndexName, quote, registerColumnType, registerColumnType, registerFunction, registerHibernateType, registerHibernateType, registerKeyword, registerResultSetOutParameter, remapSqlTypeDescriptor, replaceResultVariableInOrderByClauseWithPosition, requiresParensForTupleDistinctCounts, supportsBindAsCallableArgument, supportsCascadeDelete, supportsCaseInsensitiveLike, supportsCircularCascadeDeleteConstraints, supportsColumnCheck, supportsExpectedLobUsagePattern, supportsIfExistsAfterAlterTable, supportsIfExistsAfterConstraintName, supportsIfExistsAfterTableName, supportsIfExistsBeforeConstraintName, supportsIfExistsBeforeTableName, supportsNamedParameters, supportsNationalizedTypes, supportsNonQueryWithCTE, supportsNotNullUnique, supportsNoWait, supportsRowValueConstructorSyntax, supportsRowValueConstructorSyntaxInInList, supportsSkipLocked, supportsSubqueryOnMutatingTable, supportsSubselectAsInPredicateLHS, supportsTableCheck, supportsTupleCounts, supportsTuplesInSubqueries, supportsUnboundedLobLocatorMaterialization, supportsUnique, supportsUniqueConstraintInCreateAlterTable, supportsValuesList, toBooleanValueString, toString, transformSelectString, useFollowOnLocking, useFollowOnLocking, useInputStreamToInsertBlob
-
-
-
-
Method Detail
-
supportsSequences
public boolean supportsSequences()
Description copied from class:Dialect
Does this dialect support sequences?- Overrides:
supportsSequences
in classDB2Dialect
- Returns:
- True if sequences supported; false otherwise.
-
supportsLimit
public boolean supportsLimit()
Description copied from class:Dialect
Does this dialect support some form of limiting query results via a SQL clause?- Overrides:
supportsLimit
in classDB2Dialect
- Returns:
- True if this dialect supports some form of LIMIT.
-
getQuerySequencesString
public java.lang.String getQuerySequencesString()
Description copied from class:Dialect
Get the select command used retrieve the names of all sequences.- Overrides:
getQuerySequencesString
in classDB2Dialect
- Returns:
- The select command; or null if sequences are not supported.
- See Also:
SchemaUpdate
-
supportsLimitOffset
public boolean supportsLimitOffset()
Description copied from class:Dialect
Does this dialect's LIMIT support (if any) additionally support specifying an offset?- Overrides:
supportsLimitOffset
in classDialect
- Returns:
- True if the dialect supports an offset within the limit support.
-
useMaxForLimit
public boolean useMaxForLimit()
Description copied from class:Dialect
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?- Overrides:
useMaxForLimit
in classDB2Dialect
- Returns:
- True if limit is relative from offset; false otherwise.
-
supportsVariableLimit
public boolean supportsVariableLimit()
Description copied from class:Dialect
Does this dialect support bind variables (i.e., prepared statement parameters) for its limit/offset?- Overrides:
supportsVariableLimit
in classDB2Dialect
- Returns:
- True if bind variables can be used; false otherwise.
-
getLimitString
public java.lang.String getLimitString(java.lang.String sql, int offset, int limit)
Description copied from class:Dialect
Given a limit and an offset, apply the limit clause to the query.- Overrides:
getLimitString
in classDB2Dialect
- Parameters:
sql
- The query to which to apply the limit.offset
- The offset of the limitlimit
- The limit of the limit ;)- Returns:
- The modified query statement with the limit applied.
-
getLimitHandler
public LimitHandler getLimitHandler()
Description copied from class:Dialect
Returns the delegate managing LIMIT clause.- Overrides:
getLimitHandler
in classDB2Dialect
- Returns:
- LIMIT clause delegate.
-
getForUpdateString
public java.lang.String getForUpdateString()
Description copied from class:Dialect
Get the string to append to SELECT statements to acquire locks for this dialect.- Overrides:
getForUpdateString
in classDB2Dialect
- Returns:
- The appropriate FOR UPDATE clause string.
-
getIdentityColumnSupport
public IdentityColumnSupport getIdentityColumnSupport()
Description copied from class:Dialect
Get the appropriateIdentityColumnSupport
- Overrides:
getIdentityColumnSupport
in classDB2Dialect
- Returns:
- the IdentityColumnSupport
-
-