Package org.hibernate.dialect
Class DerbyDialect
- java.lang.Object
-
- org.hibernate.dialect.Dialect
-
- org.hibernate.dialect.DB2Dialect
-
- org.hibernate.dialect.DerbyDialect
-
- All Implemented Interfaces:
ConversionContext
- Direct Known Subclasses:
DerbyTenFiveDialect
@Deprecated public class DerbyDialect extends DB2Dialect
Deprecated.HHH-6073Hibernate Dialect for Cloudscape 10 - aka Derby. This implements both an override for the identity column generator as well as for the case statement issue documented at: http://www.jroller.com/comments/kenlars99/Weblog/cloudscape_soon_to_be_derby
-
-
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
-
-
Constructor Summary
Constructors Constructor Description DerbyDialect()
Deprecated.Constructs a DerbyDialect
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description IdentifierHelper
buildIdentifierHelper(IdentifierHelperBuilder builder, java.sql.DatabaseMetaData dbMetaData)
Deprecated.Build the IdentifierHelper indicated by this Dialect for handling identifier conversions.CaseFragment
createCaseFragment()
Deprecated.Create aCaseFragment
strategy responsible for handling this dialect's variations in how CASE statements are handled.boolean
dropConstraints()
Deprecated.Do we need to drop constraints before dropping tables in this dialect?java.lang.String
getCrossJoinSeparator()
Deprecated.Returns the separator to use for defining cross joins when translating HQL queries.MultiTableBulkIdStrategy
getDefaultMultiTableBulkIdStrategy()
Deprecated.java.lang.String
getForUpdateString()
Deprecated.Get the string to append to SELECT statements to acquire locks for this dialect.LimitHandler
getLimitHandler()
Deprecated.Returns the delegate managing LIMIT clause.java.lang.String
getLimitString(java.lang.String query, int offset, int limit)
Deprecated.Given a limit and an offset, apply the limit clause to the query.java.lang.String
getQuerySequencesString()
Deprecated.Get the select command used retrieve the names of all sequences.java.lang.String
getReadLockString(int timeout)
Deprecated.Get the string to append to SELECT statements to acquire READ locks for this dialect.java.lang.String
getSequenceNextValString(java.lang.String sequenceName)
Deprecated.Generate the appropriate select statement to to retrieve the next value of a sequence.java.lang.String
getWriteLockString(int timeout)
Deprecated.Get the string to append to SELECT statements to acquire WRITE locks for this dialect.protected void
registerDerbyKeywords()
Deprecated.boolean
supportsCommentOn()
Deprecated.Does this dialect/database support commenting on tables, columns, etc?boolean
supportsLimit()
Deprecated.Does this dialect support some form of limiting query results via a SQL clause?boolean
supportsLimitOffset()
Deprecated.Does this dialect's LIMIT support (if any) additionally support specifying an offset?boolean
supportsLobValueChangePropogation()
Deprecated.Does the dialect support propagating changes to LOB values back to the database? Talking about mutating the internal value of the locator as opposed to supplying a new locator instance...boolean
supportsSequences()
Deprecated.Does this dialect support sequences?boolean
supportsTuplesInSubqueries()
Deprecated.Does this dialect support tuples in subqueries? Ex: delete from Table1 where (col1, col2) in (select col1, col2 from Table2)boolean
supportsUnboundedLobLocatorMaterialization()
Deprecated.Is it supported to materialize a LOB locator outside the transaction in which it was created?boolean
supportsVariableLimit()
Deprecated.Does this dialect support bind variables (i.e., prepared statement parameters) for its limit/offset?-
Methods inherited from class org.hibernate.dialect.DB2Dialect
buildSQLExceptionConversionDelegate, convertToFirstRowValue, doesReadCommittedCauseWritersToBlockReaders, getAddColumnString, getCreateSequenceString, getCurrentTimestampSelectString, getDropSequenceString, getIdentityColumnSupport, getLowercaseFunction, getNotExpression, getResultSet, getSelectClauseNullString, getSelectSequenceNextValString, getSqlTypeDescriptorOverride, getUniqueDelegate, isCurrentTimestampSelectStringCallable, registerResultSetOutParameter, renderOrderByElement, requiresCastingOfParametersInSelectClause, supportsCurrentTimestampSelection, supportsEmptyInList, supportsExistsInSelect, supportsLockTimeouts, supportsOuterJoinForUpdate, supportsParametersInInsertSelect, supportsPartitionBy, supportsPooledSequences, supportsResultSetPositionQueryMethodsOnForwardOnlyCursor, supportsTupleDistinctCounts, supportsUnionAll, useMaxForLimit
-
Methods inherited from class org.hibernate.dialect.Dialect
addSqlHintOrComment, appendLockHint, appendLockHint, applyLocksToSql, areStringComparisonsCaseInsensitive, augmentRecognizedTableTypes, bindLimitParametersFirst, bindLimitParametersInReverseOrder, buildSQLExceptionConverter, canCreateCatalog, canCreateSchema, cast, cast, cast, closeQuote, contributeTypes, createOuterJoinFragment, defaultScrollMode, doesRepeatableReadCauseReadersToBlockWriters, escapeComment, escapeLiteral, forceLimitUsage, forceLobAsLastValue, forUpdateOfColumns, getAddColumnSuffixString, getAddForeignKeyConstraintString, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getAddUniqueConstraintString, getAlterTableString, getAuxiliaryDatabaseObjectExporter, getCallableStatementSupport, getCascadeConstraintsString, getCaseInsensitiveLike, getCastTypeName, getColumnAliasExtractor, getColumnComment, getCreateCatalogCommand, getCreateMultisetTableString, getCreateSchemaCommand, getCreateSequenceString, getCreateSequenceStrings, getCreateSequenceStrings, getCreateTableString, getCurrentSchemaCommand, getCurrentTimestampSQLFunctionName, 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, getLockingStrategy, getMaxAliasLength, getNameQualifierSupport, getNativeIdentifierGeneratorClass, getNativeIdentifierGeneratorStrategy, getNoColumnsInsertString, getNullColumnString, getQueryHintString, getQueryHintString, getReadLockString, getResultSet, getResultSet, getSchemaNameResolver, getSelectGUIDString, getSequenceExporter, getSequenceInformationExtractor, getTableComment, getTableExporter, getTableTypeString, getTypeName, getTypeName, getUniqueKeyExporter, getViolatedConstraintNameExtracter, getWriteLockString, hasAlterTable, hasSelfReferentialForeignKeyBug, inlineLiteral, isJdbcLogWarningsEnabledByDefault, isLegacyLimitHandlerBehaviorEnabled, isLockTimeoutParameterized, isTypeNameRegistered, openQuote, prependComment, qualifyIndexName, quote, registerColumnType, registerColumnType, registerFunction, registerHibernateType, registerHibernateType, registerKeyword, registerResultSetOutParameter, remapSqlTypeDescriptor, replaceResultVariableInOrderByClauseWithPosition, requiresParensForTupleDistinctCounts, supportsBindAsCallableArgument, supportsCascadeDelete, supportsCaseInsensitiveLike, supportsCircularCascadeDeleteConstraints, supportsColumnCheck, supportsExpectedLobUsagePattern, supportsIfExistsAfterAlterTable, supportsIfExistsAfterConstraintName, supportsIfExistsAfterTableName, supportsIfExistsBeforeConstraintName, supportsIfExistsBeforeTableName, supportsNamedParameters, supportsNationalizedTypes, supportsNonQueryWithCTE, supportsNotNullUnique, supportsNoWait, supportsRowValueConstructorSyntax, supportsRowValueConstructorSyntaxInInList, supportsSkipLocked, supportsSubqueryOnMutatingTable, supportsSubselectAsInPredicateLHS, supportsTableCheck, supportsTupleCounts, supportsUnique, supportsUniqueConstraintInCreateAlterTable, supportsValuesList, toBooleanValueString, toString, transformSelectString, useFollowOnLocking, useFollowOnLocking, useInputStreamToInsertBlob
-
-
-
-
Method Detail
-
getCrossJoinSeparator
public java.lang.String getCrossJoinSeparator()
Deprecated.Description copied from class:Dialect
Returns the separator to use for defining cross joins when translating HQL queries. Typically this will be either [ cross join ] or [, ] Note that the spaces are important!- Overrides:
getCrossJoinSeparator
in classDB2Dialect
- Returns:
- The cross join separator
-
createCaseFragment
public CaseFragment createCaseFragment()
Deprecated.Description copied from class:Dialect
Create aCaseFragment
strategy responsible for handling this dialect's variations in how CASE statements are handled.- Overrides:
createCaseFragment
in classDialect
- Returns:
- This dialect's
CaseFragment
strategy.
-
dropConstraints
public boolean dropConstraints()
Deprecated.Description copied from class:Dialect
Do we need to drop constraints before dropping tables in this dialect?- Overrides:
dropConstraints
in classDB2Dialect
- Returns:
- True if constraints must be dropped prior to dropping the table; false otherwise.
-
supportsSequences
public boolean supportsSequences()
Deprecated.Description copied from class:Dialect
Does this dialect support sequences?- Overrides:
supportsSequences
in classDB2Dialect
- Returns:
- True if sequences supported; false otherwise.
-
getQuerySequencesString
public java.lang.String getQuerySequencesString()
Deprecated.Description copied from class:Dialect
Get the select command used retrieve the names of all sequences.- Overrides:
getQuerySequencesString
in classDB2Dialect
- Returns:
- The select command; or null if sequences are not supported.
- See Also:
SchemaUpdate
-
getSequenceNextValString
public java.lang.String getSequenceNextValString(java.lang.String sequenceName)
Deprecated.Description copied from class:Dialect
Generate the appropriate select statement to to retrieve the next value of a sequence. This should be a "stand alone" select statement.- Overrides:
getSequenceNextValString
in classDB2Dialect
- Parameters:
sequenceName
- the name of the sequence- Returns:
- String The "nextval" select string.
-
supportsLimit
public boolean supportsLimit()
Deprecated.Description copied from class:Dialect
Does this dialect support some form of limiting query results via a SQL clause?- Overrides:
supportsLimit
in classDB2Dialect
- Returns:
- True if this dialect supports some form of LIMIT.
-
supportsCommentOn
public boolean supportsCommentOn()
Deprecated.Description copied from class:Dialect
Does this dialect/database support commenting on tables, columns, etc?- Overrides:
supportsCommentOn
in classDB2Dialect
- Returns:
true
if commenting is supported
-
supportsLimitOffset
public boolean supportsLimitOffset()
Deprecated.Description copied from class:Dialect
Does this dialect's LIMIT support (if any) additionally support specifying an offset?- Overrides:
supportsLimitOffset
in classDialect
- Returns:
- True if the dialect supports an offset within the limit support.
-
getForUpdateString
public java.lang.String getForUpdateString()
Deprecated.Description copied from class:Dialect
Get the string to append to SELECT statements to acquire locks for this dialect.- Overrides:
getForUpdateString
in classDB2Dialect
- Returns:
- The appropriate FOR UPDATE clause string.
-
getWriteLockString
public java.lang.String getWriteLockString(int timeout)
Deprecated.Description copied from class:Dialect
Get the string to append to SELECT statements to acquire WRITE locks for this dialect. Location of the of the returned string is treated the same as getForUpdateString.- Overrides:
getWriteLockString
in classDialect
- Parameters:
timeout
- in milliseconds, -1 for indefinite wait and 0 for no wait.- Returns:
- The appropriate LOCK clause string.
-
getReadLockString
public java.lang.String getReadLockString(int timeout)
Deprecated.Description copied from class:Dialect
Get the string to append to SELECT statements to acquire READ locks for this dialect. Location of the of the returned string is treated the same as getForUpdateString.- Overrides:
getReadLockString
in classDialect
- Parameters:
timeout
- in milliseconds, -1 for indefinite wait and 0 for no wait.- Returns:
- The appropriate LOCK clause string.
-
getLimitHandler
public LimitHandler getLimitHandler()
Deprecated.Description copied from class:Dialect
Returns the delegate managing LIMIT clause.- Overrides:
getLimitHandler
in classDB2Dialect
- Returns:
- LIMIT clause delegate.
-
supportsTuplesInSubqueries
public boolean supportsTuplesInSubqueries()
Deprecated.Description copied from class:Dialect
Does this dialect support tuples in subqueries? Ex: delete from Table1 where (col1, col2) in (select col1, col2 from Table2)- Overrides:
supportsTuplesInSubqueries
in classDialect
- Returns:
- boolean
-
getLimitString
public java.lang.String getLimitString(java.lang.String query, int offset, int limit)
Deprecated.Given a limit and an offset, apply the limit clause to the query. From Derby 10.5 Docs:Query [ORDER BY clause] [result offset clause] [fetch first clause] [FOR UPDATE clause] [WITH {RR|RS|CS|UR}]
- Overrides:
getLimitString
in classDB2Dialect
- Parameters:
query
- The query to which to apply the limit.offset
- The offset of the limitlimit
- The limit of the limit ;)- Returns:
- The modified query statement with the limit applied.
-
supportsVariableLimit
public boolean supportsVariableLimit()
Deprecated.Description copied from class:Dialect
Does this dialect support bind variables (i.e., prepared statement parameters) for its limit/offset?- Overrides:
supportsVariableLimit
in classDB2Dialect
- Returns:
- True if bind variables can be used; false otherwise.
-
supportsLobValueChangePropogation
public boolean supportsLobValueChangePropogation()
Deprecated.Description copied from class:Dialect
Does the dialect support propagating changes to LOB values back to the database? Talking about mutating the internal value of the locator as opposed to supplying a new locator instance... For BLOBs, the internal value might be changed by:Blob.setBinaryStream(long)
,Blob.setBytes(long, byte[])
,Blob.setBytes(long, byte[], int, int)
, orBlob.truncate(long)
. For CLOBs, the internal value might be changed by:Clob.setAsciiStream(long)
,Clob.setCharacterStream(long)
,Clob.setString(long, String)
,Clob.setString(long, String, int, int)
, orClob.truncate(long)
. NOTE : I do not know the correct answer currently for databases which (1) are not part of the cruise control process or (2) do notDialect.supportsExpectedLobUsagePattern()
.- Overrides:
supportsLobValueChangePropogation
in classDB2Dialect
- Returns:
- True if the changes are propagated back to the database; false otherwise.
-
supportsUnboundedLobLocatorMaterialization
public boolean supportsUnboundedLobLocatorMaterialization()
Deprecated.Description copied from class:Dialect
Is it supported to materialize a LOB locator outside the transaction in which it was created? Again, part of the trickiness here is the fact that this is largely driver dependent. NOTE: all database I have tested whichDialect.supportsExpectedLobUsagePattern()
also support the ability to materialize a LOB outside the owning transaction...- Overrides:
supportsUnboundedLobLocatorMaterialization
in classDialect
- Returns:
- True if unbounded materialization is supported; false otherwise.
-
buildIdentifierHelper
public IdentifierHelper buildIdentifierHelper(IdentifierHelperBuilder builder, java.sql.DatabaseMetaData dbMetaData) throws java.sql.SQLException
Deprecated.Description copied from class:Dialect
Build the IdentifierHelper indicated by this Dialect for handling identifier conversions. Returningnull
is allowed and indicates that Hibernate should fallback to building a "standard" helper. In the fallback path, any changes made to the IdentifierHelperBuilder during this call will still be incorporated into the built IdentifierHelper. The incoming builder will have the following set:IdentifierHelperBuilder.isGloballyQuoteIdentifiers()
IdentifierHelperBuilder.getUnquotedCaseStrategy()
- initialized to UPPERIdentifierHelperBuilder.getQuotedCaseStrategy()
- initialized to MIXED
- Call
IdentifierHelperBuilder.applyIdentifierCasing(DatabaseMetaData)
- Call
IdentifierHelperBuilder.applyReservedWords(DatabaseMetaData)
- Applies
AnsiSqlKeywords.sql2003()
as reserved words - Applies the {#link #sqlKeywords} collected here as reserved words
- Applies the Dialect's NameQualifierSupport, if it defines one
- Overrides:
buildIdentifierHelper
in classDialect
- Parameters:
builder
- A semi-configured IdentifierHelper builder.dbMetaData
- Access to the metadata returned from the driver if needed and if available. WARNING: may benull
- Returns:
- The IdentifierHelper instance to use, or
null
to indicate Hibernate should use its fallback path - Throws:
java.sql.SQLException
- Accessing the DatabaseMetaData can throw it. Just re-throw and Hibernate will handle.- See Also:
Dialect.getNameQualifierSupport()
-
registerDerbyKeywords
protected void registerDerbyKeywords()
Deprecated.
-
getDefaultMultiTableBulkIdStrategy
public MultiTableBulkIdStrategy getDefaultMultiTableBulkIdStrategy()
Deprecated.From Derby docs:
The DECLARE GLOBAL TEMPORARY TABLE statement defines a temporary table for the current connection.
DB2Dialect
returns aGlobalTemporaryTableBulkIdStrategy
that will make temporary tables created at startup and hence unavailable for subsequent connections.
see HHH-10238.- Overrides:
getDefaultMultiTableBulkIdStrategy
in classDB2Dialect
-
-