Top Description Fields Constructors Methods
org.hibernate.dialect

public Class MimerSQLDialect

extends Dialect
Class Inheritance
Imports
java.sql.Types, org.hibernate.cfg.Environment, org.hibernate.dialect.function.StandardSQLFunction, org.hibernate.type.StandardBasicTypes

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.
Author
Fredrik �lund

Field Summary

Modifier and TypeField and Description
private static final int
private static final int
Inherited from org.hibernate.dialect.Dialect:
CLOSED_QUOTEDEFAULT_BATCH_SIZENO_BATCHQUOTE

Constructor Summary

AccessConstructor and Description
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).

Method Summary

Modifier and TypeMethod and Description
public boolean
dropConstraints()

Overrides org.hibernate.dialect.Dialect.dropConstraints.

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

Overrides org.hibernate.dialect.Dialect.forUpdateOfColumns.

Does the FOR UPDATE OF syntax specify particular columns?
public String
getAddColumnString()

Overrides org.hibernate.dialect.Dialect.getAddColumnString.

The syntax used to add a column to a table
public String
getCascadeConstraintsString()

Overrides org.hibernate.dialect.Dialect.getCascadeConstraintsString.

The syntax for using cascade on constraints
public String
getCreateSequenceString(String
The name of the sequence
sequenceName
)

Overrides org.hibernate.dialect.Dialect.getCreateSequenceString.

The syntax used to create a sequence.
public String
getDropSequenceString(String
The name of the sequence
sequenceName
)

Overrides org.hibernate.dialect.Dialect.getDropSequenceString.

The syntax used to drop sequences
public String
getQuerySequencesString()

Overrides org.hibernate.dialect.Dialect.getQuerySequencesString.

The syntax for fetching all sequnces avialable in the current schema.
public String
getSequenceNextValString(String
the name of the sequence
sequenceName
)

Overrides org.hibernate.dialect.Dialect.getSequenceNextValString.

The syntax used to get the next value of a sequence in Mimer SQL
public boolean

Returns:

boolean
supportsForUpdate
()

Support the FOR UPDATE syntax?

public boolean
supportsIdentityColumns()

Overrides org.hibernate.dialect.Dialect.supportsIdentityColumns.

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

Overrides org.hibernate.dialect.Dialect.supportsLimit.

Mimer SQL does not support limit
public boolean
supportsOuterJoinForUpdate()

Overrides org.hibernate.dialect.Dialect.supportsOuterJoinForUpdate.

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

Returns:

boolean
supportsSequences
()

Overrides org.hibernate.dialect.Dialect.supportsSequences.

Mimer SQL supports sequences
Inherited from org.hibernate.dialect.Dialect:
addTypeOverrideappendIdentitySelectToInsertappendLockHintapplyLocksToSqlareStringComparisonsCaseInsensitivebindLimitParametersFirstbindLimitParametersInReverseOrderbuildSQLExceptionConvertercloseQuoteconvertToFirstRowValuecreateCaseFragmentcreateOuterJoinFragmentdoesReadCommittedCauseWritersToBlockReadersdoesRepeatableReadCauseReadersToBlockWritersdropTemporaryTableAfterUseforceLimitUsagegenerateTemporaryTableNamegetAddForeignKeyConstraintStringgetAddPrimaryKeyConstraintStringgetCastTypeNamegetColumnAliasExtractorgetColumnCommentgetCreateMultisetTableStringgetCreateSequenceStringgetCreateSequenceStringsgetCreateSequenceStringsgetCreateTableStringgetCreateTemporaryTablePostfixgetCreateTemporaryTableStringgetCrossJoinSeparatorgetCurrentTimestampSelectStringgetCurrentTimestampSQLFunctionNamegetDefaultPropertiesgetDialectgetDialectgetDropForeignKeyStringgetDropSequenceStringsgetDropTemporaryTableStringgetForUpdateNowaitStringgetForUpdateNowaitStringgetForUpdateStringgetForUpdateStringgetForUpdateStringgetForUpdateStringgetForUpdateStringgetFunctionsgetHibernateTypeNamegetHibernateTypeNamegetIdentityColumnStringgetIdentityColumnStringgetIdentityInsertStringgetIdentitySelectStringgetIdentitySelectStringgetKeywordsgetLimitStringgetLimitStringgetLockingStrategygetLowercaseFunctiongetMaxAliasLengthgetNativeIdentifierGeneratorClassgetNoColumnsInsertStringgetNullColumnStringgetReadLockStringgetResultSetgetSelectClauseNullStringgetSelectGUIDStringgetSelectSequenceNextValStringgetTableCommentgetTableTypeStringgetTypeNamegetTypeNamegetTypeOverridesgetViolatedConstraintNameExtractergetWriteLockStringhasAlterTablehasDataTypeInIdentityColumnhasSelfReferentialForeignKeyBugisCurrentTimestampSelectStringCallableisLockTimeoutParameterizedopenQuoteperformTemporaryTableDDLInIsolationqualifyIndexNamequoteregisterColumnTyperegisterColumnTyperegisterFunctionregisterHibernateTyperegisterHibernateTyperegisterKeywordregisterResultSetOutParameterreplaceResultVariableInOrderByClauseWithPositionrequiresCastingOfParametersInSelectClausesupportsBindAsCallableArgumentsupportsCascadeDeletesupportsCircularCascadeDeleteConstraintssupportsColumnChecksupportsCommentOnsupportsCurrentTimestampSelectionsupportsEmptyInListsupportsExistsInSelectsupportsExpectedLobUsagePatternsupportsIfExistsAfterTableNamesupportsIfExistsBeforeTableNamesupportsInsertSelectIdentitysupportsLimitOffsetsupportsLobValueChangePropogationsupportsLockTimeoutssupportsNotNullUniquesupportsParametersInInsertSelectsupportsPooledSequencessupportsResultSetPositionQueryMethodsOnForwardOnlyCursorsupportsRowValueConstructorSyntaxsupportsRowValueConstructorSyntaxInInListsupportsSubqueryOnMutatingTablesupportsSubselectAsInPredicateLHSsupportsTableChecksupportsTemporaryTablessupportsTupleCountssupportsTupleDistinctCountssupportsUnboundedLobLocatorMaterializationsupportsUnionAllsupportsUniquesupportsUniqueConstraintInCreateAlterTablesupportsVariableLimittoBooleanValueStringtoStringtransformSelectStringuseInputStreamToInsertBlobuseMaxForLimit

