Top Description Fields Constructors Methods
org.hibernate.dialect

public Class Cache71Dialect

extends Dialect
Class Inheritance
Imports
java.sql.CallableStatement, .ResultSet, .SQLException, .Types, org.hibernate.LockMode, org.hibernate.cfg.Environment, org.hibernate.dialect.function.ConditionalParenthesisFunction, .ConvertFunction, .NoArgSQLFunction, .NvlFunction, .SQLFunctionTemplate, .StandardJDBCEscapeFunction, .StandardSQLFunction, .VarArgsSQLFunction, org.hibernate.dialect.identity.Chache71IdentityColumnSupport, .IdentityColumnSupport, org.hibernate.dialect.lock.LockingStrategy, .OptimisticForceIncrementLockingStrategy, .OptimisticLockingStrategy, .PessimisticForceIncrementLockingStrategy, .PessimisticReadUpdateLockingStrategy, .PessimisticWriteUpdateLockingStrategy, .SelectLockingStrategy, .UpdateLockingStrategy, org.hibernate.dialect.pagination.LimitHandler, .TopLimitHandler, org.hibernate.exception.internal.CacheSQLExceptionConversionDelegate, org.hibernate.exception.spi.SQLExceptionConversionDelegate, .TemplatedViolatedConstraintNameExtracter, .ViolatedConstraintNameExtracter, org.hibernate.hql.spi.id.IdTableSupportStandardImpl, .MultiTableBulkIdStrategy, org.hibernate.hql.spi.id.global.GlobalTemporaryTableBulkIdStrategy, org.hibernate.hql.spi.id.local.AfterUseAction, org.hibernate.persister.entity.Lockable, org.hibernate.sql.CacheJoinFragment, .JoinFragment, org.hibernate.type.StandardBasicTypes

Caché 2007.1 dialect. This class is required in order to use Hibernate with InterSystems Caché SQL. Compatible with Caché 2007.1.

PREREQUISITES

These setup instructions assume that both Caché and Hibernate are installed and operational.

HIBERNATE DIRECTORIES AND FILES

JBoss distributes the InterSystems Cache' dialect for Hibernate 3.2.1 For earlier versions of Hibernate please contact InterSystems Worldwide Response Center (WRC) for the appropriate source files.

CACHÉ DOCUMENTATION

Documentation for Caché is available online when Caché is running. It can also be obtained from the InterSystems website. The book, "Object-oriented Application Development Using the Caché Post-relational Database: is also available from Springer-Verlag.

HIBERNATE DOCUMENTATION

Hibernate comes with extensive electronic documentation. In addition, several books on Hibernate are available from Manning Publications Co. Three available titles are "Hibernate Quickly", "Hibernate in Action", and "Java Persistence with Hibernate".

TO SET UP HIBERNATE FOR USE WITH CACHÉ

The following steps assume that the directory where Caché was installed is C:\CacheSys. This is the default installation directory for Caché. The default installation directory for Hibernate is assumed to be C:\Hibernate.

If either product is installed in a different location, the pathnames that follow should be modified appropriately.

Caché version 2007.1 and above is recommended for use with Hibernate. The next step depends on the location of your CacheDB.jar depending on your version of Caché.

  1. Copy C:\CacheSys\dev\java\lib\JDK15\CacheDB.jar to C:\Hibernate\lib\CacheDB.jar.
  2. Insert the following files into your Java classpath:

    • All jar files in the directory C:\Hibernate\lib
    • The directory (or directories) where hibernate.properties and/or hibernate.cfg.xml are kept.
  3. In the file, hibernate.properties (or hibernate.cfg.xml), specify the Caché dialect and the Caché version URL settings.

For example, in Hibernate 3.2, typical entries in hibernate.properties would have the following "name=value" pairs:

Property Name Property Value
hibernate.dialect org.hibernate.dialect.Cache71Dialect
hibernate.connection.driver_class com.intersys.jdbc.CacheDriver
hibernate.connection.username (see note 1)
hibernate.connection.password (see note 1)
hibernate.connection.url jdbc:Cache://127.0.0.1:1972/USER

Note

Please contact your administrator for the userid and password you should use when attempting access via JDBC. By default, these are chosen to be "_SYSTEM" and "SYS" respectively as noted in the SQL standard.

CACHÉ VERSION URL

