Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.hibernate.dialect
Class MimerSQLDialect  view MimerSQLDialect download MimerSQLDialect.java

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

public class MimerSQLDialect
extends Dialect

An Hibernate 3 SQL dialect for Mimer SQL. This dialect requires Mimer SQL 9.2.1 or later because of the mappings to NCLOB, BINARY, and BINARY VARYING.


Field Summary
private static int BINARY_MAX_LENGTH
           
private static int NATIONAL_CHAR_LENGTH
           
 
Fields inherited from class org.hibernate.dialect.Dialect
CLOSED_QUOTE, DEFAULT_BATCH_SIZE, NO_BATCH, QUOTE
 
Constructor Summary
MimerSQLDialect()
          Even thoug Mimer SQL supports character and binary columns up to 15 000 in lenght, this is also the maximum width of the table (exluding LOBs).
 
Method Summary
 boolean dropConstraints()
          We do not have to drop constraints before we drop the table
 boolean forUpdateOfColumns()
          Does the FOR UPDATE OF syntax specify particular columns?
 java.lang.String getAddColumnString()
          The syntax used to add a column to a table
 java.lang.String getCascadeConstraintsString()
          The syntax for using cascade on constraints
 java.lang.String getCreateSequenceString(java.lang.String sequenceName)
          The syntax used to create a sequence.
 java.lang.String getDropSequenceString(java.lang.String sequenceName)
          The syntax used to drop sequences
 java.lang.String getQuerySequencesString()
          The syntax for fetching all sequnces avialable in the current schema.
 java.lang.String getSequenceNextValString(java.lang.String sequenceName)
          The syntax used to get the next value of a sequence in Mimer SQL
 boolean supportsForUpdate()
          Support the FOR UPDATE syntax? For now, returns false since the current version of the Mimer SQL JDBC Driver does not support updatable resultsets.
 boolean supportsIdentityColumns()
          TODO: Check if Mimer SQL cannot handle the way DB2 does
 boolean supportsLimit()
          Mimer SQL does not support limit
 boolean supportsOuterJoinForUpdate()
          For now, simply return false since we don't updatable result sets.
 boolean supportsSequences()
          Mimer SQL supports sequences
 
Methods inherited from class org.hibernate.dialect.Dialect
appendIdentitySelectToInsert, appendLockHint, bindLimitParametersFirst, bindLimitParametersInReverseOrder, buildSQLExceptionConverter, closeQuote, createCaseFragment, createOuterJoinFragment, dropTemporaryTableAfterUse, generateTemporaryTableName, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getCastTypeName, getColumnComment, getCreateSequenceStrings, getCreateTemporaryTablePostfix, getCreateTemporaryTableString, getCurrentTimestampSelectString, getCurrentTimestampSQLFunctionName, getDefaultProperties, getDialect, getDialect, getDropForeignKeyString, getDropSequenceStrings, getForUpdateNowaitString, getForUpdateNowaitString, getForUpdateString, getForUpdateString, getForUpdateString, getFunctions, getHibernateTypeName, getHibernateTypeName, getIdentityColumnString, getIdentityColumnString, getIdentityInsertString, getIdentitySelectString, getIdentitySelectString, getKeywords, getLimitString, getLimitString, getLockingStrategy, getLowercaseFunction, getMaxAliasLength, getNativeIdentifierGeneratorClass, getNoColumnsInsertString, getNullColumnString, getResultSet, getSelectClauseNullString, getSelectGUIDString, getSelectSequenceNextValString, getTableComment, getTableTypeString, getTypeName, getTypeName, getViolatedConstraintNameExtracter, hasAlterTable, hasDataTypeInIdentityColumn, hasSelfReferentialForeignKeyBug, isCurrentTimestampSelectStringCallable, openQuote, performTemporaryTableDDLInIsolation, qualifyIndexName, quote, registerColumnType, registerColumnType, registerFunction, registerHibernateType, registerHibernateType, registerKeyword, registerResultSetOutParameter, supportsCascadeDelete, supportsColumnCheck, supportsCommentOn, supportsCurrentTimestampSelection, supportsIfExistsAfterTableName, supportsIfExistsBeforeTableName, supportsInsertSelectIdentity, supportsLimitOffset, supportsNotNullUnique, supportsParametersInInsertSelect, supportsTableCheck, supportsTemporaryTables, supportsUnionAll, supportsUnique, supportsUniqueConstraintInCreateAlterTable, supportsVariableLimit, toBooleanValueString, toString, transformSelectString, useInputStreamToInsertBlob, useMaxForLimit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NATIONAL_CHAR_LENGTH

private static final int NATIONAL_CHAR_LENGTH
See Also:
Constant Field Values

BINARY_MAX_LENGTH

private static final int BINARY_MAX_LENGTH
See Also:
Constant Field Values
Constructor Detail

MimerSQLDialect

public MimerSQLDialect()
Even thoug Mimer SQL supports character and binary columns up to 15 000 in lenght, this is also the maximum width of the table (exluding LOBs). To avoid breaking the limit all the time we limit the length of the character columns to CHAR_MAX_LENTH, NATIONAL_CHAR_LENGTH for national characters, and BINARY_MAX_LENGTH for binary types.

Method Detail

getAddColumnString

public java.lang.String getAddColumnString()
The syntax used to add a column to a table

Overrides:
getAddColumnString in class Dialect

dropConstraints

public boolean dropConstraints()
We do not have to drop constraints before we drop the table

Overrides:
dropConstraints in class Dialect

supportsIdentityColumns

public boolean supportsIdentityColumns()
TODO: Check if Mimer SQL cannot handle the way DB2 does

Overrides:
supportsIdentityColumns in class Dialect

supportsSequences

public boolean supportsSequences()
Mimer SQL supports sequences

Overrides:
supportsSequences in class Dialect

getSequenceNextValString

public java.lang.String getSequenceNextValString(java.lang.String sequenceName)
The syntax used to get the next value of a sequence in Mimer SQL

Overrides:
getSequenceNextValString in class Dialect

getCreateSequenceString

public java.lang.String getCreateSequenceString(java.lang.String sequenceName)
The syntax used to create a sequence. Since we presume the sequences will be used as keys, we make them unique.

Overrides:
getCreateSequenceString in class Dialect

getDropSequenceString

public java.lang.String getDropSequenceString(java.lang.String sequenceName)
The syntax used to drop sequences

Overrides:
getDropSequenceString in class Dialect

supportsLimit

public boolean supportsLimit()
Mimer SQL does not support limit

Overrides:
supportsLimit in class Dialect

getCascadeConstraintsString

public java.lang.String getCascadeConstraintsString()
The syntax for using cascade on constraints

Overrides:
getCascadeConstraintsString in class Dialect

getQuerySequencesString

public java.lang.String getQuerySequencesString()
The syntax for fetching all sequnces avialable in the current schema.

Overrides:
getQuerySequencesString in class Dialect

forUpdateOfColumns

public boolean forUpdateOfColumns()
Does the FOR UPDATE OF syntax specify particular columns?

Overrides:
forUpdateOfColumns in class Dialect

supportsForUpdate

public boolean supportsForUpdate()
Support the FOR UPDATE syntax? For now, returns false since the current version of the Mimer SQL JDBC Driver does not support updatable resultsets. Otherwise, Mimer SQL actually supports the for update syntax.


supportsOuterJoinForUpdate

public boolean supportsOuterJoinForUpdate()
For now, simply return false since we don't updatable result sets.

Overrides:
supportsOuterJoinForUpdate in class Dialect