Field Detail

BINARY_MAX_LENGTHback to summary
private static final int BINARY_MAX_LENGTH
NATIONAL_CHAR_LENGTHback to summary
private static final int NATIONAL_CHAR_LENGTH

Constructor Detail

MimerSQLDialectback to summary
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

dropConstraintsback to summary
public boolean dropConstraints()

Overrides org.hibernate.dialect.Dialect.dropConstraints.

We do not have to drop constraints before we drop the table

Returns:boolean

Doc from org.hibernate.dialect.Dialect.dropConstraints.

True if constraints must be dropped prior to dropping the table; false otherwise.

forUpdateOfColumnsback to summary
public boolean forUpdateOfColumns()

Overrides org.hibernate.dialect.Dialect.forUpdateOfColumns.

Does the FOR UPDATE OF syntax specify particular columns?

Returns:boolean

Doc from org.hibernate.dialect.Dialect.forUpdateOfColumns.

True if the database supports FOR UPDATE OF syntax; false otherwise.

getAddColumnStringback to summary
public String getAddColumnString()

Overrides org.hibernate.dialect.Dialect.getAddColumnString.

The syntax used to add a column to a table

Returns:String

Doc from org.hibernate.dialect.Dialect.getAddColumnString.

The "add column" fragment.

getCascadeConstraintsStringback to summary
public String getCascadeConstraintsString()

Overrides org.hibernate.dialect.Dialect.getCascadeConstraintsString.

The syntax for using cascade on constraints

Returns:String

Doc from org.hibernate.dialect.Dialect.getCascadeConstraintsString.

String

getCreateSequenceStringback to summary
public String getCreateSequenceString(String sequenceName)

Overrides org.hibernate.dialect.Dialect.getCreateSequenceString.

The syntax used to create a sequence. Since we presume the sequences will be used as keys, we make them unique.

Parameters
sequenceName:String

Doc from org.hibernate.dialect.Dialect.getCreateSequenceString.

The name of the sequence

Returns:String

Doc from org.hibernate.dialect.Dialect.getCreateSequenceString.

The sequence creation command

getDropSequenceStringback to summary
public String getDropSequenceString(String sequenceName)

Overrides org.hibernate.dialect.Dialect.getDropSequenceString.

The syntax used to drop sequences

Parameters
sequenceName:String

Doc from org.hibernate.dialect.Dialect.getDropSequenceString.

The name of the sequence

Returns:String

Doc from org.hibernate.dialect.Dialect.getDropSequenceString.

The sequence drop commands

getQuerySequencesStringback to summary
public String getQuerySequencesString()

Overrides org.hibernate.dialect.Dialect.getQuerySequencesString.

The syntax for fetching all sequnces avialable in the current schema.

Returns:String

Doc from org.hibernate.dialect.Dialect.getQuerySequencesString.

The select command; or null if sequences are not supported.

getSequenceNextValStringback to summary
public String getSequenceNextValString(String sequenceName)

Overrides org.hibernate.dialect.Dialect.getSequenceNextValString.

The syntax used to get the next value of a sequence in Mimer SQL

Parameters
sequenceName:String

Doc from org.hibernate.dialect.Dialect.getSequenceNextValString.

the name of the sequence

Returns:String

Doc from org.hibernate.dialect.Dialect.getSequenceNextValString.

String The "nextval" select string.

supportsForUpdateback to summary
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.

Returns:boolean

boolean

supportsIdentityColumnsback to summary
public boolean supportsIdentityColumns()

Overrides org.hibernate.dialect.Dialect.supportsIdentityColumns.

TODO: Check if Mimer SQL cannot handle the way DB2 does

Returns:boolean

Doc from org.hibernate.dialect.Dialect.supportsIdentityColumns.

True if IDENTITY columns are supported; false otherwise.

supportsLimitback to summary
public boolean supportsLimit()

Overrides org.hibernate.dialect.Dialect.supportsLimit.

Mimer SQL does not support limit

Returns:boolean

Doc from org.hibernate.dialect.Dialect.supportsLimit.

True if this dialect supports some form of LIMIT.

supportsOuterJoinForUpdateback to summary
public boolean supportsOuterJoinForUpdate()

Overrides org.hibernate.dialect.Dialect.supportsOuterJoinForUpdate.

For now, simply return false since we don't updatable result sets.

Returns:boolean

Doc from org.hibernate.dialect.Dialect.supportsOuterJoinForUpdate.

True if outer joined rows can be locked via FOR UPDATE.

supportsSequencesback to summary
public boolean supportsSequences()

Overrides org.hibernate.dialect.Dialect.supportsSequences.

Mimer SQL supports sequences

Returns:boolean

boolean