This is the standard URL for the JDBC driver. For a JDBC driver on the machine hosting Caché, use the IP "loopback" address, 127.0.0.1. For 1972, the default port, specify the super server port of your Caché instance. For USER, substitute the NAMESPACE which contains your Caché database data.

CACHÉ DIALECTS

Choices for Dialect are:

  1. org.hibernate.dialect.Cache71Dialect (requires Caché 2007.1 or above)

SUPPORT FOR IDENTITY COLUMNS

Caché 2007.1 or later supports identity columns. For Hibernate to use identity columns, specify "native" as the generator.

SEQUENCE DIALECTS SUPPORT SEQUENCES

To use Hibernate sequence support with Caché in a namespace, you must FIRST load the following file into that namespace:

    etc\CacheSequences.xml
For example, at the COS terminal prompt in the namespace, run the following command:

d LoadFile^%apiOBJ("c:\hibernate\etc\CacheSequences.xml","ck")

In your Hibernate mapping you can specify sequence use.

For example, the following shows the use of a sequence generator in a Hibernate mapping:

    <id name="id" column="uid" type="long" unsaved-value="null">
        <generator class="sequence"/>
    </id>

Some versions of Hibernate under some circumstances call getSelectSequenceNextValString() in the dialect. If this happens you will receive the error message: new MappingException( "Dialect does not support sequences" ).

HIBERNATE FILES ASSOCIATED WITH CACHÉ DIALECT

The following files are associated with Caché dialect:

  1. src\org\hibernate\dialect\Cache71Dialect.java
  2. src\org\hibernate\dialect\function\ConditionalParenthesisFunction.java
  3. src\org\hibernate\dialect\function\ConvertFunction.java
  4. src\org\hibernate\exception\CacheSQLStateConverter.java
  5. src\org\hibernate\sql\CacheJoinFragment.java
Cache71Dialect ships with Hibernate 3.2. All other dialects are distributed by InterSystems and subclass Cache71Dialect.
Author
Jonathan Levinson

Field Summary

Modifier and TypeField and Description
public static final ViolatedConstraintNameExtracter
EXTRACTER

Hides org.hibernate.dialect.Dialect.EXTRACTER.

The Cache ViolatedConstraintNameExtracter.
private LimitHandler
Inherited from org.hibernate.dialect.Dialect:
CLOSED_QUOTEDEFAULT_BATCH_SIZELEGACY_LOB_MERGE_STRATEGYNEW_LOCATOR_LOB_MERGE_STRATEGYNO_BATCHQUOTESTANDARD_DEFAULT_BATCH_LOAD_SIZING_STRATEGYSTREAM_XFER_LOB_MERGE_STRATEGYTWO_SINGLE_QUOTES_REPLACEMENT

Constructor Summary

AccessConstructor and Description
public
Cache71Dialect()

Creates new Cache71Dialect instance.

Method Summary

Modifier and TypeMethod and Description
public boolean
public boolean
bindLimitParametersFirst()

Overrides org.hibernate.dialect.Dialect.bindLimitParametersFirst.

Does the LIMIT clause come at the start of the SELECT statement, rather than at the end?
public SQLExceptionConversionDelegate
buildSQLExceptionConversionDelegate()

Overrides org.hibernate.dialect.Dialect.buildSQLExceptionConversionDelegate.

Build an instance of a SQLExceptionConversionDelegate for interpreting dialect-specific error or SQLState codes.
protected final void
public JoinFragment
createOuterJoinFragment()

Overrides org.hibernate.dialect.Dialect.createOuterJoinFragment.

Create a JoinFragment strategy responsible for handling this dialect's variations in how joins are handled.
public boolean
dropConstraints()

Overrides org.hibernate.dialect.Dialect.dropConstraints.

Do we need to drop constraints before dropping tables in this dialect?
public String
getAddColumnString()

Overrides org.hibernate.dialect.Dialect.getAddColumnString.

The syntax used to add a column to a table (optional).
public String
getAddForeignKeyConstraintString(String
The FK constraint name.
constraintName
,
String[]
The names of the columns comprising the FK
foreignKey
,
String
The table referenced by the FK
referencedTable
,
String[]
The explicit columns in the referencedTable referenced by this FK.
primaryKey
,
boolean
if false, constraint should be explicit about which column names the constraint refers to
referencesPrimaryKey
)

