Class DemoHSQLDialect
java.lang.Object
org.hibernate.dialect.Dialect
org.hibernate.dialect.HSQLDialect
org.broadleafcommerce.common.dialect.DemoHSQLDialect
- All Implemented Interfaces:
org.hibernate.exception.spi.ConversionContext
public class DemoHSQLDialect
extends org.hibernate.dialect.HSQLDialect
A HSQL DB dialect specifically for the demo. In the demo use case, the database is empty on startup and does not
require table drops. Removing the table drop phase stops a number of HHH000389 level Hibernate errors from being
emitted to the console. While these exceptions are harmless, their occurrence should be avoided.
- Author:
- Jeff Fischer
-
Field Summary
Fields inherited from class org.hibernate.dialect.Dialect
CLOSED_QUOTE, DEFAULT_BATCH_SIZE, LEGACY_LOB_MERGE_STRATEGY, NEW_LOCATOR_LOB_MERGE_STRATEGY, NO_BATCH, QUOTE, STANDARD_DEFAULT_BATCH_LOAD_SIZING_STRATEGY, STREAM_XFER_LOB_MERGE_STRATEGY, TWO_SINGLE_QUOTES_REPLACEMENT
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
To avoid seeing all of the hibernate errors on first startup, disable dropping constraints.Since we aren't dropping constraints anymore, we must cascade when dropping tables to avoid violating FKs.boolean
boolean
Due to HSQL syntax and the wayDialect.getDropTableString(String)
arranges the statements, we must put theif exists
before the table name.Methods inherited from class org.hibernate.dialect.HSQLDialect
bindLimitParametersFirst, doesReadCommittedCauseWritersToBlockReaders, doesRepeatableReadCauseReadersToBlockWriters, getAddColumnString, getCreateSequenceString, getCreateSequenceString, getCurrentTimestampSelectString, getCurrentTimestampSQLFunctionName, getDefaultMultiTableBulkIdStrategy, getDropSequenceString, getForUpdateString, getIdentityColumnSupport, getLimitHandler, getLimitString, getLockingStrategy, getNameQualifierSupport, getQuerySequencesString, getSelectClauseNullString, getSelectSequenceNextValString, getSequenceInformationExtractor, getSequenceNextValString, getViolatedConstraintNameExtracter, isCurrentTimestampSelectStringCallable, requiresCastingOfParametersInSelectClause, supportsColumnCheck, supportsCommentOn, supportsCurrentTimestampSelection, supportsEmptyInList, supportsLimit, supportsLobValueChangePropogation, supportsLockTimeouts, supportsNamedParameters, supportsPooledSequences, supportsSequences, supportsTupleDistinctCounts, supportsUnionAll, toBooleanValueString
Methods inherited from class org.hibernate.dialect.Dialect
addSqlHintOrComment, appendLockHint, appendLockHint, applyLocksToSql, areStringComparisonsCaseInsensitive, augmentPhysicalTableTypes, augmentRecognizedTableTypes, bindLimitParametersInReverseOrder, buildIdentifierHelper, buildSQLExceptionConversionDelegate, buildSQLExceptionConverter, canCreateCatalog, canCreateSchema, cast, cast, cast, closeQuote, contributeTypes, convertToFirstRowValue, createCaseFragment, createOuterJoinFragment, defaultScrollMode, equivalentTypes, escapeComment, escapeLiteral, forceLimitUsage, forceLobAsLastValue, forUpdateOfColumns, getAddColumnSuffixString, getAddForeignKeyConstraintString, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getAddUniqueConstraintString, getAlterTableString, getAuxiliaryDatabaseObjectExporter, getCallableStatementSupport, getCaseInsensitiveLike, getCastTypeName, getColumnAliasExtractor, getColumnComment, getCreateCatalogCommand, getCreateMultisetTableString, getCreateSchemaCommand, getCreateSequenceStrings, getCreateSequenceStrings, getCreateTableString, getCreateTemporaryTableColumnAnnotation, getCrossJoinSeparator, getCurrentSchemaCommand, getDefaultBatchLoadSizingStrategy, getDefaultProperties, getDialect, getDialect, getDropCatalogCommand, getDropForeignKeyString, getDropSchemaCommand, getDropSequenceStrings, getDropTableString, getForeignKeyExporter, getForUpdateNowaitString, getForUpdateNowaitString, getForUpdateSkipLockedString, getForUpdateSkipLockedString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getFunctions, getHibernateTypeName, getHibernateTypeName, getIndexExporter, getInExpressionCountLimit, getKeywords, getLimitString, getLobMergeStrategy, getLowercaseFunction, getMaxAliasLength, getNativeIdentifierGeneratorClass, getNativeIdentifierGeneratorStrategy, getNoColumnsInsertString, getNotExpression, getNullColumnString, getQueryHintString, getQueryHintString, getReadLockString, getReadLockString, getResultSet, getResultSet, getResultSet, getSchemaNameResolver, getSelectGUIDString, getSequenceExporter, getSqlTypeDescriptorOverride, getTableComment, getTableExporter, getTableTypeString, getTypeName, getTypeName, getUniqueDelegate, getUniqueKeyExporter, getWriteLockString, getWriteLockString, hasAlterTable, hasSelfReferentialForeignKeyBug, inlineLiteral, isJdbcLogWarningsEnabledByDefault, isLegacyLimitHandlerBehaviorEnabled, isLockTimeoutParameterized, isTypeNameRegistered, openQuote, prependComment, qualifyIndexName, quote, registerColumnType, registerColumnType, registerFunction, registerHibernateType, registerHibernateType, registerKeyword, registerResultSetOutParameter, registerResultSetOutParameter, remapSqlTypeDescriptor, renderOrderByElement, replaceResultVariableInOrderByClauseWithPosition, requiresParensForTupleDistinctCounts, supportsBindAsCallableArgument, supportsCascadeDelete, supportsCaseInsensitiveLike, supportsCircularCascadeDeleteConstraints, supportsExistsInSelect, supportsExpectedLobUsagePattern, supportsIfExistsAfterAlterTable, supportsIfExistsAfterConstraintName, supportsIfExistsBeforeConstraintName, supportsJdbcConnectionLobCreation, supportsLimitOffset, supportsNationalizedTypes, supportsNoColumnsInsert, supportsNonQueryWithCTE, supportsNotNullUnique, supportsNoWait, supportsOuterJoinForUpdate, supportsParametersInInsertSelect, supportsPartitionBy, supportsResultSetPositionQueryMethodsOnForwardOnlyCursor, supportsRowValueConstructorSyntax, supportsRowValueConstructorSyntaxInInList, supportsRowValueConstructorSyntaxInSet, supportsSelectAliasInGroupByClause, supportsSkipLocked, supportsSubqueryOnMutatingTable, supportsSubselectAsInPredicateLHS, supportsTableCheck, supportsTupleCounts, supportsTuplesInSubqueries, supportsUnboundedLobLocatorMaterialization, supportsUnique, supportsUniqueConstraintInCreateAlterTable, supportsValuesList, supportsVariableLimit, toString, transformSelectString, useFollowOnLocking, useFollowOnLocking, useInputStreamToInsertBlob, useMaxForLimit
-
Constructor Details
-
DemoHSQLDialect
public DemoHSQLDialect()
-
-
Method Details
-
dropConstraints
public boolean dropConstraints()To avoid seeing all of the hibernate errors on first startup, disable dropping constraints.- Overrides:
dropConstraints
in classorg.hibernate.dialect.HSQLDialect
-
getCascadeConstraintsString
Since we aren't dropping constraints anymore, we must cascade when dropping tables to avoid violating FKs.- Overrides:
getCascadeConstraintsString
in classorg.hibernate.dialect.HSQLDialect
-
supportsIfExistsBeforeTableName
public boolean supportsIfExistsBeforeTableName()Due to HSQL syntax and the wayDialect.getDropTableString(String)
arranges the statements, we must put theif exists
before the table name.- Overrides:
supportsIfExistsBeforeTableName
in classorg.hibernate.dialect.HSQLDialect
-
supportsIfExistsAfterTableName
public boolean supportsIfExistsAfterTableName()- Overrides:
supportsIfExistsAfterTableName
in classorg.hibernate.dialect.HSQLDialect
- See Also:
-