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, .MappingException, org.hibernate.cfg.Environment, org.hibernate.dialect.function.NoArgSQLFunction, .NvlFunction, .SQLFunctionTemplate, .StandardSQLFunction, .VarArgsSQLFunction, .StandardJDBCEscapeFunction, .ConvertFunction, .ConditionalParenthesisFunction, org.hibernate.dialect.lock.*, org.hibernate.exception.CacheSQLStateConverter, .SQLExceptionConverter, .TemplatedViolatedConstraintNameExtracter, .ViolatedConstraintNameExtracter, org.hibernate.id.IdentityGenerator, org.hibernate.persister.entity.Lockable, org.hibernate.sql.CacheJoinFragment, .JoinFragment, org.hibernate.type.StandardBasicTypes, org.hibernate.util.StringHelper

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

Compatible with Cach� 2007.1.

Caché and Hibernate

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 1
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
Inherited from org.hibernate.dialect.Dialect:
CLOSED_QUOTEDEFAULT_BATCH_SIZENO_BATCHQUOTE

Constructor Summary

AccessConstructor and Description
public
Cache71Dialect()

Creates new Cach�71Dialect 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 SQLExceptionConverter
buildSQLExceptionConverter()

Overrides org.hibernate.dialect.Dialect.buildSQLExceptionConverter.

Build an instance of the SQLExceptionConverter preferred by this dialect for converting SQLExceptions into Hibernate's JDBCException hierarchy.
protected final void
public JoinFragment
createOuterJoinFragment()

Overrides org.hibernate.dialect.Dialect.createOuterJoinFragment.

Create a org.hibernate.sql.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 boolean
dropTemporaryTableAfterUse()

Overrides org.hibernate.dialect.Dialect.dropTemporaryTableAfterUse.

Do we need to drop the temporary table after use?
public String
generateTemporaryTableName(String
The table name from which to base the temp table name.
baseTableName
)

Overrides org.hibernate.dialect.Dialect.generateTemporaryTableName.

Generate a temporary table name given the base table.
public String
getAddColumnString()

Overrides org.hibernate.dialect.Dialect.getAddColumnString.

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

Returns:

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 String
getCreateTemporaryTablePostfix()

Overrides org.hibernate.dialect.Dialect.getCreateTemporaryTablePostfix.

Get any fragments needing to be postfixed to the command for temporary table creation.
public String
public String
getIdentityColumnString()

Overrides org.hibernate.dialect.Dialect.getIdentityColumnString.

The syntax used during DDL to define a column as being an IDENTITY.
public String
getIdentitySelectString()

Overrides org.hibernate.dialect.Dialect.getIdentitySelectString.

Get the select command to use to retrieve the last generated IDENTITY value.
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 s 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 Class<T>
getNativeIdentifierGeneratorClass()

Overrides org.hibernate.dialect.Dialect.getNativeIdentifierGeneratorClass.

The class (which implements org.hibernate.id.IdentifierGenerator) which acts as this dialects native generation strategy.
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 java.sql.ResultSet from the OUT parameter.
public boolean
hasAlterTable()

Overrides org.hibernate.dialect.Dialect.hasAlterTable.

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

Overrides org.hibernate.dialect.Dialect.hasDataTypeInIdentityColumn.

Whether this dialect have an Identity clause added to the data type or a completely separate identity data type
public boolean
public Boolean
performTemporaryTableDDLInIsolation()

Overrides org.hibernate.dialect.Dialect.performTemporaryTableDDLInIsolation.

Does the dialect require that temporary table DDL statements occur in isolation from other statements?
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 OUT param.
col
)

Overrides org.hibernate.dialect.Dialect.registerResultSetOutParameter.

Registers an OUT parameter which will be returning a java.sql.ResultSet.
public boolean
public boolean
public boolean
supportsEmptyInList()

Overrides org.hibernate.dialect.Dialect.supportsEmptyInList.

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

Overrides org.hibernate.dialect.Dialect.supportsIdentityColumns.

Does this dialect support identity column key generation?
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
supportsTemporaryTables()

Overrides org.hibernate.dialect.Dialect.supportsTemporaryTables.

Does this dialect support temporary tables?
public boolean
supportsUnique()

Overrides org.hibernate.dialect.Dialect.supportsUnique.

