org.hibernate.dialect
Class Oracle9Dialect

java.lang.Object
  extended byorg.hibernate.dialect.Dialect
      extended byorg.hibernate.dialect.Oracle9Dialect
Direct Known Subclasses:
OracleDialect

public class Oracle9Dialect
extends Dialect

An SQL dialect for Oracle 9 (uses ANSI-style syntax where possible).

Author:
Gavin King, David Channon

Field Summary
 
Fields inherited from class org.hibernate.dialect.Dialect
CLOSED_QUOTE, QUOTE
 
Constructor Summary
Oracle9Dialect()
           
 
Method Summary
 boolean bindLimitParametersInReverseOrder()
          Does the LIMIT clause specify arguments in the "reverse" order limit, offset instead of offset, limit?
 boolean dropConstraints()
          Do we need to drop constraints before dropping tables in this dialect?
 boolean dropTemporaryTableAfterUse()
           
 boolean forUpdateOfColumns()
          Does the FOR UPDATE OF syntax specify particular columns?
 String generateTemporaryTableName(String baseTableName)
           
 String getAddColumnString()
          The syntax used to add a column to a table (optional).
 String getCascadeConstraintsString()
          Completely optional cascading drop clause
 String getCreateSequenceString(String sequenceName)
          The syntax used to create a sequence, if sequences are supported.
 String getCreateTemporaryTablePostfix()
           
 String getCreateTemporaryTableString()
           
 String getCurrentTimestampSelectString()
           
 String getDropSequenceString(String sequenceName)
          The syntax used to drop a sequence, if sequences are supported.
 String getForUpdateNowaitString()
          Does this dialect support the Oracle-style FOR UPDATE NOWAIT syntax?
 String getForUpdateNowaitString(String aliases)
          Does this dialect support the Oracle-style FOR UPDATE OF ...
 String getForUpdateString(String aliases)
          Does this dialect support the FOR UPDATE OF syntax?
 String getLimitString(String sql, boolean hasOffset)
          Add a LIMIT clause to the given SQL SELECT
 String getQuerySequencesString()
          A query used to find all sequences
 ResultSet getResultSet(CallableStatement ps)
           
 String getSelectGUIDString()
           
 String getSelectSequenceNextValString(String sequenceName)
          Generate the select expression fragment that will retreive the next value of a sequence, if sequences are supported.
 String getSequenceNextValString(String sequenceName)
          Generate the appropriate select statement to to retreive the next value of a sequence, if sequences are supported.
 ViolatedConstraintNameExtracter getViolatedConstraintNameExtracter()
           
 boolean isCurrentTimestampSelectStringCallable()
           
 int registerResultSetOutParameter(CallableStatement statement, int col)
           
 boolean supportsCommentOn()
           
 boolean supportsCurrentTimestampSelection()
           
 boolean supportsLimit()
          Does this Dialect have some kind of LIMIT syntax?
 boolean supportsSequences()
          Does this dialect support sequences?
 boolean supportsTemporaryTables()
           
 boolean supportsUnionAll()
           
 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.Dialect
appendIdentitySelectToInsert, appendLockHint, bindLimitParametersFirst, buildSQLExceptionConverter, closeQuote, createCaseFragment, createOuterJoinFragment, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getCastTypeName, getColumnComment, getCreateSequenceStrings, getCurrentTimestampSQLFunctionName, getDefaultProperties, getDialect, getDialect, getDropForeignKeyString, getDropSequenceStrings, getForUpdateString, getForUpdateString, getFunctions, getHibernateTypeName, getHibernateTypeName, getIdentityColumnString, getIdentityColumnString, getIdentityInsertString, getIdentitySelectString, getIdentitySelectString, getKeywords, getLimitString, getLowercaseFunction, getMaxAliasLength, getNativeIdentifierGeneratorClass, getNoColumnsInsertString, getNullColumnString, getSelectClauseNullString, getTableComment, getTableTypeString, getTypeName, getTypeName, hasAlterTable, hasDataTypeInIdentityColumn, hasSelfReferentialForeignKeyBug, openQuote, performTemporaryTableDDLInIsolation, qualifyIndexName, quote, registerColumnType, registerColumnType, registerFunction, registerHibernateType, registerHibernateType, registerKeyword, supportsCascadeDelete, supportsColumnCheck, supportsIdentityColumns, supportsIfExistsAfterTableName, supportsIfExistsBeforeTableName, supportsInsertSelectIdentity, supportsLimitOffset, supportsNotNullUnique, supportsOuterJoinForUpdate, supportsParametersInInsertSelect, supportsTableCheck, supportsUnique, supportsUniqueConstraintInCreateAlterTable, supportsVariableLimit, toBooleanValueString, toString, transformSelectString, useInputStreamToInsertBlob
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Oracle9Dialect

public Oracle9Dialect()
Method Detail

getAddColumnString

public String getAddColumnString()
Description copied from class: Dialect
The syntax used to add a column to a table (optional).

Overrides:
getAddColumnString in class Dialect

getSequenceNextValString

public String getSequenceNextValString(String sequenceName)
Description copied from class: Dialect
Generate the appropriate select statement to to retreive the next value of a sequence, if sequences are supported.

This should be a "stand alone" select statement.

Overrides:
getSequenceNextValString in class Dialect
Parameters:
sequenceName - the name of the sequence
Returns:
String The "nextval" select string.

getSelectSequenceNextValString

public String getSelectSequenceNextValString(String sequenceName)
Description copied from class: Dialect
Generate the select expression fragment that will retreive the next value of a sequence, if sequences are supported.