Overrides org.hibernate.dialect.Dialect.getAddForeignKeyConstraintString.

The syntax used to add a foreign key constraint to a table.
public String
getCascadeConstraintsString()

Overrides org.hibernate.dialect.Dialect.getCascadeConstraintsString.

Completely optional cascading drop clause
public MultiTableBulkIdStrategy
public IdentityColumnSupport
public LimitHandler
getLimitHandler()

Overrides org.hibernate.dialect.Dialect.getLimitHandler.

Returns the delegate managing LIMIT clause.
public String
getLimitString(String
The query to which to apply the limit.
sql
,
boolean
Is the query requesting an offset?
hasOffset
)

Overrides org.hibernate.dialect.Dialect.getLimitString.

Apply a limit clause to the query.
public LockingStrategy
getLockingStrategy(Lockable
The persister for the entity to be locked.
lockable
,
LockMode
The type of lock to be acquired.
lockMode
)

Overrides org.hibernate.dialect.Dialect.getLockingStrategy.

Get a strategy instance which knows how to acquire a database-level lock of the specified mode for this dialect.
public String
getLowercaseFunction()

Overrides org.hibernate.dialect.Dialect.getLowercaseFunction.

The name of the SQL function that transforms a string to lowercase
public String
getNativeIdentifierGeneratorStrategy()

Overrides org.hibernate.dialect.Dialect.getNativeIdentifierGeneratorStrategy.

Resolves the native generation strategy associated to this dialect.
public String
getNoColumnsInsertString()

Overrides org.hibernate.dialect.Dialect.getNoColumnsInsertString.

The fragment used to insert a row without specifying any column values.
public String
getNullColumnString()

Overrides org.hibernate.dialect.Dialect.getNullColumnString.

The keyword used to specify a nullable column.
public ResultSet
getResultSet(CallableStatement
The callable statement.
ps
)

Overrides org.hibernate.dialect.Dialect.getResultSet.

Given a callable statement previously processed by registerResultSetOutParameter, extract the ResultSet from the OUT parameter.
public ViolatedConstraintNameExtracter
public boolean
hasAlterTable()

Overrides org.hibernate.dialect.Dialect.hasAlterTable.

Does this dialect support the ALTER TABLE syntax?
public boolean
hasSelfReferentialForeignKeyBug()

Overrides org.hibernate.dialect.Dialect.hasSelfReferentialForeignKeyBug.

Does the database/driver have bug in deleting rows that refer to other rows being deleted in the same query?
public boolean
qualifyIndexName()

Overrides org.hibernate.dialect.Dialect.qualifyIndexName.

Do we need to qualify index names with the schema name?
protected final void
public int
registerResultSetOutParameter(CallableStatement
The callable statement.
statement
,
int
The bind position at which to register the output param.
col
)

Overrides org.hibernate.dialect.Dialect.registerResultSetOutParameter.

Registers a parameter (either OUT, or the new REF_CURSOR param type available in Java 8) capable of returning ResultSet *by position*.
public boolean
supportsCascadeDelete()

Overrides org.hibernate.dialect.Dialect.supportsCascadeDelete.

Does this dialect support cascaded delete on foreign key definitions?
public boolean

Returns:

false (Cache does not support check constraints)
supportsCheck
()

Does this dialect support check constraints?

public boolean
supportsEmptyInList()

Overrides org.hibernate.dialect.Dialect.supportsEmptyInList.

Does this dialect support empty IN lists?
public boolean
supportsLimit()

Overrides org.hibernate.dialect.Dialect.supportsLimit.

Does this dialect support some form of limiting query results via a SQL clause?
public boolean
supportsLimitOffset()

Overrides org.hibernate.dialect.Dialect.supportsLimitOffset.

Does this dialect's LIMIT support (if any) additionally support specifying an offset?
public boolean
supportsOuterJoinForUpdate()

Overrides org.hibernate.dialect.Dialect.supportsOuterJoinForUpdate.

Does this dialect support FOR UPDATE in conjunction with outer joined rows?
public boolean
supportsResultSetPositionQueryMethodsOnForwardOnlyCursor()

Overrides org.hibernate.dialect.Dialect.supportsResultSetPositionQueryMethodsOnForwardOnlyCursor.

Does this dialect support asking the result set its positioning information on forward only cursors.
public boolean
supportsSequences()

Overrides org.hibernate.dialect.Dialect.supportsSequences.

