Class Cache71Dialect
- All Implemented Interfaces:
org.hibernate.boot.model.FunctionContributor,org.hibernate.boot.model.TypeContributor,org.hibernate.exception.spi.ConversionContext
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é.
- Copy C:\CacheSys\dev\java\lib\JDK15\CacheDB.jar to C:\Hibernate\lib\CacheDB.jar.
- 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.
- 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.community.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:
- org.hibernate.community.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:
- src\org\hibernate\dialect\Cache71Dialect.java
- src\org\hibernate\dialect\function\ConditionalParenthesisFunction.java
- src\org\hibernate\dialect\function\ConvertFunction.java
- src\org\hibernate\exception\CacheSQLStateConverter.java
- src\org\hibernate\sql\CacheJoinFragment.java
-
Nested Class Summary
Nested classes/interfaces inherited from class org.hibernate.dialect.Dialect
org.hibernate.dialect.Dialect.SizeStrategy, org.hibernate.dialect.Dialect.SizeStrategyImpl -
Field Summary
Fields inherited from class org.hibernate.dialect.Dialect
CLOSED_QUOTE, LEGACY_LOB_MERGE_STRATEGY, LOG_BASE2OF10, NEW_LOCATOR_LOB_MERGE_STRATEGY, QUOTE, STANDARD_MULTI_KEY_LOAD_SIZING_STRATEGY, STREAM_XFER_LOB_MERGE_STRATEGY -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.hibernate.community.dialect.CacheDialect
appendDatetimeFormat, buildSQLExceptionConversionDelegate, columnType, extractPattern, getAddForeignKeyConstraintString, getDefaultDecimalPrecision, getDefaultStatementBatchSize, getIdentityColumnSupport, getLimitHandler, getLockingStrategy, getNativeIdentifierGeneratorStrategy, getNoColumnsInsertString, getNullColumnString, getPreferredSqlTypeCodeForBoolean, getQuerySequencesString, getResultSet, getSequenceSupport, getSqlAstTranslatorFactory, getViolatedConstraintNameExtractor, hasSelfReferentialForeignKeyBug, initDefaultProperties, initializeFunctionRegistry, qualifyIndexName, registerResultSetOutParameter, resolveSqlTypeDescriptor, supportsOrderByInSubquery, supportsOuterJoinForUpdate, supportsResultSetPositionQueryMethodsOnForwardOnlyCursor, timestampaddPattern, timestampdiffPatternMethods inherited from class org.hibernate.dialect.Dialect
addSqlHintOrComment, appendArrayLiteral, appendBinaryLiteral, appendBooleanValueString, appendDateTimeLiteral, appendDateTimeLiteral, appendDateTimeLiteral, appendIntervalLiteral, appendLiteral, appendLockHint, appendUUIDLiteral, applyLocksToSql, augmentPhysicalTableTypes, augmentRecognizedTableTypes, buildIdentifierHelper, canBatchTruncate, canCreateCatalog, canCreateSchema, canDisableConstraints, castPattern, castType, checkVersion, closeQuote, contribute, contributeFunctions, contributeTypes, createOptionalTableUpdateOperation, currentDate, currentLocalTime, currentLocalTimestamp, currentTime, currentTimestamp, currentTimestampWithTimeZone, defaultScrollMode, doesReadCommittedCauseWritersToBlockReaders, doesRepeatableReadCauseReadersToBlockWriters, doesRoundTemporalOnOverflow, dropConstraints, equivalentTypes, escapeComment, forceLobAsLastValue, generatedAs, getAddColumnString, getAddColumnSuffixString, getAddForeignKeyConstraintString, getAddPrimaryKeyConstraintString, getAggregateSupport, getAlterColumnTypeString, getAlterTableString, getArrayTypeName, getAuxiliaryDatabaseObjectExporter, getBatchLoadSizingStrategy, getCallableStatementSupport, getCascadeConstraintsString, getCaseInsensitiveLike, getCheckCondition, getCheckCondition, getCheckCondition, getCheckCondition, getCheckCondition, getColumnAliasExtractor, getColumnComment, getCreateCatalogCommand, getCreateEnumTypeCommand, getCreateEnumTypeCommand, getCreateIndexString, getCreateIndexTail, getCreateMultisetTableString, getCreateSchemaCommand, getCreateTableString, getCreateTemporaryTableColumnAnnotation, getCreateUserDefinedTypeExtensionsString, getCreateUserDefinedTypeKindString, getCurrentSchemaCommand, getCurrentTimestampSelectString, getDefaultIntervalSecondScale, getDefaultLobLength, getDefaultNonContextualLobCreation, getDefaultProperties, getDefaultTimestampPrecision, getDefaultUseGetGeneratedKeys, getDisableConstraintsStatement, getDisableConstraintStatement, getDmlTargetColumnQualifierSupport, getDoublePrecision, getDropCatalogCommand, getDropEnumTypeCommand, getDropEnumTypeCommand, getDropForeignKeyString, getDropSchemaCommand, getDropTableString, getDropUniqueKeyString, getEnableConstraintsStatement, getEnableConstraintStatement, getEnumTypeDeclaration, getEnumTypeDeclaration, getFallbackSchemaManagementTool, getFallbackSqmInsertStrategy, getFallbackSqmMutationStrategy, getFloatPrecision, getForeignKeyExporter, getForUpdateNowaitString, getForUpdateNowaitString, getForUpdateSkipLockedString, getForUpdateSkipLockedString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getForUpdateString, getFractionalSecondPrecisionInNanos, getFunctionalDependencyAnalysisSupport, getGroupBySelectItemReferenceStrategy, getHqlTranslator, getIndexExporter, getInExpressionCountLimit, getKeywords, getLobMergeStrategy, getLockRowIdentifier, getLowercaseFunction, getMaxAliasLength, getMaxIdentifierLength, getMaxNVarcharCapacity, getMaxNVarcharLength, getMaxVarbinaryCapacity, getMaxVarbinaryLength, getMaxVarcharCapacity, getMaxVarcharLength, getMinimumSupportedVersion, getMultiKeyLoadSizingStrategy, getNameQualifierSupport, getNationalizationSupport, getNativeParameterMarkerStrategy, getNullColumnString, getNullOrdering, getParameterCountLimit, getPreferredSqlTypeCodeForArray, getQueryHintString, getQueryHintString, getReadLockString, getReadLockString, getReadRowLockStrategy, getResultSet, getResultSet, getRowIdColumnString, getSchemaNameResolver, getSelectClauseNullString, getSelectGUIDString, getSequenceExporter, getSequenceInformationExtractor, getSizeStrategy, getSqmTranslatorFactory, getSupportedTemporaryTableKind, getTableCleaner, getTableComment, getTableExporter, getTableMigrator, getTableTypeString, getTemporaryTableAfterUseAction, getTemporaryTableBeforeUseAction, getTemporaryTableCreateCommand, getTemporaryTableCreateOptions, getTemporaryTableDdlTransactionHandling, getTemporaryTableDropCommand, getTemporaryTableExporter, getTemporaryTableTruncateCommand, getTimeoutInSeconds, getTimeZoneSupport, getTruncateTableStatement, getTruncateTableStatements, getUniqueDelegate, getUniqueKeyExporter, getUserDefinedTypeComment, getUserDefinedTypeExporter, getVersion, getWriteLockString, getWriteLockString, getWriteRowLockStrategy, hasAlterTable, hasDataTypeBeforeGeneratedAs, inlineLiteral, isAnsiNullOn, isCurrentTimestampSelectStringCallable, isEmptyStringTreatedAsNull, isJdbcLogWarningsEnabledByDefault, isLob, isLockTimeoutParameterized, openQuote, ordinal, prependComment, quote, quoteCollation, registerColumnTypes, registerDefaultKeywords, registerKeyword, registerKeywords, registerResultSetOutParameter, requiresCastForConcatenatingNonStrings, requiresFloatCastingOfIntegerDivision, requiresParensForTupleCounts, requiresParensForTupleDistinctCounts, resolveSqlTypeCode, resolveSqlTypeCode, resolveSqlTypeLength, rowId, rowIdSqlType, supportsAlterColumnType, supportsBatchUpdates, supportsBindAsCallableArgument, supportsBitType, supportsCascadeDelete, supportsCaseInsensitiveLike, supportsCircularCascadeDeleteConstraints, supportsColumnCheck, supportsCommentOn, supportsConflictClauseForInsertCTE, supportsCurrentTimestampSelection, supportsDistinctFromPredicate, supportsExistsInSelect, supportsExpectedLobUsagePattern, supportsFetchClause, supportsFractionalTimestampArithmetic, supportsFromClauseInUpdate, supportsIfExistsAfterAlterTable, supportsIfExistsAfterConstraintName, supportsIfExistsAfterTableName, supportsIfExistsAfterTypeName, supportsIfExistsBeforeConstraintName, supportsIfExistsBeforeTableName, supportsIfExistsBeforeTypeName, supportsInsertReturning, supportsInsertReturningGeneratedKeys, supportsInsertReturningRowId, supportsIsTrue, supportsJdbcConnectionLobCreation, supportsLateral, supportsLobValueChangePropagation, supportsLockTimeouts, supportsMaterializedLobAccess, supportsNamedParameters, supportsNoColumnsInsert, supportsNonQueryWithCTE, supportsNoWait, supportsNullPrecedence, supportsOffsetInSubquery, supportsOrdinalSelectItemReference, supportsParametersInInsertSelect, supportsPartitionBy, supportsPredicateAsExpression, supportsRecursiveCTE, supportsRefCursors, supportsSkipLocked, supportsStandardArrays, supportsStandardCurrentTimestampFunction, supportsSubqueryInSelect, supportsSubqueryOnMutatingTable, supportsSubselectAsInPredicateLHS, supportsTableCheck, supportsTemporalLiteralOffset, supportsTemporaryTablePrimaryKey, supportsTemporaryTables, supportsTruncateWithCast, supportsTupleCounts, supportsTupleDistinctCounts, supportsUnboundedLobLocatorMaterialization, supportsUnionAll, supportsUnionInSubquery, supportsUpdateReturning, supportsValuesList, supportsValuesListForInsert, supportsWait, supportsWindowFunctions, toBooleanValueString, toQuotedIdentifier, toString, transformSelectString, translateDurationField, translateExtractField, trimPattern, trimPattern, unquoteGetGeneratedKeys, useArrayForMultiValuedParameters, useFollowOnLocking, useInputStreamToInsertBlob, useMaterializedLobWhenCapacityExceeded
-
Constructor Details
-
Cache71Dialect
public Cache71Dialect()Deprecated.
-
CacheDialect