This differs from Dialect.getSequenceNextValString(String) in that this should return an expression usable within another select statement.

Overrides:
getSelectSequenceNextValString in class Dialect
Parameters:
sequenceName - the name of the sequence
Returns:
String

getCreateSequenceString

public String getCreateSequenceString(String sequenceName)
Description copied from class: Dialect
The syntax used to create a sequence, if sequences are supported.

Overrides:
getCreateSequenceString in class Dialect
Parameters:
sequenceName - the name of the sequence
Returns:
String

getDropSequenceString

public String getDropSequenceString(String sequenceName)
Description copied from class: Dialect
The syntax used to drop a sequence, if sequences are supported.

Overrides:
getDropSequenceString in class Dialect
Parameters:
sequenceName - the name of the sequence
Returns:
String

getCascadeConstraintsString

public String getCascadeConstraintsString()
Description copied from class: Dialect
Completely optional cascading drop clause

Overrides:
getCascadeConstraintsString in class Dialect
Returns:
String

dropConstraints

public boolean dropConstraints()
Description copied from class: Dialect
Do we need to drop constraints before dropping tables in this dialect?

Overrides:
dropConstraints in class Dialect
Returns:
boolean

getForUpdateNowaitString

public String getForUpdateNowaitString()
Description copied from class: Dialect
Does this dialect support the Oracle-style FOR UPDATE NOWAIT syntax?

Overrides:
getForUpdateNowaitString in class Dialect
Returns:
boolean

supportsSequences

public boolean supportsSequences()
Description copied from class: Dialect
Does this dialect support sequences?

Overrides:
supportsSequences in class Dialect
Returns:
boolean

supportsLimit

public boolean supportsLimit()
Description copied from class: Dialect
Does this Dialect have some kind of LIMIT syntax?

Overrides:
supportsLimit in class Dialect

getLimitString

public String getLimitString(String sql,
                             boolean hasOffset)
Description copied from class: Dialect
Add a LIMIT clause to the given SQL SELECT

Overrides:
getLimitString in class Dialect
Returns:
the modified SQL

getForUpdateString

public String getForUpdateString(String aliases)
Description copied from class: Dialect
Does this dialect support the FOR UPDATE OF syntax?

Overrides:
getForUpdateString in class Dialect
Returns:
boolean

getForUpdateNowaitString

public String getForUpdateNowaitString(String aliases)
Description copied from class: Dialect
Does this dialect support the Oracle-style FOR UPDATE OF ... NOWAIT syntax?

Overrides:
getForUpdateNowaitString in class Dialect
Returns:
boolean

bindLimitParametersInReverseOrder

public boolean bindLimitParametersInReverseOrder()
Description copied from class: Dialect
Does the LIMIT clause specify arguments in the "reverse" order limit, offset instead of offset, limit?

Overrides:
bindLimitParametersInReverseOrder in class Dialect
Returns:
true if the correct order is limit, offset

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?

Overrides:
useMaxForLimit in class Dialect

forUpdateOfColumns

public boolean forUpdateOfColumns()
Description copied from class: Dialect
Does the FOR UPDATE OF syntax specify particular columns?

Overrides:
forUpdateOfColumns in class Dialect

getQuerySequencesString

public String getQuerySequencesString()
Description copied from class: Dialect
A query used to find all sequences

Overrides:
getQuerySequencesString in class Dialect
See Also:
SchemaUpdate

getSelectGUIDString

public String getSelectGUIDString()
Overrides:
getSelectGUIDString in class Dialect

getViolatedConstraintNameExtracter

public ViolatedConstraintNameExtracter getViolatedConstraintNameExtracter()
Overrides:
getViolatedConstraintNameExtracter in class Dialect

registerResultSetOutParameter

public int registerResultSetOutParameter(CallableStatement statement,
                                         int col)
                                  throws SQLException
Overrides:
registerResultSetOutParameter in class Dialect
Throws:
SQLException

getResultSet

public ResultSet getResultSet(CallableStatement ps)
                       throws SQLException
Overrides:
getResultSet in class Dialect
Throws:
SQLException

supportsUnionAll

public boolean supportsUnionAll()
Overrides:
supportsUnionAll in class Dialect

supportsCommentOn

public boolean supportsCommentOn()
Overrides:
supportsCommentOn in class Dialect

supportsTemporaryTables

public boolean supportsTemporaryTables()
Overrides:
supportsTemporaryTables in class Dialect

generateTemporaryTableName

public String generateTemporaryTableName(String baseTableName)
Overrides:
generateTemporaryTableName in class Dialect

getCreateTemporaryTableString

public String getCreateTemporaryTableString()
Overrides:
getCreateTemporaryTableString in class Dialect

getCreateTemporaryTablePostfix

public String getCreateTemporaryTablePostfix()
Overrides:
getCreateTemporaryTablePostfix in class Dialect

dropTemporaryTableAfterUse

public boolean dropTemporaryTableAfterUse()
Overrides:
dropTemporaryTableAfterUse in class Dialect

supportsCurrentTimestampSelection

public boolean supportsCurrentTimestampSelection()
Overrides:
supportsCurrentTimestampSelection in class Dialect

getCurrentTimestampSelectString

public String getCurrentTimestampSelectString()
Overrides:
getCurrentTimestampSelectString in class Dialect

isCurrentTimestampSelectStringCallable

public boolean isCurrentTimestampSelectStringCallable()
Overrides:
isCurrentTimestampSelectStringCallable in class Dialect