|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.hibernate.dialect.Dialect org.hibernate.dialect.Cache71Dialect
public class Cache71Dialect
Caché 2007.1 dialect. This class is required in order to use Hibernate with Intersystems Cach� SQL.
Compatible with Cach� 2007.1.
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>
Field Summary | |
---|---|
static ViolatedConstraintNameExtracter |
EXTRACTER
|
Fields inherited from class org.hibernate.dialect.Dialect |
---|
CLOSED_QUOTE, DEFAULT_BATCH_SIZE, NO_BATCH, QUOTE |
Constructor Summary | |
---|---|
Cache71Dialect()
Creates new Cach�71Dialect instance. |
Method Summary | |
---|---|
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? |
SQLExceptionConverter |
buildSQLExceptionConverter()
Build an instance of the SQLExceptionConverter preferred by this dialect for converting SQLExceptions into Hibernate's JDBCException hierarchy. |
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 bas 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. |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final ViolatedConstraintNameExtracter EXTRACTER
Constructor Detail |
---|
public Cache71Dialect()
Cach�71Dialect
instance. Sets up the JDBC /
Cach� type mappings.
Method Detail |
---|
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 boolean supportsUnique()
Dialect
supportsUnique
in class Dialect
public String getAddForeignKeyConstraintString(String constraintName, String[] foreignKey, String referencedTable, String[] primaryKey, boolean referencesPrimaryKey)
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 to
public boolean supportsCheck()
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()
supportsCascadeDelete
in class Dialect
public boolean hasSelfReferentialForeignKeyBug()
hasSelfReferentialForeignKeyBug
in class Dialect
public boolean supportsTemporaryTables()
Dialect
supportsTemporaryTables
in class Dialect
public String generateTemporaryTableName(String baseTableName)
Dialect
generateTemporaryTableName
in class Dialect
baseTableName
- The table name from which to base the temp table name.
public String getCreateTemporaryTableString()
Dialect
getCreateTemporaryTableString
in class Dialect
public Boolean performTemporaryTableDDLInIsolation()
Dialect
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: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 Dialect
public String getCreateTemporaryTablePostfix()
Dialect
getCreateTemporaryTablePostfix
in class Dialect
public boolean dropTemporaryTableAfterUse()
Dialect
dropTemporaryTableAfterUse
in class Dialect
public boolean supportsIdentityColumns()
Dialect
supportsIdentityColumns
in class Dialect
public Class getNativeIdentifierGeneratorClass()
Dialect
IdentifierGenerator
)
which acts as this dialects native generation strategy.
Comes into play whenever the user specifies the native generator.
getNativeIdentifierGeneratorClass
in class Dialect
public boolean hasDataTypeInIdentityColumn()
Dialect
hasDataTypeInIdentityColumn
in class Dialect
public String getIdentityColumnString() throws MappingException
Dialect
getIdentityColumnString
in class Dialect
MappingException
- If IDENTITY generation is not supported.public String getIdentitySelectString()
Dialect
getIdentitySelectString
in class Dialect
public boolean supportsSequences()
Dialect
supportsSequences
in class Dialect
public boolean supportsForUpdate()
public boolean supportsForUpdateOf()
public boolean supportsForUpdateNowait()
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 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
. How this is accomplished varies greatly
from DB to DB, hence its inclusion (along with Dialect.getResultSet(java.sql.CallableStatement)
) here.
registerResultSetOutParameter
in class Dialect
statement
- 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
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 SQLExceptionConverter buildSQLExceptionConverter()
Dialect
buildSQLExceptionConverter
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |