org.sonar.api.database.dialect
Class Derby.DerbyWithDecimalDialect

java.lang.Object
  extended by org.hibernate.dialect.Dialect
      extended by org.hibernate.dialect.DB2Dialect
          extended by org.hibernate.dialect.DerbyDialect
              extended by org.sonar.api.database.dialect.Derby.DerbyWithDecimalDialect
Enclosing class:
Derby

public static class Derby.DerbyWithDecimalDialect
extends org.hibernate.dialect.DerbyDialect


Nested Class Summary
 
Nested classes/interfaces inherited from class org.hibernate.dialect.DerbyDialect
org.hibernate.dialect.DerbyDialect.DerbyTrimFunctionEmulation
 
Field Summary
 
Fields inherited from class org.hibernate.dialect.Dialect
CLOSED_QUOTE, DEFAULT_BATCH_SIZE, NO_BATCH, QUOTE
 
Constructor Summary
Derby.DerbyWithDecimalDialect()
           
 
Method Summary
 java.lang.Class getNativeIdentifierGeneratorClass()
          To be compliant with Oracle, we define on each model (ch.hortis.sonar.model classes) a sequence generator.
 
Methods inherited from class org.hibernate.dialect.DerbyDialect
createCaseFragment, dropConstraints, getIdentityColumnString, getQuerySequencesString, supportsLimit, supportsLimitOffset, supportsLobValueChangePropogation, supportsSequences
 
Methods inherited from class org.hibernate.dialect.DB2Dialect
convertToFirstRowValue, doesReadCommittedCauseWritersToBlockReaders, generateTemporaryTableName, getAddColumnString, getCreateSequenceString, getCreateTemporaryTablePostfix, getCreateTemporaryTableString, getCurrentTimestampSelectString, getDropSequenceString, getForUpdateString, getIdentityInsertString, getIdentitySelectString, getLimitString, getLowercaseFunction, getResultSet, getSelectClauseNullString, getSequenceNextValString, isCurrentTimestampSelectStringCallable, main, registerResultSetOutParameter, requiresCastingOfParametersInSelectClause, supportsCommentOn, supportsCurrentTimestampSelection, supportsEmptyInList, supportsIdentityColumns, supportsNotNullUnique, supportsOuterJoinForUpdate, supportsParametersInInsertSelect, supportsPooledSequences, supportsResultSetPositionQueryMethodsOnForwardOnlyCursor, supportsTemporaryTables, supportsUnionAll, useMaxForLimit
 
Methods inherited from class org.hibernate.dialect.Dialect
appendIdentitySelectToInsert, appendLockHint, applyLocksToSql, areStringComparisonsCaseInsensitive, bindLimitParametersFirst, bindLimitParametersInReverseOrder, buildSQLExceptionConverter, closeQuote, createOuterJoinFragment, doesRepeatableReadCauseReadersToBlockWriters, dropTemporaryTableAfterUse, forceLimitUsage, forUpdateOfColumns, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getCascadeConstraintsString, getCastTypeName, getColumnComment, getCreateMultisetTableString, getCreateSequenceString, getCreateSequenceStrings, getCreateSequenceStrings, getCreateTableString, getCurrentTimestampSQLFunctionName, getDefaultProperties, getDialect, getDialect, getDropForeignKeyString, getDropSequenceStrings, getForUpdateNowaitString, getForUpdateNowaitString, getForUpdateString, getForUpdateString, getFunctions, getHibernateTypeName, getHibernateTypeName, getIdentityColumnString, getIdentitySelectString, getKeywords, getLimitString, getLockingStrategy, getMaxAliasLength, getNoColumnsInsertString, getNullColumnString, getSelectGUIDString, getSelectSequenceNextValString, getTableComment, getTableTypeString, getTypeName, getTypeName, getViolatedConstraintNameExtracter, hasAlterTable, hasDataTypeInIdentityColumn, hasSelfReferentialForeignKeyBug, openQuote, performTemporaryTableDDLInIsolation, qualifyIndexName, quote, registerColumnType, registerColumnType, registerFunction, registerHibernateType, registerHibernateType, registerKeyword, supportsBindAsCallableArgument, supportsCascadeDelete, supportsCircularCascadeDeleteConstraints, supportsColumnCheck, supportsExistsInSelect, supportsExpectedLobUsagePattern, supportsIfExistsAfterTableName, supportsIfExistsBeforeTableName, supportsInsertSelectIdentity, supportsRowValueConstructorSyntax, supportsRowValueConstructorSyntaxInInList, supportsSubqueryOnMutatingTable, supportsSubselectAsInPredicateLHS, supportsTableCheck, supportsUnboundedLobLocatorMaterialization, 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

Derby.DerbyWithDecimalDialect

public Derby.DerbyWithDecimalDialect()
Method Detail

getNativeIdentifierGeneratorClass

public java.lang.Class getNativeIdentifierGeneratorClass()
To be compliant with Oracle, we define on each model (ch.hortis.sonar.model classes) a sequence generator. It works on mySQL because strategy = GenerationType.AUTO, so it equals GenerationType.IDENTITY. But on derby, AUTO becomes TABLE instead of IDENTITY. So we explicitly change this behavior.

Overrides:
getNativeIdentifierGeneratorClass in class org.hibernate.dialect.DerbyDialect


Copyright © 2009-2010 SonarSource. All Rights Reserved.