Top Constructors Methods
org.hibernate.dialect.identity

public Class AbstractTransactSQLIdentityColumnSupport

extends IdentityColumnSupportImpl
Class Inheritance
Known Direct Subclasses
org.hibernate.dialect.identity.SQLServerIdentityColumnSupport, org.hibernate.dialect.identity.SybaseAnywhereIdentityColumnSupport
Imports
org.hibernate.MappingException

Author
Andrea Boriero

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
public String
getIdentityColumnString(int
The java.sql.Types type code.
type
)

Overrides org.hibernate.dialect.identity.IdentityColumnSupportImpl.getIdentityColumnString.

Implements org.hibernate.dialect.identity.IdentityColumnSupport.getIdentityColumnString.

The syntax used during DDL to define a column as being an IDENTITY of a particular type.
public String
getIdentitySelectString(String
The table into which the insert was done
table
,
String
The PK column.
column
,
int
The java.sql.Types type code.
type
)

Overrides org.hibernate.dialect.identity.IdentityColumnSupportImpl.getIdentitySelectString.

Implements org.hibernate.dialect.identity.IdentityColumnSupport.getIdentitySelectString.

Get the select command to use to retrieve the last generated IDENTITY value for a particular table
public boolean
public boolean
supportsInsertSelectIdentity()

Overrides org.hibernate.dialect.identity.IdentityColumnSupportImpl.supportsInsertSelectIdentity.

Implements org.hibernate.dialect.identity.IdentityColumnSupport.supportsInsertSelectIdentity.

Does the dialect support some form of inserting and selecting the generated IDENTITY value all in the same statement.
Inherited from org.hibernate.dialect.identity.IdentityColumnSupportImpl:
buildGetGeneratedKeysDelegategetIdentityInsertStringhasDataTypeInIdentityColumn

Constructor Detail

AbstractTransactSQLIdentityColumnSupportback to summary
public AbstractTransactSQLIdentityColumnSupport()

Method Detail

appendIdentitySelectToInsertback to summary
public String appendIdentitySelectToInsert(String insertSQL)

Overrides org.hibernate.dialect.identity.IdentityColumnSupportImpl.appendIdentitySelectToInsert.

Implements org.hibernate.dialect.identity.IdentityColumnSupport.appendIdentitySelectToInsert.

Doc from org.hibernate.dialect.identity.IdentityColumnSupport.appendIdentitySelectToInsert.

Provided we supportsInsertSelectIdentity, then attach the "select identity" clause to the insert statement.

Note, if supportsInsertSelectIdentity == false then the insert-string should be returned without modification.

Parameters
insertSQL:String

The insert command

Returns:String

The insert command with any necessary identity select clause attached.

Annotations
@Override
getIdentityColumnStringback to summary
public String getIdentityColumnString(int type) throws MappingException

Overrides org.hibernate.dialect.identity.IdentityColumnSupportImpl.getIdentityColumnString.

Implements org.hibernate.dialect.identity.IdentityColumnSupport.getIdentityColumnString.

Doc from org.hibernate.dialect.identity.IdentityColumnSupport.getIdentityColumnString.

The syntax used during DDL to define a column as being an IDENTITY of a particular type.

Parameters
type:int

The java.sql.Types type code.

Returns:String

The appropriate DDL fragment.

Annotations
@Override
Exceptions
MappingException:
If IDENTITY generation is not supported.
getIdentitySelectStringback to summary
public String getIdentitySelectString(String table, String column, int type) throws MappingException

Overrides org.hibernate.dialect.identity.IdentityColumnSupportImpl.getIdentitySelectString.

Implements org.hibernate.dialect.identity.IdentityColumnSupport.getIdentitySelectString.

Doc from org.hibernate.dialect.identity.IdentityColumnSupport.getIdentitySelectString.

Get the select command to use to retrieve the last generated IDENTITY value for a particular table

Parameters
table:String

The table into which the insert was done

column:String

The PK column.

type:int

The java.sql.Types type code.

Returns:String

The appropriate select command

Annotations
@Override
Exceptions
MappingException:
If IDENTITY generation is not supported.
supportsIdentityColumnsback to summary
public boolean supportsIdentityColumns()

Overrides org.hibernate.dialect.identity.IdentityColumnSupportImpl.supportsIdentityColumns.

Implements org.hibernate.dialect.identity.IdentityColumnSupport.supportsIdentityColumns.

Doc from org.hibernate.dialect.identity.IdentityColumnSupport.supportsIdentityColumns.

Does this dialect support identity column key generation?

Returns:boolean

True if IDENTITY columns are supported; false otherwise.

Annotations
@Override
supportsInsertSelectIdentityback to summary
public boolean supportsInsertSelectIdentity()

Overrides org.hibernate.dialect.identity.IdentityColumnSupportImpl.supportsInsertSelectIdentity.

Implements org.hibernate.dialect.identity.IdentityColumnSupport.supportsInsertSelectIdentity.

Doc from org.hibernate.dialect.identity.IdentityColumnSupport.supportsInsertSelectIdentity.

Does the dialect support some form of inserting and selecting the generated IDENTITY value all in the same statement.

Returns:boolean

True if the dialect supports selecting the just generated IDENTITY in the insert statement.

Annotations
@Override