Does this dialect support sequences?
public boolean
supportsVariableLimit()

Overrides org.hibernate.dialect.Dialect.supportsVariableLimit.

Does this dialect support bind variables (i.e., prepared statement parameters) for its limit/offset?
public boolean
useMaxForLimit()

Overrides org.hibernate.dialect.Dialect.useMaxForLimit.

Does the LIMIT clause take a "maximum" row number instead of a total number of returned rows?
Inherited from org.hibernate.dialect.Dialect:
addSqlHintOrCommentappendLockHintappendLockHintapplyLocksToSqlaugmentPhysicalTableTypesaugmentRecognizedTableTypesbindLimitParametersInReverseOrderbuildIdentifierHelperbuildSQLExceptionConvertercanCreateCatalogcanCreateSchemacastcastcastcloseQuotecontributeTypesconvertToFirstRowValuecreateCaseFragmentdefaultScrollModedoesReadCommittedCauseWritersToBlockReadersdoesRepeatableReadCauseReadersToBlockWritersequivalentTypesescapeCommentescapeLiteralforceLimitUsageforceLobAsLastValueforUpdateOfColumnsgetAddColumnSuffixStringgetAddForeignKeyConstraintStringgetAddPrimaryKeyConstraintStringgetAddUniqueConstraintStringgetAlterTableStringgetAuxiliaryDatabaseObjectExportergetCallableStatementSupportgetCaseInsensitiveLikegetCastTypeNamegetColumnAliasExtractorgetColumnCommentgetCreateCatalogCommandgetCreateMultisetTableStringgetCreateSchemaCommandgetCreateSequenceStringgetCreateSequenceStringgetCreateSequenceStringsgetCreateSequenceStringsgetCreateTableStringgetCreateTemporaryTableColumnAnnotationgetCrossJoinSeparatorgetCurrentSchemaCommandgetCurrentTimestampSelectStringgetCurrentTimestampSQLFunctionNamegetDefaultBatchLoadSizingStrategygetDefaultPropertiesgetDialectgetDialectgetDropCatalogCommandgetDropForeignKeyStringgetDropSchemaCommandgetDropSequenceStringgetDropSequenceStringsgetDropTableStringgetForeignKeyExportergetForUpdateNowaitStringgetForUpdateNowaitStringgetForUpdateSkipLockedStringgetForUpdateSkipLockedStringgetForUpdateStringgetForUpdateStringgetForUpdateStringgetForUpdateStringgetForUpdateStringgetFunctionsgetHibernateTypeNamegetHibernateTypeNamegetIndexExportergetInExpressionCountLimitgetKeywordsgetLimitStringgetLobMergeStrategygetMaxAliasLengthgetNameQualifierSupportgetNativeIdentifierGeneratorClassgetNotExpressiongetQueryHintStringgetQueryHintStringgetQuerySequencesStringgetReadLockStringgetReadLockStringgetResultSetgetResultSetgetSchemaNameResolvergetSelectClauseNullStringgetSelectGUIDStringgetSelectSequenceNextValStringgetSequenceExportergetSequenceInformationExtractorgetSequenceNextValStringgetSqlTypeDescriptorOverridegetTableCommentgetTableExportergetTableTypeStringgetTypeNamegetTypeNamegetUniqueDelegategetUniqueKeyExportergetWriteLockStringgetWriteLockStringinlineLiteralisCurrentTimestampSelectStringCallableisJdbcLogWarningsEnabledByDefaultisLegacyLimitHandlerBehaviorEnabledisLockTimeoutParameterizedisTypeNameRegisteredopenQuoteprependCommentquoteregisterColumnTyperegisterColumnTyperegisterFunctionregisterHibernateTyperegisterHibernateTyperegisterKeywordregisterResultSetOutParameterremapSqlTypeDescriptorrenderOrderByElementreplaceResultVariableInOrderByClauseWithPositionrequiresCastingOfParametersInSelectClauserequiresParensForTupleDistinctCountssupportsBindAsCallableArgumentsupportsCaseInsensitiveLikesupportsCircularCascadeDeleteConstraintssupportsColumnChecksupportsCommentOnsupportsCurrentTimestampSelectionsupportsExistsInSelectsupportsExpectedLobUsagePatternsupportsIfExistsAfterAlterTablesupportsIfExistsAfterConstraintNamesupportsIfExistsAfterTableNamesupportsIfExistsBeforeConstraintNamesupportsIfExistsBeforeTableNamesupportsJdbcConnectionLobCreationsupportsLobValueChangePropogationsupportsLockTimeoutssupportsNamedParameterssupportsNationalizedTypessupportsNoColumnsInsertsupportsNonQueryWithCTEsupportsNotNullUniquesupportsNoWaitsupportsParametersInInsertSelectsupportsPartitionBysupportsPooledSequencessupportsRowValueConstructorSyntaxsupportsRowValueConstructorSyntaxInInListsupportsRowValueConstructorSyntaxInSetsupportsSelectAliasInGroupByClausesupportsSkipLockedsupportsSubqueryOnMutatingTablesupportsSubselectAsInPredicateLHSsupportsTableChecksupportsTupleCountssupportsTupleDistinctCountssupportsTuplesInSubqueriessupportsUnboundedLobLocatorMaterializationsupportsUnionAllsupportsUniquesupportsUniqueConstraintInCreateAlterTablesupportsValuesListtoBooleanValueStringtoStringtransformSelectStringuseFollowOnLockinguseFollowOnLockinguseInputStreamToInsertBlob