Does this dialect support the UNIQUE column syntax?
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:
addTypeOverrideappendIdentitySelectToInsertappendLockHintapplyLocksToSqlbindLimitParametersInReverseOrdercloseQuoteconvertToFirstRowValuecreateCaseFragmentdoesReadCommittedCauseWritersToBlockReadersdoesRepeatableReadCauseReadersToBlockWritersforceLimitUsageforUpdateOfColumnsgetAddPrimaryKeyConstraintStringgetCastTypeNamegetColumnAliasExtractorgetColumnCommentgetCreateMultisetTableStringgetCreateSequenceStringgetCreateSequenceStringgetCreateSequenceStringsgetCreateSequenceStringsgetCreateTableStringgetCrossJoinSeparatorgetCurrentTimestampSelectStringgetCurrentTimestampSQLFunctionNamegetDefaultPropertiesgetDialectgetDialectgetDropForeignKeyStringgetDropSequenceStringgetDropSequenceStringsgetDropTemporaryTableStringgetForUpdateNowaitStringgetForUpdateNowaitStringgetForUpdateStringgetForUpdateStringgetForUpdateStringgetForUpdateStringgetForUpdateStringgetFunctionsgetHibernateTypeNamegetHibernateTypeNamegetIdentityColumnStringgetIdentityInsertStringgetIdentitySelectStringgetKeywordsgetLimitStringgetMaxAliasLengthgetQuerySequencesStringgetReadLockStringgetSelectClauseNullStringgetSelectGUIDStringgetSelectSequenceNextValStringgetSequenceNextValStringgetTableCommentgetTableTypeStringgetTypeNamegetTypeNamegetTypeOverridesgetViolatedConstraintNameExtractergetWriteLockStringisCurrentTimestampSelectStringCallableisLockTimeoutParameterizedopenQuotequoteregisterColumnTyperegisterColumnTyperegisterFunctionregisterHibernateTyperegisterHibernateTyperegisterKeywordreplaceResultVariableInOrderByClauseWithPositionrequiresCastingOfParametersInSelectClausesupportsBindAsCallableArgumentsupportsCircularCascadeDeleteConstraintssupportsColumnChecksupportsCommentOnsupportsCurrentTimestampSelectionsupportsExistsInSelectsupportsExpectedLobUsagePatternsupportsIfExistsAfterTableNamesupportsIfExistsBeforeTableNamesupportsInsertSelectIdentitysupportsLobValueChangePropogationsupportsLockTimeoutssupportsNotNullUniquesupportsParametersInInsertSelectsupportsPooledSequencessupportsRowValueConstructorSyntaxsupportsRowValueConstructorSyntaxInInListsupportsSubqueryOnMutatingTablesupportsSubselectAsInPredicateLHSsupportsTableChecksupportsTupleCountssupportsTupleDistinctCountssupportsUnboundedLobLocatorMaterializationsupportsUnionAllsupportsUniqueConstraintInCreateAlterTabletoBooleanValueStringtoStringtransformSelectStringuseInputStreamToInsertBlob

Field Detail

EXTRACTERback to summary
public static final ViolatedConstraintNameExtracter EXTRACTER

Hides org.hibernate.dialect.Dialect.EXTRACTER.

Constructor Detail

Cache71Dialectback to summary
public Cache71Dialect()

Creates new Cach�71Dialect 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.

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

buildSQLExceptionConverterback to summary
public SQLExceptionConverter buildSQLExceptionConverter()

Overrides org.hibernate.dialect.Dialect.buildSQLExceptionConverter.

Doc from org.hibernate.dialect.Dialect.buildSQLExceptionConverter.

Build an instance of the SQLExceptionConverter preferred by this dialect for converting SQLExceptions into Hibernate's JDBCException hierarchy. The default Dialect implementation simply returns a converter based on X/Open SQLState codes.

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 ErrorCode rather than the SQLState. Unfortunately, the ErrorCode is a vendor- specific approach.

Returns:SQLExceptionConverter

The Dialect's preferred SQLExceptionConverter.

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 org.hibernate.sql.JoinFragment strategy responsible for handling this dialect's variations in how joins are handled.

Returns:JoinFragment

This dialect's org.hibernate.sql.JoinFragment strategy.

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.

dropTemporaryTableAfterUseback to summary
public boolean dropTemporaryTableAfterUse()

Overrides org.hibernate.dialect.Dialect.dropTemporaryTableAfterUse.

Doc from org.hibernate.dialect.Dialect.dropTemporaryTableAfterUse.

Do we need to drop the temporary table after use?

Returns:boolean

True if the table should be dropped.

generateTemporaryTableNameback to summary
public String generateTemporaryTableName(String baseTableName)

Overrides org.hibernate.dialect.Dialect.generateTemporaryTableName.

Doc from org.hibernate.dialect.Dialect.generateTemporaryTableName.

Generate a temporary table name given the base table.

Parameters
baseTableName:String

The table name from which to base the temp table name.

Returns:String

The generated temp table name.

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.

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

Overrides org.hibernate.dialect.Dialect.getAddForeignKeyConstraintString.

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

Parameters
constraintName:String

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

The FK constraint name.

foreignKey:String[]

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

The names of the columns comprising the FK

referencedTable:String

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

The table referenced by the FK

primaryKey:String[]

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

The explicit columns in the referencedTable referenced by this FK.

referencesPrimaryKey:boolean

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

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

Returns:String

String

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

getCreateTemporaryTablePostfixback to summary
public String getCreateTemporaryTablePostfix()

Overrides org.hibernate.dialect.Dialect.getCreateTemporaryTablePostfix.

Doc from org.hibernate.dialect.Dialect.getCreateTemporaryTablePostfix.

Get any fragments needing to be postfixed to the command for temporary table creation.

Returns:String

Any required postfix.

getCreateTemporaryTableStringback to summary
public String getCreateTemporaryTableString()

