public class Cache71Dialect extends Dialect
| 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 |
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>
| Modifier and Type | Field and Description |
|---|---|
static ViolatedConstraintNameExtracter |
EXTRACTER |
CLOSED_QUOTE, DEFAULT_BATCH_SIZE, LEGACY_LOB_MERGE_STRATEGY, NEW_LOCATOR_LOB_MERGE_STRATEGY, NO_BATCH, QUOTE, STREAM_XFER_LOB_MERGE_STRATEGY| Constructor and Description |
|---|
Cache71Dialect()
Creates new
Cache71Dialect instance. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
areStringComparisonsCaseInsensitive()
Are string comparisons implicitly case insensitive.
|
boolean |
bindLimitParametersFirst()
Does the LIMIT clause come at the start of the
SELECT statement, rather than at the end?
|
SQLExceptionConversionDelegate |
buildSQLExceptionConversionDelegate()
Build an instance of a
SQLExceptionConversionDelegate for
interpreting dialect-specific error or SQLState codes. |
protected void |
commonRegistration() |
JoinFragment |
createOuterJoinFragment()
Create a
JoinFragment strategy responsible
for handling this dialect's variations in how joins are handled. |
boolean |
dropConstraints()
Do we need to drop constraints before dropping tables in this dialect?
|
boolean |
dropTemporaryTableAfterUse()
Do we need to drop the temporary table after use?
|
String |
generateTemporaryTableName(String baseTableName)
Generate a temporary table name given the base table.
|
String |
getAddColumnString()
The syntax used to add a column to a table (optional).
|
String |
getAddForeignKeyConstraintString(String constraintName,
String[] foreignKey,
String referencedTable,
String[] primaryKey,
boolean referencesPrimaryKey)
The syntax used to add a foreign key constraint to a table.
|
String |
getCascadeConstraintsString()
Completely optional cascading drop clause
|
String |
getCreateTemporaryTablePostfix()
Get any fragments needing to be postfixed to the command for
temporary table creation.
|
String |
getCreateTemporaryTableString()
Command used to create a temporary table.
|
String |
getIdentityColumnString()
The syntax used during DDL to define a column as being an IDENTITY.
|
String |
getIdentitySelectString()
Get the select command to use to retrieve the last generated IDENTITY
value.
|
String |
getLimitString(String sql,
boolean hasOffset)
Apply s limit clause to the query.
|
LockingStrategy |
getLockingStrategy(Lockable lockable,
LockMode lockMode)
Get a strategy instance which knows how to acquire a database-level lock
of the specified mode for this dialect.
|
String |
getLowercaseFunction()
The name of the SQL function that transforms a string to
lowercase
|
Class |
getNativeIdentifierGeneratorClass()
The class (which implements
IdentifierGenerator)
which acts as this dialects native generation strategy. |
String |
getNoColumnsInsertString()
The fragment used to insert a row without specifying any column values.
|
String |
getNullColumnString()
The keyword used to specify a nullable column.
|
ResultSet |
getResultSet(CallableStatement ps)
Given a callable statement previously processed by
Dialect.registerResultSetOutParameter(java.sql.CallableStatement, int),
extract the ResultSet from the OUT parameter. |
ViolatedConstraintNameExtracter |
getViolatedConstraintNameExtracter() |
boolean |
hasAlterTable()
Does this dialect support the ALTER TABLE syntax?
|
boolean |
hasDataTypeInIdentityColumn()
Whether this dialect have an Identity clause added to the data type or a
completely separate identity data type
|
boolean |
hasSelfReferentialForeignKeyBug() |
Boolean |
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.
|
boolean |
qualifyIndexName()
Do we need to qualify index names with the schema name?
|
protected void |
register71Functions() |
int |
registerResultSetOutParameter(CallableStatement statement,
int col)
Registers an OUT parameter which will be returning a
ResultSet. |
boolean |
supportsCascadeDelete() |
boolean |
supportsCheck() |
boolean |
supportsEmptyInList()
Does this dialect support empty IN lists?
For example, is [where XYZ in ()] a supported construct?
|
boolean |
supportsForUpdate() |
boolean |
supportsForUpdateNowait() |
boolean |
supportsForUpdateOf() |
boolean |
supportsIdentityColumns()
Does this dialect support identity column key generation?
|
boolean |
supportsLimit()
Does this dialect support some form of limiting query results
via a SQL clause?
|
boolean |
supportsLimitOffset()
Does this dialect's LIMIT support (if any) additionally
support specifying an offset?
|
boolean |
supportsOuterJoinForUpdate()
Does this dialect support FOR UPDATE in conjunction with
outer joined rows?
|
boolean |
supportsResultSetPositionQueryMethodsOnForwardOnlyCursor()
Does this dialect support asking the result set its positioning
information on forward only cursors.
|
boolean |
supportsSequences()
Does this dialect support sequences?
|
boolean |
supportsTemporaryTables()
Does this dialect support temporary tables?
|
boolean |
supportsUnique()
Does this dialect support the UNIQUE column syntax?
|
boolean |
supportsVariableLimit()
Does this dialect support bind variables (i.e., prepared statement
parameters) for its limit/offset?
|
boolean |
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.
|
appendIdentitySelectToInsert, appendLockHint, applyLocksToSql, bindLimitParametersInReverseOrder, buildSQLExceptionConverter, closeQuote, convertToFirstRowValue, createCaseFragment, doesReadCommittedCauseWritersToBlockReaders, doesRepeatableReadCauseReadersToBlockWriters, forceLimitUsage, forUpdateOfColumns, getAddPrimaryKeyConstraintString, getAddUniqueConstraintString, getCaseInsensitiveLike, getCastTypeName, getColumnAliasExtractor, getColumnComment, getCreateMultisetTableString, getCreateSequenceString, getCreateSequenceString, getCreateSequenceStrings, getCreateSequenceStrings, getCreateTableString, getCrossJoinSeparator, getCurrentTimestampSelectString, getCurrentTimestampSQLFunctionName, getDefaultProperties, getDialect, getDialect, getDropForeignKeyString, getDropSequenceString, getDropSequenceStrings, getDropTemporaryTableString, getForUpdateNowaitString, getForUpdateNowaitString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getFunctions, getHibernateTypeName, getHibernateTypeName, getIdentityColumnString, getIdentityInsertString, getIdentitySelectString, getKeywords, getLimitString, getLobMergeStrategy, getMaxAliasLength, getQuerySequencesString, getReadLockString, getSelectClauseNullString, getSelectGUIDString, getSelectSequenceNextValString, getSequenceNextValString, getSqlTypeDescriptorOverride, getTableComment, getTableTypeString, getTypeName, getTypeName, getWriteLockString, isCurrentTimestampSelectStringCallable, isLockTimeoutParameterized, openQuote, quote, registerColumnType, registerColumnType, registerFunction, registerHibernateType, registerHibernateType, registerKeyword, remapSqlTypeDescriptor, replaceResultVariableInOrderByClauseWithPosition, requiresCastingOfParametersInSelectClause, supportsBindAsCallableArgument, supportsCaseInsensitiveLike, supportsCircularCascadeDeleteConstraints, supportsColumnCheck, supportsCommentOn, supportsCurrentTimestampSelection, supportsExistsInSelect, supportsExpectedLobUsagePattern, supportsIfExistsAfterTableName, supportsIfExistsBeforeTableName, supportsInsertSelectIdentity, supportsLobValueChangePropogation, supportsLockTimeouts, supportsNotNullUnique, supportsParametersInInsertSelect, supportsPooledSequences, supportsRowValueConstructorSyntax, supportsRowValueConstructorSyntaxInInList, supportsSubqueryOnMutatingTable, supportsSubselectAsInPredicateLHS, supportsTableCheck, supportsTupleCounts, supportsTupleDistinctCounts, supportsUnboundedLobLocatorMaterialization, supportsUnionAll, supportsUniqueConstraintInCreateAlterTable, toBooleanValueString, toString, transformSelectString, useInputStreamToInsertBlobpublic static final ViolatedConstraintNameExtracter EXTRACTER
public Cache71Dialect()
Cache71Dialect instance. Sets up the JDBC /
Caché type mappings.protected final void commonRegistration()
protected final void register71Functions()
public boolean hasAlterTable()
DialecthasAlterTable in class Dialectpublic boolean qualifyIndexName()
DialectqualifyIndexName in class Dialectpublic boolean supportsUnique()
DialectsupportsUnique in class Dialectpublic String getAddForeignKeyConstraintString(String constraintName, String[] foreignKey, String referencedTable, String[] primaryKey, boolean referencesPrimaryKey)
getAddForeignKeyConstraintString in class DialectconstraintName - The FK constraint name.foreignKey - The names of the columns comprising the FKreferencedTable - The table referenced by the FKprimaryKey - The explicit columns in the referencedTable referenced
by this FK.referencesPrimaryKey - if false, constraint should be
explicit about which column names the constraint refers topublic boolean supportsCheck()
public String getAddColumnString()
DialectgetAddColumnString in class Dialectpublic String getCascadeConstraintsString()
DialectgetCascadeConstraintsString in class Dialectpublic boolean dropConstraints()
DialectdropConstraints in class Dialectpublic boolean supportsCascadeDelete()
supportsCascadeDelete in class Dialectpublic boolean hasSelfReferentialForeignKeyBug()
hasSelfReferentialForeignKeyBug in class Dialectpublic boolean supportsTemporaryTables()
DialectsupportsTemporaryTables in class Dialectpublic String generateTemporaryTableName(String baseTableName)
DialectgenerateTemporaryTableName in class DialectbaseTableName - The table name from which to base the temp table name.public String getCreateTemporaryTableString()
DialectgetCreateTemporaryTableString in class Dialectpublic Boolean performTemporaryTableDDLInIsolation()
DialectDatabaseMetaData.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:Boolean.TRUE - Unequivocally, perform the temporary table DDL
in isolation.Boolean.FALSE - Unequivocally, do not perform the
temporary table DDL in isolation.DatabaseMetaData.dataDefinitionCausesTransactionCommit()performTemporaryTableDDLInIsolation in class Dialectpublic String getCreateTemporaryTablePostfix()
DialectgetCreateTemporaryTablePostfix in class Dialectpublic boolean dropTemporaryTableAfterUse()
DialectdropTemporaryTableAfterUse in class Dialectpublic boolean supportsIdentityColumns()
DialectsupportsIdentityColumns in class Dialectpublic Class getNativeIdentifierGeneratorClass()
DialectIdentifierGenerator)
which acts as this dialects native generation strategy.
Comes into play whenever the user specifies the native generator.getNativeIdentifierGeneratorClass in class Dialectpublic boolean hasDataTypeInIdentityColumn()
DialecthasDataTypeInIdentityColumn in class Dialectpublic String getIdentityColumnString() throws MappingException
DialectgetIdentityColumnString in class DialectMappingException - If IDENTITY generation is not supported.public String getIdentitySelectString()
DialectgetIdentitySelectString in class Dialectpublic boolean supportsSequences()
DialectsupportsSequences in class Dialectpublic boolean supportsForUpdate()
public boolean supportsForUpdateOf()
public boolean supportsForUpdateNowait()
public boolean supportsOuterJoinForUpdate()
DialectsupportsOuterJoinForUpdate in class Dialectpublic LockingStrategy getLockingStrategy(Lockable lockable, LockMode lockMode)
DialectgetLockingStrategy in class Dialectlockable - The persister for the entity to be locked.lockMode - The type of lock to be acquired.public boolean supportsLimit()
DialectsupportsLimit in class Dialectpublic boolean supportsLimitOffset()
DialectsupportsLimitOffset in class Dialectpublic boolean supportsVariableLimit()
DialectsupportsVariableLimit in class Dialectpublic boolean bindLimitParametersFirst()
DialectbindLimitParametersFirst in class Dialectpublic boolean useMaxForLimit()
DialectuseMaxForLimit in class Dialectpublic String getLimitString(String sql, boolean hasOffset)
Dialectvariable
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
Dialect.getLimitString(String, int, int).getLimitString in class Dialectsql - The query to which to apply the limit.hasOffset - Is the query requesting an offset?public int registerResultSetOutParameter(CallableStatement statement, int col) throws SQLException
DialectResultSet. How this is accomplished varies greatly
from DB to DB, hence its inclusion (along with Dialect.getResultSet(java.sql.CallableStatement)) here.registerResultSetOutParameter in class Dialectstatement - The callable statement.col - The bind position at which to register the OUT param.SQLException - Indicates problems registering the OUT param.public ResultSet getResultSet(CallableStatement ps) throws SQLException
DialectDialect.registerResultSetOutParameter(java.sql.CallableStatement, int),
extract the ResultSet from the OUT parameter.getResultSet in class Dialectps - The callable statement.SQLException - Indicates problems extracting the result set.public String getLowercaseFunction()
DialectgetLowercaseFunction in class Dialectpublic String getNullColumnString()
DialectgetNullColumnString in class Dialectpublic JoinFragment createOuterJoinFragment()
DialectJoinFragment strategy responsible
for handling this dialect's variations in how joins are handled.createOuterJoinFragment in class DialectJoinFragment strategy.public String getNoColumnsInsertString()
DialectgetNoColumnsInsertString in class Dialectpublic SQLExceptionConversionDelegate buildSQLExceptionConversionDelegate()
DialectSQLExceptionConversionDelegate for
interpreting dialect-specific error or SQLState codes.
When Dialect.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:
buildSQLExceptionConversionDelegate in class Dialectpublic ViolatedConstraintNameExtracter getViolatedConstraintNameExtracter()
getViolatedConstraintNameExtracter in interface ConversionContextgetViolatedConstraintNameExtracter in class Dialectpublic boolean supportsEmptyInList()
DialectsupportsEmptyInList in class Dialectpublic boolean areStringComparisonsCaseInsensitive()
DialectareStringComparisonsCaseInsensitive in class Dialectpublic boolean supportsResultSetPositionQueryMethodsOnForwardOnlyCursor()
DialectResultSet.isAfterLast() and
ResultSet.isBeforeFirst(). Certain drivers do not
allow access to these methods for forward only cursors.
NOTE : this is highly driver dependent!supportsResultSetPositionQueryMethodsOnForwardOnlyCursor in class DialectResultSet.isAfterLast() and
ResultSet.isBeforeFirst() are supported for forward
only cursors; false otherwise.Copyright © 2012 JBoss by Red Hat. All Rights Reserved.