Field Detail

EXTRACTERback to summary
public static final ViolatedConstraintNameExtracter EXTRACTER

Hides org.hibernate.dialect.Dialect.EXTRACTER.

The Cache ViolatedConstraintNameExtracter.

limitHandlerback to summary
private LimitHandler limitHandler

Constructor Detail

Cache71Dialectback to summary
public Cache71Dialect()

Creates new Cache71Dialect instance. Sets up the JDBC / Caché type mappings.

Method Detail

areStringComparisonsCaseInsensitiveback to summary
public boolean areStringComparisonsCaseInsensitive()

Overrides org.hibernate.dialect.Dialect.areStringComparisonsCaseInsensitive.

Doc from org.hibernate.dialect.Dialect.areStringComparisonsCaseInsensitive.

Are string comparisons implicitly case insensitive.

In other words, does [where 'XYZ' = 'xyz'] resolve to true?

Returns:boolean

True if comparisons are case insensitive.

Annotations
@Override
bindLimitParametersFirstback to summary
public boolean bindLimitParametersFirst()

Overrides org.hibernate.dialect.Dialect.bindLimitParametersFirst.

Doc from org.hibernate.dialect.Dialect.bindLimitParametersFirst.

Does the LIMIT clause come at the start of the SELECT statement, rather than at the end?

Returns:boolean

true if limit parameters should come before other parameters

Annotations
@Override
@SuppressWarnings:deprecation
buildSQLExceptionConversionDelegateback to summary
public SQLExceptionConversionDelegate buildSQLExceptionConversionDelegate()

Overrides org.hibernate.dialect.Dialect.buildSQLExceptionConversionDelegate.

Doc from org.hibernate.dialect.Dialect.buildSQLExceptionConversionDelegate.

Build an instance of a SQLExceptionConversionDelegate for interpreting dialect-specific error or SQLState codes.

When buildSQLExceptionConverter returns null, the default SQLExceptionConverter is used to interpret SQLState and error codes. If this method is overridden to return a non-null value, the default SQLExceptionConverter will use the returned SQLExceptionConversionDelegate in addition to the following standard delegates:

  1. a "static" delegate based on the JDBC 4 defined SQLException hierarchy;
  2. a delegate that interprets SQLState codes for either X/Open or SQL-2003 codes, depending on java.sql.DatabaseMetaData#getSQLStateType

It is strongly recommended that specific Dialect implementations override this method, since interpretation of a SQL error is much more accurate when based on the vendor-specific ErrorCode rather than the SQLState.

Specific Dialects may override to return whatever is most appropriate for that vendor.

Returns:SQLExceptionConversionDelegate

The SQLExceptionConversionDelegate for this dialect

Annotations
@Override
commonRegistrationback to summary
protected final void commonRegistration()
createOuterJoinFragmentback to summary
public JoinFragment createOuterJoinFragment()

Overrides org.hibernate.dialect.Dialect.createOuterJoinFragment.

Doc from org.hibernate.dialect.Dialect.createOuterJoinFragment.

Create a JoinFragment strategy responsible for handling this dialect's variations in how joins are handled.

Returns:JoinFragment

