Package org.hibernate.dialect
Class Oracle9iDialect
- java.lang.Object
-
- org.hibernate.dialect.Dialect
-
- org.hibernate.dialect.Oracle8iDialect
-
- org.hibernate.dialect.Oracle9iDialect
-
- All Implemented Interfaces:
ConversionContext
- Direct Known Subclasses:
Oracle10gDialect
public class Oracle9iDialect extends Oracle8iDialect
A dialect for Oracle 9i databases. Specifies to not use "ANSI join syntax" because 9i does not seem to properly handle it in all cases.
-
-
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 Oracle9iDialect()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CaseFragment
createCaseFragment()
Map case support to the Oracle DECODE function.java.lang.String
getCurrentTimestampSelectString()
Retrieve the command used to retrieve the current timestamp from the database.java.lang.String
getCurrentTimestampSQLFunctionName()
The name of the database-specific SQL function for retrieving the current timestamp.java.lang.String
getForUpdateString()
Get the string to append to SELECT statements to acquire locks for this dialect.LimitHandler
getLimitHandler()
Returns the delegate managing LIMIT clause.java.lang.String
getLimitString(java.lang.String sql, boolean hasOffset)
Apply s limit clause to the query.java.lang.String
getReadLockString(int timeout)
Get the string to append to SELECT statements to acquire READ locks for this dialect.java.lang.String
getSelectClauseNullString(int sqlType)
Given aTypes
type code, determine an appropriate null value to use in a select clause.java.lang.String
getWriteLockString(int timeout)
Get the string to append to SELECT statements to acquire WRITE locks for this dialect.protected void
registerCharacterTypeMappings()
protected void
registerDateTimeTypeMappings()
boolean
supportsRowValueConstructorSyntaxInInList()
HHH-4907, I don't know if oracle 8 supports this syntax, so I'd think it is better add this method here.boolean
supportsTupleDistinctCounts()
Does this dialect support `count(distinct a,b)`?-
Methods inherited from class org.hibernate.dialect.Oracle8iDialect
bindLimitParametersInReverseOrder, buildSQLExceptionConversionDelegate, canCreateSchema, createOuterJoinFragment, dropConstraints, forceLobAsLastValue, forUpdateOfColumns, getAddColumnString, getBasicSelectClauseNullString, getCallableStatementSupport, getCascadeConstraintsString, getCreateSequenceString, getCreateSequenceString, getCrossJoinSeparator, getCurrentSchemaCommand, getDefaultMultiTableBulkIdStrategy, getDropSequenceString, getForUpdateNowaitString, getForUpdateNowaitString, getForUpdateString, getInExpressionCountLimit, getMaxAliasLength, getNotExpression, getQueryHintString, getQuerySequencesString, getResultSet, getSelectGUIDString, getSelectSequenceNextValString, getSequenceNextValString, getSqlTypeDescriptorOverride, getViolatedConstraintNameExtracter, isCurrentTimestampSelectStringCallable, registerDefaultProperties, registerFunctions, registerLargeObjectTypeMappings, registerNumericTypeMappings, registerResultSetOutParameter, registerReverseHibernateTypeMappings, statementType, supportsCommentOn, supportsCurrentTimestampSelection, supportsEmptyInList, supportsExistsInSelect, supportsLimit, supportsNoWait, supportsPartitionBy, supportsPooledSequences, supportsSequences, supportsUnionAll, useFollowOnLocking, useMaxForLimit
-
Methods inherited from class org.hibernate.dialect.Dialect
addSqlHintOrComment, appendLockHint, appendLockHint, applyLocksToSql, areStringComparisonsCaseInsensitive, augmentRecognizedTableTypes, bindLimitParametersFirst, buildIdentifierHelper, buildSQLExceptionConverter, canCreateCatalog, cast, cast, cast, closeQuote, contributeTypes, convertToFirstRowValue, defaultScrollMode, doesReadCommittedCauseWritersToBlockReaders, doesRepeatableReadCauseReadersToBlockWriters, escapeComment, escapeLiteral, forceLimitUsage, getAddColumnSuffixString, getAddForeignKeyConstraintString, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getAddUniqueConstraintString, getAlterTableString, getAuxiliaryDatabaseObjectExporter, getCaseInsensitiveLike, getCastTypeName, getColumnAliasExtractor, getColumnComment, getCreateCatalogCommand, getCreateMultisetTableString, getCreateSchemaCommand, getCreateSequenceStrings, getCreateSequenceStrings, getCreateTableString, getDefaultBatchLoadSizingStrategy, getDefaultProperties, getDialect, getDialect, getDropCatalogCommand, getDropForeignKeyString, getDropSchemaCommand, getDropSequenceStrings, getDropTableString, getForeignKeyExporter, getForUpdateSkipLockedString, getForUpdateSkipLockedString, getForUpdateString, getForUpdateString, getForUpdateString, getFunctions, getHibernateTypeName, getHibernateTypeName, getIdentityColumnSupport, getIndexExporter, getKeywords, getLimitString, getLobMergeStrategy, getLockingStrategy, getLowercaseFunction, getNameQualifierSupport, getNativeIdentifierGeneratorClass, getNativeIdentifierGeneratorStrategy, getNoColumnsInsertString, getNullColumnString, getQueryHintString, getReadLockString, getResultSet, getResultSet, getSchemaNameResolver, getSequenceExporter, getSequenceInformationExtractor, getTableComment, getTableExporter, getTableTypeString, getTypeName, getTypeName, getUniqueDelegate, getUniqueKeyExporter, getWriteLockString, hasAlterTable, hasSelfReferentialForeignKeyBug, inlineLiteral, isJdbcLogWarningsEnabledByDefault, isLegacyLimitHandlerBehaviorEnabled, isLockTimeoutParameterized, isTypeNameRegistered, openQuote, prependComment, qualifyIndexName, quote, registerColumnType, registerColumnType, registerFunction, registerHibernateType, registerHibernateType, registerKeyword, registerResultSetOutParameter, remapSqlTypeDescriptor, renderOrderByElement, replaceResultVariableInOrderByClauseWithPosition, requiresCastingOfParametersInSelectClause, requiresParensForTupleDistinctCounts, supportsBindAsCallableArgument, supportsCascadeDelete, supportsCaseInsensitiveLike, supportsCircularCascadeDeleteConstraints, supportsColumnCheck, supportsExpectedLobUsagePattern, supportsIfExistsAfterAlterTable, supportsIfExistsAfterConstraintName, supportsIfExistsAfterTableName, supportsIfExistsBeforeConstraintName, supportsIfExistsBeforeTableName, supportsLimitOffset, supportsLobValueChangePropogation, supportsLockTimeouts, supportsNamedParameters, supportsNationalizedTypes, supportsNonQueryWithCTE, supportsNotNullUnique, supportsOuterJoinForUpdate, supportsParametersInInsertSelect, supportsResultSetPositionQueryMethodsOnForwardOnlyCursor, supportsRowValueConstructorSyntax, supportsSkipLocked, supportsSubqueryOnMutatingTable, supportsSubselectAsInPredicateLHS, supportsTableCheck, supportsTupleCounts, supportsTuplesInSubqueries, supportsUnboundedLobLocatorMaterialization, supportsUnique, supportsUniqueConstraintInCreateAlterTable, supportsValuesList, supportsVariableLimit, toBooleanValueString, toString, transformSelectString, useFollowOnLocking, useInputStreamToInsertBlob
-
-
-
-
Method Detail
-
registerCharacterTypeMappings
protected void registerCharacterTypeMappings()
- Overrides:
registerCharacterTypeMappings
in classOracle8iDialect
-
registerDateTimeTypeMappings
protected void registerDateTimeTypeMappings()
- Overrides:
registerDateTimeTypeMappings
in classOracle8iDialect
-
createCaseFragment
public CaseFragment createCaseFragment()
Description copied from class:Oracle8iDialect
Map case support to the Oracle DECODE function. Oracle did not add support for CASE until 9i. Create aCaseFragment
strategy responsible for handling this dialect's variations in how CASE statements are handled.- Overrides:
createCaseFragment
in classOracle8iDialect
- Returns:
- This dialect's
CaseFragment
strategy.
-
getLimitHandler
public LimitHandler getLimitHandler()
Description copied from class:Dialect
Returns the delegate managing LIMIT clause.- Overrides:
getLimitHandler
in classOracle8iDialect
- Returns:
- LIMIT clause delegate.
-
getLimitString
public java.lang.String getLimitString(java.lang.String sql, boolean hasOffset)
Description copied from class:Dialect
Apply s limit clause to the query. Typically dialects utilizevariable
limit clauses when they support limits. Thus, when building the select command we do not actually need to know the limit or the offest since we will just be using placeholders. Here we do still pass along whether or not an offset was specified so that dialects not supporting offsets can generate proper exceptions. In general, dialects will override one or the other of this method andDialect.getLimitString(String, int, int)
.- Overrides:
getLimitString
in classOracle8iDialect
- Parameters:
sql
- The query to which to apply the limit.hasOffset
- Is the query requesting an offset?- Returns:
- the modified SQL
-
getSelectClauseNullString
public java.lang.String getSelectClauseNullString(int sqlType)
Description copied from class:Dialect
Given aTypes
type code, determine an appropriate null value to use in a select clause. One thing to consider here is that certain databases might require proper casting for the nulls here since the select here will be part of a UNION/UNION ALL.- Overrides:
getSelectClauseNullString
in classOracle8iDialect
- Parameters:
sqlType
- TheTypes
type code.- Returns:
- The appropriate select clause value fragment.
-
getCurrentTimestampSelectString
public java.lang.String getCurrentTimestampSelectString()
Description copied from class:Dialect
Retrieve the command used to retrieve the current timestamp from the database.- Overrides:
getCurrentTimestampSelectString
in classOracle8iDialect
- Returns:
- The command.
-
getCurrentTimestampSQLFunctionName
public java.lang.String getCurrentTimestampSQLFunctionName()
Description copied from class:Dialect
The name of the database-specific SQL function for retrieving the current timestamp.- Overrides:
getCurrentTimestampSQLFunctionName
in classOracle8iDialect
- Returns:
- The function name.
-
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 classDialect
- Returns:
- The appropriate FOR UPDATE clause string.
-
getWriteLockString
public java.lang.String getWriteLockString(int timeout)
Description copied from class:Dialect
Get the string to append to SELECT statements to acquire WRITE locks for this dialect. Location of the of the returned string is treated the same as getForUpdateString.- Overrides:
getWriteLockString
in classDialect
- Parameters:
timeout
- in milliseconds, -1 for indefinite wait and 0 for no wait.- Returns:
- The appropriate LOCK clause string.
-
getReadLockString
public java.lang.String getReadLockString(int timeout)
Description copied from class:Dialect
Get the string to append to SELECT statements to acquire READ locks for this dialect. Location of the of the returned string is treated the same as getForUpdateString.- Overrides:
getReadLockString
in classDialect
- Parameters:
timeout
- in milliseconds, -1 for indefinite wait and 0 for no wait.- Returns:
- The appropriate LOCK clause string.
-
supportsRowValueConstructorSyntaxInInList
public boolean supportsRowValueConstructorSyntaxInInList()
HHH-4907, I don't know if oracle 8 supports this syntax, so I'd think it is better add this method here. Reopen this issue if you found/know 8 supports it. If the dialect supportsrow values
, does it offer such support in IN lists as well? For example, "... where (FIRST_NAME, LAST_NAME) IN ( (?, ?), (?, ?) ) ..."- Overrides:
supportsRowValueConstructorSyntaxInInList
in classDialect
- Returns:
- True if this SQL dialect is known to support "row value constructor" syntax in the IN list; false otherwise.
-
supportsTupleDistinctCounts
public boolean supportsTupleDistinctCounts()
Description copied from class:Dialect
Does this dialect support `count(distinct a,b)`?- Overrides:
supportsTupleDistinctCounts
in classDialect
- Returns:
- True if the database supports counting distinct tuples; false otherwise.
-
-