org.hibernate.dialect
Class TimesTenDialect

java.lang.Object
  extended byorg.hibernate.dialect.Dialect
      extended byorg.hibernate.dialect.TimesTenDialect

public class TimesTenDialect
extends Dialect

A SQL dialect for TimesTen 5.1. Known limitations: joined-subclass support because of no CASE support in TimesTen No support for subqueries that includes aggregation - size() in HQL not supported - user queries that does subqueries with aggregation No CLOB/BLOB support No cascade delete support. No Calendar support No support for updating primary keys.

Author:
Sherry Listgarten and Max Andersen

Field Summary
 
Fields inherited from class org.hibernate.dialect.Dialect
CLOSED_QUOTE, QUOTE
 
Constructor Summary
TimesTenDialect()
           
 
Method Summary
 JoinFragment createOuterJoinFragment()
          Create an OuterJoinGenerator for this dialect.
 boolean dropConstraints()
          Do we need to drop constraints before dropping tables in this dialect?
 String generateTemporaryTableName(String baseTableName)
           
 String getAddColumnString()
          The syntax used to add a column to a table (optional).
 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 getForUpdateString()
          Retrieves the FOR UPDATE syntax specific to this dialect.
 String getLimitString(String querySelect, int offset, int limit)
           
 String getQuerySequencesString()
          A query used to find all sequences
 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.
 boolean isCurrentTimestampSelectStringCallable()
           
 boolean qualifyIndexName()
          Do we need to qualify index names with the schema name?
 boolean supportsColumnCheck()
          Does this dialect support column-level check constraints?
 boolean supportsCurrentTimestampSelection()
           
 boolean supportsLimit()
          Does this Dialect have some kind of LIMIT syntax?
 boolean supportsLimitOffset()
          Does this dialect support an offset?
 boolean supportsSequences()
          Does this dialect support sequences?
 boolean supportsTableCheck()
          Does this dialect support table-level check constraints?
 boolean supportsTemporaryTables()
           
 boolean supportsUnique()
          Does this dialect support the UNIQUE column syntax?
 boolean supportsUniqueConstraintInCreateAlterTable()
          Does this dialect support adding Unique constraints via create and alter table ?
 boolean supportsVariableLimit()
           
 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, bindLimitParametersInReverseOrder, buildSQLExceptionConverter, closeQuote, createCaseFragment, dropTemporaryTableAfterUse, forUpdateOfColumns, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getCascadeConstraintsString, getCastTypeName, getColumnComment, getCreateSequenceStrings, getCurrentTimestampSQLFunctionName, getDefaultProperties, getDialect, getDialect, getDropForeignKeyString, getDropSequenceStrings, getForUpdateNowaitString, getForUpdateNowaitString, getForUpdateString, getForUpdateString, getFunctions, getHibernateTypeName, getHibernateTypeName, getIdentityColumnString, getIdentityColumnString, getIdentityInsertString, getIdentitySelectString, getIdentitySelectString, getKeywords, getLimitString, getLowercaseFunction, getMaxAliasLength, getNativeIdentifierGeneratorClass, getNoColumnsInsertString, getNullColumnString, getResultSet, getSelectClauseNullString, getSelectGUIDString, getTableComment, getTableTypeString, getTypeName, getTypeName, getViolatedConstraintNameExtracter, hasAlterTable, hasDataTypeInIdentityColumn, hasSelfReferentialForeignKeyBug, openQuote, performTemporaryTableDDLInIsolation, quote, registerColumnType, registerColumnType, registerFunction, registerHibernateType, registerHibernateType, registerKeyword, registerResultSetOutParameter, supportsCascadeDelete, supportsCommentOn, supportsIdentityColumns, supportsIfExistsAfterTableName, supportsIfExistsBeforeTableName, supportsInsertSelectIdentity, supportsNotNullUnique, supportsOuterJoinForUpdate, supportsParametersInInsertSelect, supportsUnionAll, toBooleanValueString, toString, transformSelectString, useInputStreamToInsertBlob
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TimesTenDialect

public TimesTenDialect()
Method Detail

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

qualifyIndexName

public boolean qualifyIndexName()
Description copied from class: Dialect
Do we need to qualify index names with the schema name?

Overrides:
qualifyIndexName in class Dialect
Returns:
boolean

supportsUnique

public boolean supportsUnique()
Description copied from class: Dialect
Does this dialect support the UNIQUE column syntax?

Overrides:
supportsUnique in class Dialect
Returns:
boolean

supportsUniqueConstraintInCreateAlterTable

public boolean supportsUniqueConstraintInCreateAlterTable()
Description copied from class: Dialect
Does this dialect support adding Unique constraints via create and alter table ?

Overrides:
supportsUniqueConstraintInCreateAlterTable in class Dialect
Returns:
boolean

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

supportsSequences

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

Overrides:
supportsSequences in class Dialect
Returns:
boolean

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

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.

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

getQuerySequencesString

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

Overrides:
getQuerySequencesString in class Dialect
See Also:
SchemaUpdate

createOuterJoinFragment

public JoinFragment createOuterJoinFragment()
Description copied from class: Dialect
Create an OuterJoinGenerator for this dialect.

Overrides:
createOuterJoinFragment in class Dialect
Returns:
OuterJoinGenerator

getForUpdateString

public String getForUpdateString()
Description copied from class: Dialect
Retrieves the FOR UPDATE syntax specific to this dialect.

Overrides:
getForUpdateString in class Dialect
Returns:
The appropriate FOR UPDATE clause string.

supportsColumnCheck

public boolean supportsColumnCheck()
Description copied from class: Dialect
Does this dialect support column-level check constraints?

Overrides:
supportsColumnCheck in class Dialect

supportsTableCheck

public boolean supportsTableCheck()
Description copied from class: Dialect
Does this dialect support table-level check constraints?

Overrides:
supportsTableCheck in class Dialect

supportsLimitOffset

public boolean supportsLimitOffset()
Description copied from class: Dialect
Does this dialect support an offset?

Overrides:
supportsLimitOffset in class Dialect

supportsVariableLimit

public boolean supportsVariableLimit()
Overrides:
supportsVariableLimit in class Dialect

supportsLimit

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

Overrides:
supportsLimit in class Dialect

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

getLimitString

public String getLimitString(String querySelect,
                             int offset,
                             int limit)
Overrides:
getLimitString 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

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