This dialect's JoinFragment strategy.

Annotations
@Override
dropConstraintsback to summary
public boolean dropConstraints()

Overrides org.hibernate.dialect.Dialect.dropConstraints.

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

Do we need to drop constraints before dropping tables in this dialect?

Returns:boolean

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

Annotations
@Override
getAddColumnStringback to summary
public String getAddColumnString()

Overrides org.hibernate.dialect.Dialect.getAddColumnString.

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

The syntax used to add a column to a table (optional).

Returns:String

The "add column" fragment.

Annotations
@Override
getAddForeignKeyConstraintStringback to summary
public String getAddForeignKeyConstraintString(String constraintName, String[] foreignKey, String referencedTable, String[] primaryKey, boolean referencesPrimaryKey)

Overrides org.hibernate.dialect.Dialect.getAddForeignKeyConstraintString.

Doc from org.hibernate.dialect.Dialect.getAddForeignKeyConstraintString.

The syntax used to add a foreign key constraint to a table.

Parameters
constraintName:String

The FK constraint name.

foreignKey:String[]

The names of the columns comprising the FK

referencedTable:String

The table referenced by the FK

primaryKey:String[]

The explicit columns in the referencedTable referenced by this FK.

referencesPrimaryKey:boolean

if false, constraint should be explicit about which column names the constraint refers to

Returns:String

the "add FK" fragment

Annotations
@Override
@SuppressWarnings:StringBufferReplaceableByString
getCascadeConstraintsStringback to summary
public String getCascadeConstraintsString()

Overrides org.hibernate.dialect.Dialect.getCascadeConstraintsString.

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

Completely optional cascading drop clause

Returns:String

String

Annotations
@Override
getDefaultMultiTableBulkIdStrategyback to summary
public MultiTableBulkIdStrategy getDefaultMultiTableBulkIdStrategy()

Overrides org.hibernate.dialect.Dialect.getDefaultMultiTableBulkIdStrategy.

Annotations
@Override
getIdentityColumnSupportback to summary
public IdentityColumnSupport getIdentityColumnSupport()

Overrides org.hibernate.dialect.Dialect.getIdentityColumnSupport.

Doc from org.hibernate.dialect.Dialect.getIdentityColumnSupport.

Get the appropriate IdentityColumnSupport

Returns:IdentityColumnSupport

the IdentityColumnSupport

Annotations
@Override
getLimitHandlerback to summary
public LimitHandler getLimitHandler()

Overrides org.hibernate.dialect.Dialect.getLimitHandler.

Doc from org.hibernate.dialect.Dialect.getLimitHandler.

Returns the delegate managing LIMIT clause.

Returns:LimitHandler

LIMIT clause delegate.

Annotations
@Override
getLimitStringback to summary
public String getLimitString(String sql, boolean hasOffset)

Overrides org.hibernate.dialect.Dialect.getLimitString.

Doc from org.hibernate.dialect.Dialect.getLimitString.

Apply a limit clause to the query.

Typically dialects utilize variable limit clauses when they support limits. Thus, when building the select command we do not actually need to know the limit or the offset since we will just be using placeholders.

Here we do still pass along whether or not an offset was specified so that dialects not supporting offsets can generate proper exceptions. In general, dialects will override one or the other of this method and getLimitString(String, int, int).

Parameters
sql:String

The query to which to apply the limit.

hasOffset:boolean

Is the query requesting an offset?

Returns:String

the modified SQL

Annotations
@Override
@SuppressWarnings:deprecation
getLockingStrategyback to summary
public LockingStrategy getLockingStrategy(Lockable lockable, LockMode lockMode)

Overrides org.hibernate.dialect.Dialect.getLockingStrategy.

Doc from org.hibernate.dialect.Dialect.getLockingStrategy.

Get a strategy instance which knows how to acquire a database-level lock of the specified mode for this dialect.

Parameters
lockable:Lockable

The persister for the entity to be locked.

lockMode:LockMode

The type of lock to be acquired.

Returns:LockingStrategy

The appropriate locking strategy.

Annotations
@Override
getLowercaseFunctionback to summary
public String getLowercaseFunction()

Overrides org.hibernate.dialect.Dialect.getLowercaseFunction.

Doc from org.hibernate.dialect.Dialect.getLowercaseFunction.

The name of the SQL function that transforms a string to lowercase

Returns:String

