Top Description Fields Constructors Methods
org.hibernate.dialect

public Class Oracle9iDialect

extends Oracle8iDialect
Class Inheritance
Known Direct Subclasses
org.hibernate.dialect.Oracle10gDialect
Imports
java.sql.Types, java.util.Locale, org.hibernate.LockOptions, org.hibernate.dialect.pagination.AbstractLimitHandler, .LimitHandler, .LimitHelper, org.hibernate.engine.spi.RowSelection, org.hibernate.sql.ANSICaseFragment, .CaseFragment

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.

Author
Steve Ebersole

Field Summary

Modifier and TypeField and Description
private static final AbstractLimitHandler

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public CaseFragment
createCaseFragment()

Overrides org.hibernate.dialect.Oracle8iDialect.createCaseFragment.

Map case support to the Oracle DECODE function.
public String
getCurrentTimestampSelectString()

Overrides org.hibernate.dialect.Oracle8iDialect.getCurrentTimestampSelectString.

Retrieve the command used to retrieve the current timestamp from the database.
public String
getCurrentTimestampSQLFunctionName()

Overrides org.hibernate.dialect.Oracle8iDialect.getCurrentTimestampSQLFunctionName.

The name of the database-specific SQL function for retrieving the current timestamp.
public String
getForUpdateString()

Overrides org.hibernate.dialect.Dialect.getForUpdateString.

Get the string to append to SELECT statements to acquire locks for this dialect.
public LimitHandler
getLimitHandler()

Overrides org.hibernate.dialect.Oracle8iDialect.getLimitHandler.

Returns the delegate managing LIMIT clause.
public String
getLimitString(String
The query to which to apply the limit.
sql
,
boolean
Is the query requesting an offset?
hasOffset
)

Overrides org.hibernate.dialect.Oracle8iDialect.getLimitString.

Apply a limit clause to the query.
public String
getReadLockString(int
in milliseconds, -1 for indefinite wait and 0 for no wait.
timeout
)

Overrides org.hibernate.dialect.Dialect.getReadLockString.

Get the string to append to SELECT statements to acquire READ locks for this dialect.
public String
getSelectClauseNullString(int
The Types type code.
sqlType
)

Overrides org.hibernate.dialect.Oracle8iDialect.getSelectClauseNullString.

Given a Types type code, determine an appropriate null value to use in a select clause.
public String
getWriteLockString(int
in milliseconds, -1 for indefinite wait and 0 for no wait.
timeout
)

Overrides org.hibernate.dialect.Dialect.getWriteLockString.

Get the string to append to SELECT statements to acquire WRITE locks for this dialect.
protected void
protected void
public boolean
supportsRowValueConstructorSyntaxInInList()

Overrides org.hibernate.dialect.Dialect.supportsRowValueConstructorSyntaxInInList.

HHH-4907, I don't know if oracle 8 supports this syntax, so I'd think it is better add this method here.
public boolean
supportsTupleDistinctCounts()

Overrides org.hibernate.dialect.Dialect.supportsTupleDistinctCounts.

Does this dialect support `count(distinct a,b)`?
Inherited from org.hibernate.dialect.Oracle8iDialect:
bindLimitParametersInReverseOrderbuildSQLExceptionConversionDelegatecanCreateSchemacreateOuterJoinFragmentdropConstraintsforceLobAsLastValueforUpdateOfColumnsgetAddColumnStringgetBasicSelectClauseNullStringgetCallableStatementSupportgetCascadeConstraintsStringgetCreateSequenceStringgetCreateSequenceStringgetCrossJoinSeparatorgetCurrentSchemaCommandgetDefaultMultiTableBulkIdStrategygetDropSequenceStringgetForUpdateNowaitStringgetForUpdateNowaitStringgetForUpdateStringgetInExpressionCountLimitgetMaxAliasLengthgetNotExpressiongetQueryHintStringgetQuerySequencesStringgetResultSetgetSelectGUIDStringgetSelectSequenceNextValStringgetSequenceInformationExtractorgetSequenceNextValStringgetSqlTypeDescriptorOverridegetViolatedConstraintNameExtracterisCurrentTimestampSelectStringCallableregisterDefaultPropertiesregisterFunctionsregisterLargeObjectTypeMappingsregisterNumericTypeMappingsregisterResultSetOutParameterregisterReverseHibernateTypeMappingsstatementTypesupportsCommentOnsupportsCurrentTimestampSelectionsupportsEmptyInListsupportsExistsInSelectsupportsLimitsupportsNoWaitsupportsPartitionBysupportsPooledSequencessupportsSequencessupportsUnionAlluseFollowOnLockinguseMaxForLimit

Field Detail

LIMIT_HANDLERback to summary
private static final AbstractLimitHandler LIMIT_HANDLER

Hides org.hibernate.dialect.Oracle8iDialect.LIMIT_HANDLER.

Constructor Detail

Oracle9iDialectback to summary
public Oracle9iDialect()

Method Detail

createCaseFragmentback to summary
public CaseFragment createCaseFragment()

Overrides org.hibernate.dialect.Oracle8iDialect.createCaseFragment.

