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.xmlFor 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
The Cache ViolatedConstraintNameExtracter.
|
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 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?
|
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
|
MultiTableBulkIdStrategy |
getDefaultMultiTableBulkIdStrategy() |
IdentityColumnSupport |
getIdentityColumnSupport()
Get the appropriate
IdentityColumnSupport |
LimitHandler |
getLimitHandler()
Returns the delegate managing LIMIT clause.
|
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
|
String |
getNativeIdentifierGeneratorStrategy()
Resolves the native generation strategy associated to this dialect.
|
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 |
hasSelfReferentialForeignKeyBug()
Does the database/driver have bug in deleting rows that refer to other rows being deleted in the same query?
|
boolean |
qualifyIndexName()
Do we need to qualify index names with the schema name?
|
protected void |
register71Functions() |
int |
registerResultSetOutParameter(CallableStatement statement,
int col)
Registers a parameter (either OUT, or the new REF_CURSOR param type available in Java 8) capable of
returning
ResultSet *by position*. |
boolean |
supportsCascadeDelete()
Does this dialect support cascaded delete on foreign key definitions?
|
boolean |
supportsCheck()
Does this dialect support check constraints?
|
boolean |
supportsEmptyInList()
Does this dialect support empty IN lists?
For example, is [where XYZ in ()] a supported construct?
|
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 |
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.
|
addSqlHintOrComment, appendLockHint, appendLockHint, applyLocksToSql, augmentRecognizedTableTypes, bindLimitParametersInReverseOrder, buildIdentifierHelper, buildSQLExceptionConverter, canCreateCatalog, canCreateSchema, cast, cast, cast, closeQuote, contributeTypes, convertToFirstRowValue, createCaseFragment, defaultScrollMode, doesReadCommittedCauseWritersToBlockReaders, doesRepeatableReadCauseReadersToBlockWriters, escapeComment, escapeLiteral, forceLimitUsage, forceLobAsLastValue, forUpdateOfColumns, getAddColumnSuffixString, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getAddUniqueConstraintString, getAlterTableString, getAuxiliaryDatabaseObjectExporter, getCallableStatementSupport, getCaseInsensitiveLike, getCastTypeName, getColumnAliasExtractor, getColumnComment, getCreateCatalogCommand, getCreateMultisetTableString, getCreateSchemaCommand, getCreateSequenceString, getCreateSequenceString, getCreateSequenceStrings, getCreateSequenceStrings, getCreateTableString, getCrossJoinSeparator, getCurrentSchemaCommand, getCurrentTimestampSelectString, getCurrentTimestampSQLFunctionName, getDefaultBatchLoadSizingStrategy, getDefaultProperties, getDialect, getDialect, getDropCatalogCommand, getDropForeignKeyString, getDropSchemaCommand, getDropSequenceString, getDropSequenceStrings, getDropTableString, getForeignKeyExporter, getForUpdateNowaitString, getForUpdateNowaitString, getForUpdateSkipLockedString, getForUpdateSkipLockedString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getFunctions, getHibernateTypeName, getHibernateTypeName, getIndexExporter, getInExpressionCountLimit, getKeywords, getLimitString, getLobMergeStrategy, getMaxAliasLength, getNameQualifierSupport, getNativeIdentifierGeneratorClass, getNotExpression, getQueryHintString, getQueryHintString, getQuerySequencesString, getReadLockString, getReadLockString, getResultSet, getResultSet, getSchemaNameResolver, getSelectClauseNullString, getSelectGUIDString, getSelectSequenceNextValString, getSequenceExporter, getSequenceInformationExtractor, getSequenceNextValString, getSqlTypeDescriptorOverride, getTableComment, getTableExporter, getTableTypeString, getTypeName, getTypeName, getUniqueDelegate, getUniqueKeyExporter, getWriteLockString, getWriteLockString, inlineLiteral, isCurrentTimestampSelectStringCallable, isJdbcLogWarningsEnabledByDefault, isLegacyLimitHandlerBehaviorEnabled, isLockTimeoutParameterized, isTypeNameRegistered, openQuote, prependComment, quote, registerColumnType, registerColumnType, registerFunction, registerHibernateType, registerHibernateType, registerKeyword, registerResultSetOutParameter, remapSqlTypeDescriptor, renderOrderByElement, replaceResultVariableInOrderByClauseWithPosition, requiresCastingOfParametersInSelectClause, requiresParensForTupleDistinctCounts, supportsBindAsCallableArgument, supportsCaseInsensitiveLike, supportsCircularCascadeDeleteConstraints, supportsColumnCheck, supportsCommentOn, supportsCurrentTimestampSelection, supportsExistsInSelect, supportsExpectedLobUsagePattern, supportsIfExistsAfterAlterTable, supportsIfExistsAfterConstraintName, supportsIfExistsAfterTableName, supportsIfExistsBeforeConstraintName, supportsIfExistsBeforeTableName, supportsLobValueChangePropogation, supportsLockTimeouts, supportsNamedParameters, supportsNationalizedTypes, supportsNonQueryWithCTE, supportsNotNullUnique, supportsNoWait, supportsParametersInInsertSelect, supportsPartitionBy, supportsPooledSequences, supportsRowValueConstructorSyntax, supportsRowValueConstructorSyntaxInInList, supportsSkipLocked, supportsSubqueryOnMutatingTable, supportsSubselectAsInPredicateLHS, supportsTableCheck, supportsTupleCounts, supportsTupleDistinctCounts, supportsTuplesInSubqueries, supportsUnboundedLobLocatorMaterialization, supportsUnionAll, supportsUnique, supportsUniqueConstraintInCreateAlterTable, supportsValuesList, toBooleanValueString, toString, transformSelectString, useFollowOnLocking, useFollowOnLocking, useInputStreamToInsertBlob
public 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()
Dialect
hasAlterTable
in class Dialect
public boolean qualifyIndexName()
Dialect
qualifyIndexName
in class Dialect
public String getAddForeignKeyConstraintString(String constraintName, String[] foreignKey, String referencedTable, String[] primaryKey, boolean referencesPrimaryKey)
Dialect
getAddForeignKeyConstraintString
in class Dialect
constraintName
- 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()
false
(Cache does not support check constraints)public String getAddColumnString()
Dialect
getAddColumnString
in class Dialect
public String getCascadeConstraintsString()
Dialect
getCascadeConstraintsString
in class Dialect
public boolean dropConstraints()
Dialect
dropConstraints
in class Dialect
public boolean supportsCascadeDelete()
Dialect
supportsCascadeDelete
in class Dialect
true
indicates that the dialect does support cascaded delete on foreign keys.public boolean hasSelfReferentialForeignKeyBug()
Dialect
hasSelfReferentialForeignKeyBug
in class Dialect
true
if the database/driver has this bugpublic MultiTableBulkIdStrategy getDefaultMultiTableBulkIdStrategy()
getDefaultMultiTableBulkIdStrategy
in class Dialect
public String getNativeIdentifierGeneratorStrategy()
Dialect
getNativeIdentifierGeneratorStrategy
in class Dialect
public IdentityColumnSupport getIdentityColumnSupport()
Dialect
IdentityColumnSupport
getIdentityColumnSupport
in class Dialect
public boolean supportsSequences()
Dialect
supportsSequences
in class Dialect
public boolean supportsOuterJoinForUpdate()
Dialect
supportsOuterJoinForUpdate
in class Dialect
public LockingStrategy getLockingStrategy(Lockable lockable, LockMode lockMode)
Dialect
getLockingStrategy
in class Dialect
lockable
- The persister for the entity to be locked.lockMode
- The type of lock to be acquired.public LimitHandler getLimitHandler()
Dialect
getLimitHandler
in class Dialect
public boolean supportsLimit()
Dialect
supportsLimit
in class Dialect
public boolean supportsLimitOffset()
Dialect
supportsLimitOffset
in class Dialect
public boolean supportsVariableLimit()
Dialect
supportsVariableLimit
in class Dialect
public boolean bindLimitParametersFirst()
Dialect
bindLimitParametersFirst
in class Dialect
public boolean useMaxForLimit()
Dialect
useMaxForLimit
in class Dialect
public String getLimitString(String sql, boolean hasOffset)
Dialect
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
Dialect.getLimitString(String, int, int)
.getLimitString
in class Dialect
sql
- The query to which to apply the limit.hasOffset
- Is the query requesting an offset?public int registerResultSetOutParameter(CallableStatement statement, int col) throws SQLException
Dialect
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.registerResultSetOutParameter
in class Dialect
statement
- The callable statement.col
- The bind position at which to register the output param.SQLException
- Indicates problems registering the param.public ResultSet getResultSet(CallableStatement ps) throws SQLException
Dialect
Dialect.registerResultSetOutParameter(java.sql.CallableStatement, int)
,
extract the ResultSet
from the OUT parameter.getResultSet
in class Dialect
ps
- The callable statement.SQLException
- Indicates problems extracting the result set.public String getLowercaseFunction()
Dialect
getLowercaseFunction
in class Dialect
public String getNullColumnString()
Dialect
getNullColumnString
in class Dialect
public JoinFragment createOuterJoinFragment()
Dialect
JoinFragment
strategy responsible
for handling this dialect's variations in how joins are handled.createOuterJoinFragment
in class Dialect
JoinFragment
strategy.public String getNoColumnsInsertString()
Dialect
getNoColumnsInsertString
in class Dialect
public SQLExceptionConversionDelegate buildSQLExceptionConversionDelegate()
Dialect
SQLExceptionConversionDelegate
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 Dialect
public ViolatedConstraintNameExtracter getViolatedConstraintNameExtracter()
getViolatedConstraintNameExtracter
in interface ConversionContext
getViolatedConstraintNameExtracter
in class Dialect
public boolean supportsEmptyInList()
Dialect
supportsEmptyInList
in class Dialect
public boolean areStringComparisonsCaseInsensitive()
Dialect
areStringComparisonsCaseInsensitive
in class Dialect
public boolean supportsResultSetPositionQueryMethodsOnForwardOnlyCursor()
Dialect
ResultSet.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 Dialect
ResultSet.isAfterLast()
and
ResultSet.isBeforeFirst()
are supported for forward
only cursors; false otherwise.Copyright © 2021 JBoss by Red Hat. All rights reserved.