The dialect-specific lowercase function.

Annotations
@Override
getNativeIdentifierGeneratorStrategyback to summary
public String getNativeIdentifierGeneratorStrategy()

Overrides org.hibernate.dialect.Dialect.getNativeIdentifierGeneratorStrategy.

Doc from org.hibernate.dialect.Dialect.getNativeIdentifierGeneratorStrategy.

Resolves the native generation strategy associated to this dialect.

Comes into play whenever the user specifies the native generator.

Returns:String

The native generator strategy.

Annotations
@Override
getNoColumnsInsertStringback to summary
public String getNoColumnsInsertString()

Overrides org.hibernate.dialect.Dialect.getNoColumnsInsertString.

Doc from org.hibernate.dialect.Dialect.getNoColumnsInsertString.

The fragment used to insert a row without specifying any column values. This is not possible on some databases.

Returns:String

The appropriate empty values clause.

Annotations
@Override
getNullColumnStringback to summary
public String getNullColumnString()

Overrides org.hibernate.dialect.Dialect.getNullColumnString.

Doc from org.hibernate.dialect.Dialect.getNullColumnString.

The keyword used to specify a nullable column.

Returns:String

String

Annotations
@Override
getResultSetback to summary
public ResultSet getResultSet(CallableStatement ps) throws SQLException

Overrides org.hibernate.dialect.Dialect.getResultSet.

Doc from org.hibernate.dialect.Dialect.getResultSet.

Given a callable statement previously processed by registerResultSetOutParameter, extract the ResultSet from the OUT parameter.

Parameters
ps:CallableStatement

The callable statement.

Returns:ResultSet

The extracted result set.

Annotations
@Override
Exceptions
SQLException:
Indicates problems extracting the result set.
getViolatedConstraintNameExtracterback to summary
public ViolatedConstraintNameExtracter getViolatedConstraintNameExtracter()

Overrides org.hibernate.dialect.Dialect.getViolatedConstraintNameExtracter.

Implements org.hibernate.exception.spi.ConversionContext.getViolatedConstraintNameExtracter.

Annotations
@Override
hasAlterTableback to summary
public boolean hasAlterTable()

Overrides org.hibernate.dialect.Dialect.hasAlterTable.

Doc from org.hibernate.dialect.Dialect.hasAlterTable.

Does this dialect support the ALTER TABLE syntax?

Returns:boolean

True if we support altering of tables; false otherwise.

Annotations
@Override
hasSelfReferentialForeignKeyBugback to summary
public boolean hasSelfReferentialForeignKeyBug()

Overrides org.hibernate.dialect.Dialect.hasSelfReferentialForeignKeyBug.

Doc from org.hibernate.dialect.Dialect.hasSelfReferentialForeignKeyBug.

Does the database/driver have bug in deleting rows that refer to other rows being deleted in the same query?

Returns:boolean

true if the database/driver has this bug

Annotations
@Override
qualifyIndexNameback to summary
public boolean qualifyIndexName()

Overrides org.hibernate.dialect.Dialect.qualifyIndexName.

Doc from org.hibernate.dialect.Dialect.qualifyIndexName.

Do we need to qualify index names with the schema name?

Returns:boolean

boolean

Annotations
@Override
register71Functionsback to summary
protected final void register71Functions()
registerResultSetOutParameterback to summary
public int registerResultSetOutParameter(CallableStatement statement, int col) throws SQLException

Overrides org.hibernate.dialect.Dialect.registerResultSetOutParameter.

Doc from org.hibernate.dialect.Dialect.registerResultSetOutParameter.

Registers a parameter (either OUT, or the new REF_CURSOR param type available in Java 8) capable of returning ResultSet *by position*. Pre-Java 8, registering such ResultSet-returning parameters varied greatly across database and drivers; hence its inclusion as part of the Dialect contract.

Parameters
statement:CallableStatement

The callable statement.

col:int

The bind position at which to register the output param.

Returns:int

The number of (contiguous) bind positions used.

Annotations
@Override
Exceptions
SQLException:
Indicates problems registering the param.
supportsCascadeDeleteback to summary
public boolean supportsCascadeDelete()

Overrides org.hibernate.dialect.Dialect.supportsCascadeDelete.

Doc from org.hibernate.dialect.Dialect.supportsCascadeDelete.

Does this dialect support cascaded delete on foreign key definitions?