Overrides org.hibernate.dialect.Dialect.getCreateTemporaryTableString.

Doc from org.hibernate.dialect.Dialect.getCreateTemporaryTableString.

Command used to create a temporary table.

Returns:String

The command used to create a temporary table.

getIdentityColumnStringback to summary
public String getIdentityColumnString() throws MappingException

Overrides org.hibernate.dialect.Dialect.getIdentityColumnString.

Doc from org.hibernate.dialect.Dialect.getIdentityColumnString.

The syntax used during DDL to define a column as being an IDENTITY.

Returns:String

The appropriate DDL fragment.

Exceptions
MappingException:
If IDENTITY generation is not supported.
getIdentitySelectStringback to summary
public String getIdentitySelectString()

Overrides org.hibernate.dialect.Dialect.getIdentitySelectString.

Doc from org.hibernate.dialect.Dialect.getIdentitySelectString.

Get the select command to use to retrieve the last generated IDENTITY value.

Returns:String

The appropriate select command

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

Overrides org.hibernate.dialect.Dialect.getLimitString.

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

Apply s 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 offest 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

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.

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.

getNativeIdentifierGeneratorClassback to summary
public Class<T> getNativeIdentifierGeneratorClass()

Overrides org.hibernate.dialect.Dialect.getNativeIdentifierGeneratorClass.

Doc from org.hibernate.dialect.Dialect.getNativeIdentifierGeneratorClass.

The class (which implements org.hibernate.id.IdentifierGenerator) which acts as this dialects native generation strategy.

Comes into play whenever the user specifies the native generator.

Returns:Class<T>

The native generator class.

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.

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

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 java.sql.ResultSet from the OUT parameter.

Parameters
ps:CallableStatement

The callable statement.

Returns:ResultSet

The extracted result set.

Exceptions
SQLException:
Indicates problems extracting the result set.
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.

hasDataTypeInIdentityColumnback to summary
public boolean hasDataTypeInIdentityColumn()

Overrides org.hibernate.dialect.Dialect.hasDataTypeInIdentityColumn.

Doc from org.hibernate.dialect.Dialect.hasDataTypeInIdentityColumn.

Whether this dialect have an Identity clause added to the data type or a completely separate identity data type

Returns:boolean

boolean

hasSelfReferentialForeignKeyBugback to summary
public boolean hasSelfReferentialForeignKeyBug()

Overrides org.hibernate.dialect.Dialect.hasSelfReferentialForeignKeyBug.

performTemporaryTableDDLInIsolationback to summary
public Boolean performTemporaryTableDDLInIsolation()

Overrides org.hibernate.dialect.Dialect.performTemporaryTableDDLInIsolation.

Doc from org.hibernate.dialect.Dialect.performTemporaryTableDDLInIsolation.

Does the dialect require that temporary table DDL statements occur in isolation from other statements? This would be the case if the creation would cause any current transaction to get committed implicitly.

JDBC defines a standard way to query for this information via the java.sql.DatabaseMetaData#dataDefinitionCausesTransactionCommit() method. However, that does not distinguish between temporary table DDL and other forms of DDL; MySQL, for example, reports DDL causing a transaction commit via its driver, even though that is not the case for temporary table DDL.

Possible return values and their meanings:

Returns:Boolean

see the result matrix above.

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

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 an OUT parameter which will be returning a java.sql.ResultSet. How this is accomplished varies greatly from DB to DB, hence its inclusion (along with getResultSet) here.

Parameters
statement:CallableStatement

The callable statement.

col:int

The bind position at which to register the OUT param.

Returns:int

The number of (contiguous) bind positions used.

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

Overrides org.hibernate.dialect.Dialect.supportsCascadeDelete.

supportsCheckback to summary
public boolean supportsCheck()
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.

supportsForUpdateback to summary
public boolean supportsForUpdate()
supportsForUpdateNowaitback to summary
public boolean supportsForUpdateNowait()
supportsForUpdateOfback to summary
public boolean supportsForUpdateOf()
supportsIdentityColumnsback to summary
public boolean supportsIdentityColumns()

Overrides org.hibernate.dialect.Dialect.supportsIdentityColumns.

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

Does this dialect support identity column key generation?

Returns:boolean

True if IDENTITY columns are supported; false otherwise.

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.

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.

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.

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 java.sql.ResultSet#isAfterLast and java.sql.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 java.sql.ResultSet#isAfterLast and java.sql.ResultSet#isBeforeFirst are supported for forward only cursors; false otherwise.

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.

supportsTemporaryTablesback to summary
public boolean supportsTemporaryTables()

Overrides org.hibernate.dialect.Dialect.supportsTemporaryTables.

Doc from org.hibernate.dialect.Dialect.supportsTemporaryTables.

Does this dialect support temporary tables?

Returns:boolean

True if temp tables are supported; false otherwise.

supportsUniqueback to summary
public boolean supportsUnique()

Overrides org.hibernate.dialect.Dialect.supportsUnique.

Doc from org.hibernate.dialect.Dialect.supportsUnique.

Does this dialect support the UNIQUE column syntax?

Returns:boolean

boolean

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.

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.