Doc from org.hibernate.dialect.Oracle8iDialect.createCaseFragment.

Map case support to the Oracle DECODE function. Oracle did not add support for CASE until 9i.

Create a CaseFragment strategy responsible for handling this dialect's variations in how CASE statements are handled.

Returns:CaseFragment

Doc from org.hibernate.dialect.Dialect.createCaseFragment.

This dialect's CaseFragment strategy.

Annotations
@Override
getCurrentTimestampSelectStringback to summary
public String getCurrentTimestampSelectString()

Overrides org.hibernate.dialect.Oracle8iDialect.getCurrentTimestampSelectString.

Doc from org.hibernate.dialect.Dialect.getCurrentTimestampSelectString.

Retrieve the command used to retrieve the current timestamp from the database.

Returns:String

The command.

Annotations
@Override
getCurrentTimestampSQLFunctionNameback to summary
public String getCurrentTimestampSQLFunctionName()

Overrides org.hibernate.dialect.Oracle8iDialect.getCurrentTimestampSQLFunctionName.

Doc from org.hibernate.dialect.Dialect.getCurrentTimestampSQLFunctionName.

The name of the database-specific SQL function for retrieving the current timestamp.

Returns:String

The function name.

Annotations
@Override
getForUpdateStringback to summary
public String getForUpdateString()

Overrides org.hibernate.dialect.Dialect.getForUpdateString.

Doc from org.hibernate.dialect.Dialect.getForUpdateString.

Get the string to append to SELECT statements to acquire locks for this dialect.

Returns:String

The appropriate FOR UPDATE clause string.

Annotations
@Override
getLimitHandlerback to summary
public LimitHandler getLimitHandler()

Overrides org.hibernate.dialect.Oracle8iDialect.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, boolean hasOffset)

Overrides org.hibernate.dialect.Oracle8iDialect.getLimitString.

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

Apply a limit clause to the query.

Typically dialects utilize variable limit clauses when they support limits. Thus, when building the select command we do not actually need to know the limit or the offset 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 and getLimitString(String, int, int).

Parameters
sql:String

The query to which to apply the limit.

hasOffset:boolean

Is the query requesting an offset?

Returns:String

the modified SQL

Annotations
@Override
getReadLockStringback to summary
public String getReadLockString(int timeout)

Overrides org.hibernate.dialect.Dialect.getReadLockString.

Doc from org.hibernate.dialect.Dialect.getReadLockString.

Get the string to append to SELECT statements to acquire READ locks for this dialect. Location of the returned string is treated the same as getForUpdateString.

Parameters
timeout:int

in milliseconds, -1 for indefinite wait and 0 for no wait.

Returns:String

The appropriate LOCK clause string.

Annotations
@Override
getSelectClauseNullStringback to summary
public String getSelectClauseNullString(int sqlType)

Overrides org.hibernate.dialect.Oracle8iDialect.getSelectClauseNullString.

Doc from org.hibernate.dialect.Dialect.getSelectClauseNullString.

Given a Types 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.

Parameters
sqlType:int

The Types type code.

Returns:String

The appropriate select clause value fragment.

Annotations
@Override
getWriteLockStringback to summary
public String getWriteLockString(int timeout)

Overrides org.hibernate.dialect.Dialect.getWriteLockString.

Doc from org.hibernate.dialect.Dialect.getWriteLockString.

Get the string to append to SELECT statements to acquire WRITE locks for this dialect. Location of the returned string is treated the same as getForUpdateString.

Parameters
timeout:int

in milliseconds, -1 for indefinite wait and 0 for no wait.

Returns:String

The appropriate LOCK clause string.

Annotations
@Override
registerCharacterTypeMappingsback to summary
protected void registerCharacterTypeMappings()

Overrides org.hibernate.dialect.Oracle8iDialect.registerCharacterTypeMappings.

Annotations
@Override
registerDateTimeTypeMappingsback to summary
protected void registerDateTimeTypeMappings()

Overrides org.hibernate.dialect.Oracle8iDialect.registerDateTimeTypeMappings.

Annotations
@Override
supportsRowValueConstructorSyntaxInInListback to summary
public boolean supportsRowValueConstructorSyntaxInInList()

Overrides org.hibernate.dialect.Dialect.supportsRowValueConstructorSyntaxInInList.

Doc from org.hibernate.dialect.Dialect.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 supports row values, does it offer such support in IN lists as well?

For example, "... where (FIRST_NAME, LAST_NAME) IN ( (?, ?), (?, ?) ) ..."

Returns:boolean

True if this SQL dialect is known to support "row value constructor" syntax in the IN list; false otherwise.

Annotations
@Override
supportsTupleDistinctCountsback to summary
public boolean supportsTupleDistinctCounts()

Overrides org.hibernate.dialect.Dialect.supportsTupleDistinctCounts.

Doc from org.hibernate.dialect.Dialect.supportsTupleDistinctCounts.

Does this dialect support `count(distinct a,b)`?

Returns:boolean

True if the database supports counting distinct tuples; false otherwise.

Annotations
@Override