Returns:boolean

true indicates that the dialect does support cascaded delete on foreign keys.

Annotations
@Override
supportsCheckback to summary
public boolean supportsCheck()

Does this dialect support check constraints?

Returns:boolean

false (Cache does not support check constraints)

Annotations
@SuppressWarnings:UnusedDeclaration
supportsEmptyInListback to summary
public boolean supportsEmptyInList()

Overrides org.hibernate.dialect.Dialect.supportsEmptyInList.

Doc from org.hibernate.dialect.Dialect.supportsEmptyInList.

Does this dialect support empty IN lists?

For example, is [where XYZ in ()] a supported construct?

Returns:boolean

True if empty in lists are supported; false otherwise.

Annotations
@Override
supportsLimitback to summary
public boolean supportsLimit()

Overrides org.hibernate.dialect.Dialect.supportsLimit.

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

Does this dialect support some form of limiting query results via a SQL clause?

Returns:boolean

True if this dialect supports some form of LIMIT.

Annotations
@Override
@SuppressWarnings:deprecation
supportsLimitOffsetback to summary
public boolean supportsLimitOffset()

Overrides org.hibernate.dialect.Dialect.supportsLimitOffset.

Doc from org.hibernate.dialect.Dialect.supportsLimitOffset.

Does this dialect's LIMIT support (if any) additionally support specifying an offset?

Returns:boolean

True if the dialect supports an offset within the limit support.

Annotations
@Override
@SuppressWarnings:deprecation
supportsOuterJoinForUpdateback to summary
public boolean supportsOuterJoinForUpdate()

Overrides org.hibernate.dialect.Dialect.supportsOuterJoinForUpdate.

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

Does this dialect support FOR UPDATE in conjunction with outer joined rows?

Returns:boolean

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

Annotations
@Override
supportsResultSetPositionQueryMethodsOnForwardOnlyCursorback to summary
public boolean supportsResultSetPositionQueryMethodsOnForwardOnlyCursor()

Overrides org.hibernate.dialect.Dialect.supportsResultSetPositionQueryMethodsOnForwardOnlyCursor.

Doc from org.hibernate.dialect.Dialect.supportsResultSetPositionQueryMethodsOnForwardOnlyCursor.

Does this dialect support asking the result set its positioning information on forward only cursors. Specifically, in the case of scrolling fetches, Hibernate needs to use ResultSet#isAfterLast and ResultSet#isBeforeFirst. Certain drivers do not allow access to these methods for forward only cursors.

NOTE : this is highly driver dependent!

Returns:boolean

True if methods like ResultSet#isAfterLast and ResultSet#isBeforeFirst are supported for forward only cursors; false otherwise.

Annotations
@Override
supportsSequencesback to summary
public boolean supportsSequences()

Overrides org.hibernate.dialect.Dialect.supportsSequences.

Doc from org.hibernate.dialect.Dialect.supportsSequences.

Does this dialect support sequences?

Returns:boolean

True if sequences supported; false otherwise.

Annotations
@Override
supportsVariableLimitback to summary
public boolean supportsVariableLimit()

Overrides org.hibernate.dialect.Dialect.supportsVariableLimit.

Doc from org.hibernate.dialect.Dialect.supportsVariableLimit.

Does this dialect support bind variables (i.e., prepared statement parameters) for its limit/offset?

Returns:boolean

True if bind variables can be used; false otherwise.

Annotations
@Override
@SuppressWarnings:deprecation
useMaxForLimitback to summary
public boolean useMaxForLimit()

Overrides org.hibernate.dialect.Dialect.useMaxForLimit.

Doc from org.hibernate.dialect.Dialect.useMaxForLimit.

Does the LIMIT clause take a "maximum" row number instead of a total number of returned rows?

This is easiest understood via an example. Consider you have a table with 20 rows, but you only want to retrieve rows number 11 through 20. Generally, a limit with offset would say that the offset = 11 and the limit = 10 (we only want 10 rows at a time); this is specifying the total number of returned rows. Some dialects require that we instead specify offset = 11 and limit = 20, where 20 is the "last" row we want relative to offset (i.e. total number of rows = 20 - 11 = 9)

So essentially, is limit relative from offset? Or is limit absolute?

Returns:boolean

True if limit is relative from offset; false otherwise.

Annotations
@Override
@SuppressWarnings:deprecation