Top Description Constructors Methods
org.hibernate.dialect

public Class SybaseASE157Dialect

extends SybaseASE15Dialect
Class Inheritance
Imports
java.sql.Types, java.util.Map, org.hibernate.dialect.function.AnsiTrimEmulationFunction, .NoArgSQLFunction, .SQLFunctionTemplate, .VarArgsSQLFunction, org.hibernate.type.StandardBasicTypes, org.hibernate.LockMode, .LockOptions, org.hibernate.sql.ForUpdateFragment

An SQL dialect targeting Sybase Adaptive Server Enterprise (ASE) 15.7 and higher.

Author
Junyan Ren

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
appendLockHint(LockMode
The lock mode to apply
mode
,
String
The name of the table to which to apply the lock hint.
tableName
)

Overrides org.hibernate.dialect.AbstractTransactSQLDialect.appendLockHint.

Some dialects support an alternative means to SELECT FOR UPDATE, whereby a "lock hint" is appends to the table name in the from clause.
public String
applyLocksToSql(String
the SQL string to modify
sql
,
LockOptions
lock options indexed by aliased table names.
aliasedLockOptions
,
Map<K, V>
a map of key columns indexed by aliased table names.
keyColumnNames
)

Overrides org.hibernate.dialect.AbstractTransactSQLDialect.applyLocksToSql.

Modifies the given SQL by applying the appropriate updates for the specified lock modes and key columns.
public boolean
forUpdateOfColumns()

Overrides org.hibernate.dialect.Dialect.forUpdateOfColumns.

Is FOR UPDATE OF syntax supported?
public String
getForUpdateString()

Overrides org.hibernate.dialect.AbstractTransactSQLDialect.getForUpdateString.

Get the string to append to SELECT statements to acquire locks for this dialect.
public String
getForUpdateString(String
The columns to be write locked.
aliases
)

Overrides org.hibernate.dialect.Dialect.getForUpdateString.

Get the FOR UPDATE OF column_list fragment appropriate for this dialect given the aliases of the columns to be write locked.
public boolean
public boolean
supportsLobValueChangePropogation()

Overrides org.hibernate.dialect.Dialect.supportsLobValueChangePropogation.

Does the dialect support propagating changes to LOB values back to the database?
Inherited from org.hibernate.dialect.SybaseASE15Dialect:
areStringComparisonsCaseInsensitivegetCrossJoinSeparatorgetCurrentTimestampSQLFunctionNamegetMaxAliasLengthsupportsCascadeDeletesupportsUniqueConstraintInCreateAlterTable

Constructor Detail

SybaseASE157Dialectback to summary
public SybaseASE157Dialect()

Method Detail

appendLockHintback to summary
public String appendLockHint(LockMode mode, String tableName)

Overrides org.hibernate.dialect.AbstractTransactSQLDialect.appendLockHint.

Doc from org.hibernate.dialect.Dialect.appendLockHint.

Some dialects support an alternative means to SELECT FOR UPDATE, whereby a "lock hint" is appends to the table name in the from clause.

contributed by Helge Schulz

Parameters
mode:LockMode

The lock mode to apply

tableName:String

The name of the table to which to apply the lock hint.

Returns:String

The table with any required lock hints.

applyLocksToSqlback to summary
public String applyLocksToSql(String sql, LockOptions aliasedLockOptions, Map<K, V> keyColumnNames)

Overrides org.hibernate.dialect.AbstractTransactSQLDialect.applyLocksToSql.

Doc from org.hibernate.dialect.Dialect.applyLocksToSql.

Modifies the given SQL by applying the appropriate updates for the specified lock modes and key columns.

The behavior here is that of an ANSI SQL SELECT FOR UPDATE. This method is really intended to allow dialects which do not support SELECT FOR UPDATE to achieve this in their own fashion.

Parameters
sql:String

the SQL string to modify

aliasedLockOptions:LockOptions

lock options indexed by aliased table names.

keyColumnNames:Map<K, V>

a map of key columns indexed by aliased table names.

Returns:String

the modified SQL string.

forUpdateOfColumnsback to summary
public boolean forUpdateOfColumns()

Overrides org.hibernate.dialect.Dialect.forUpdateOfColumns.

Doc from org.hibernate.dialect.Dialect.forUpdateOfColumns.

Is FOR UPDATE OF syntax supported?

Returns:boolean

True if the database supports FOR UPDATE OF syntax; false otherwise.

getForUpdateStringback to summary
public String getForUpdateString()

Overrides org.hibernate.dialect.AbstractTransactSQLDialect.getForUpdateString.

Doc from org.hibernate.dialect.Dialect.getForUpdateString.

Get the string to append to SELECT statements to acquire locks for this dialect.

Returns:String

The appropriate FOR UPDATE clause string.

getForUpdateStringback to summary
public String getForUpdateString(String aliases)

Overrides org.hibernate.dialect.Dialect.getForUpdateString.

Doc from org.hibernate.dialect.Dialect.getForUpdateString.

Get the FOR UPDATE OF column_list fragment appropriate for this dialect given the aliases of the columns to be write locked.

Parameters
aliases:String

The columns to be write locked.

Returns:String

The appropriate FOR UPDATE OF column_list clause string.

supportsExpectedLobUsagePatternback to summary
public boolean supportsExpectedLobUsagePattern()

Overrides org.hibernate.dialect.SybaseASE15Dialect.supportsExpectedLobUsagePattern.

Doc from org.hibernate.dialect.SybaseASE15Dialect.supportsExpectedLobUsagePattern.

Actually Sybase does not support LOB locators at al.

Returns:boolean

false.

supportsLobValueChangePropogationback to summary
public boolean supportsLobValueChangePropogation()

Overrides org.hibernate.dialect.Dialect.supportsLobValueChangePropogation.

Doc from org.hibernate.dialect.Dialect.supportsLobValueChangePropogation.

Does the dialect support propagating changes to LOB values back to the database? Talking about mutating the internal value of the locator as opposed to supplying a new locator instance...

For BLOBs, the internal value might be changed by: java.sql.Blob#setBinaryStream, java.sql.Blob#setBytes(long, byte[]), java.sql.Blob#setBytes(long, byte[], int, int), or java.sql.Blob#truncate(long).

For CLOBs, the internal value might be changed by: java.sql.Clob#setAsciiStream(long), java.sql.Clob#setCharacterStream(long), java.sql.Clob#setString(long, String), java.sql.Clob#setString(long, String, int, int), or java.sql.Clob#truncate(long).

NOTE : I do not know the correct answer currently for databases which (1) are not part of the cruise control process or (2) do not supportsExpectedLobUsagePattern.

Returns:boolean

True if the changes are propagated back to the database; false otherwise.