public class

Oracle9iDialect

extends Oracle8iDialect
java.lang.Object
   ↳ org.hibernate.dialect.Dialect
     ↳ org.hibernate.dialect.Oracle8iDialect
       ↳ org.hibernate.dialect.Oracle9iDialect
Known Direct Subclasses

Class Overview

A dialect for Oracle 9i databases.

Unlike the older (deprecated) Oracle9Dialect, this version specifies to not use "ANSI join syntax" because 9i does not seem to properly handle it in all cases.

Summary

[Expand]
Inherited Constants
From class org.hibernate.dialect.Oracle8iDialect
From class org.hibernate.dialect.Dialect
Public Constructors
Oracle9iDialect()
Public Methods
CaseFragment createCaseFragment()
Map case support to the Oracle DECODE function.
String getCurrentTimestampSQLFunctionName()
The name of the database-specific SQL function for retrieving the current timestamp.
String getCurrentTimestampSelectString()
Retrieve the command used to retrieve the current timestamp from the database.
String getForUpdateString()
Get the string to append to SELECT statements to acquire locks for this dialect.
String getLimitString(String sql, boolean hasOffset)
Apply s limit clause to the query.
String getReadLockString(int timeout)
Get the string to append to SELECT statements to acquire WRITE locks for this dialect.
String getSelectClauseNullString(int sqlType)
Given a java.sql.Types type code, determine an appropriate null value to use in a select clause.
String getWriteLockString(int timeout)
Get the string to append to SELECT statements to acquire WRITE locks for this dialect.
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)`?
Protected Methods
void registerCharacterTypeMappings()
void registerDateTimeTypeMappings()
[Expand]
Inherited Methods
From class org.hibernate.dialect.Oracle8iDialect
From class org.hibernate.dialect.Dialect
From class java.lang.Object

Public Constructors

public Oracle9iDialect ()

Public Methods

public CaseFragment createCaseFragment ()

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

Returns
  • The oracle CASE -> DECODE fragment

public String getCurrentTimestampSQLFunctionName ()

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

Returns
  • The function name.

public String getCurrentTimestampSelectString ()

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

Returns
  • The command.

public String getForUpdateString ()

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

Returns
  • The appropriate FOR UPDATE clause string.

public String getLimitString (String sql, boolean hasOffset)

Apply s 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 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 and getLimitString(String, int, int).

Parameters
sql The query to which to apply the limit.
hasOffset Is the query requesting an offset?
Returns
  • the modified SQL

public String getReadLockString (int timeout)

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.

Parameters
timeout in milliseconds, -1 for indefinite wait and 0 for no wait.
Returns
  • The appropriate LOCK clause string.

public String getSelectClauseNullString (int sqlType)

Given a java.sql.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 The java.sql.Types type code.
Returns
  • The appropriate select clause value fragment.

public String getWriteLockString (int timeout)

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.

Parameters
timeout in milliseconds, -1 for indefinite wait and 0 for no wait.
Returns
  • The appropriate LOCK clause string.

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.

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

public boolean supportsTupleDistinctCounts ()

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

Returns
  • True if the database supports counting disintct tuples; false otherwise.

Protected Methods

protected void registerCharacterTypeMappings ()

protected void registerDateTimeTypeMappings ()