Top Constructors Methods
org.hibernate.dialect.identity

public Class IdentityColumnSupportImpl

extends Object
implements IdentityColumnSupport
Class Inheritance
All Implemented Interfaces
org.hibernate.dialect.identity.IdentityColumnSupport
Known Direct Subclasses
org.hibernate.dialect.identity.InformixIdentityColumnSupport, org.hibernate.dialect.identity.Ingres9IdentityColumnSupport, org.hibernate.dialect.identity.JDataStoreIdentityColumnSupport, org.hibernate.dialect.identity.MimerSQLIdentityColumnSupport, org.hibernate.dialect.identity.MySQLIdentityColumnSupport, org.hibernate.dialect.identity.Oracle12cIdentityColumnSupport, org.hibernate.dialect.identity.PostgreSQL10IdentityColumnSupport, org.hibernate.dialect.identity.PostgreSQL81IdentityColumnSupport, org.hibernate.dialect.identity.Teradata14IdentityColumnSupport, org.hibernate.dialect.identity.AbstractTransactSQLIdentityColumnSupport, org.hibernate.dialect.identity.Chache71IdentityColumnSupport, org.hibernate.dialect.identity.CockroachDB1920IdentityColumnSupport, org.hibernate.dialect.identity.CUBRIDIdentityColumnSupport, org.hibernate.dialect.identity.DB2IdentityColumnSupport, org.hibernate.dialect.identity.H2IdentityColumnSupport, org.hibernate.dialect.identity.HANAIdentityColumnSupport, org.hibernate.dialect.identity.HSQLIdentityColumnSupport
Imports
org.hibernate.MappingException, org.hibernate.dialect.Dialect, org.hibernate.id.PostInsertIdentityPersister

Author
Andrea Boriero

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
appendIdentitySelectToInsert(String
The insert command
insertString
)

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

Provided we supportsInsertSelectIdentity, then attach the "select identity" clause to the insert statement.
public GetGeneratedKeysDelegate
buildGetGeneratedKeysDelegate(PostInsertIdentityPersister
The persister
persister
,
Dialect
The dialect against which to generate the delegate
dialect
)

Implements org.hibernate.dialect.identity.IdentityColumnSupport.buildGetGeneratedKeysDelegate.

The Delegate for dealing with IDENTITY columns using JDBC3 getGeneratedKeys
public String
getIdentityColumnString(int
The java.sql.Types type code.
type
)

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
getIdentityInsertString()

Implements org.hibernate.dialect.identity.IdentityColumnSupport.getIdentityInsertString.

The keyword used to insert a generated value into an identity column (or null).
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
)

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
hasDataTypeInIdentityColumn()

Implements org.hibernate.dialect.identity.IdentityColumnSupport.hasDataTypeInIdentityColumn.

Whether this dialect have an Identity clause added to the data type or a completely separate identity data type
public boolean
supportsIdentityColumns()

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

Does this dialect support identity column key generation?
public boolean
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 java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

IdentityColumnSupportImplback to summary
public IdentityColumnSupportImpl()

Method Detail

appendIdentitySelectToInsertback to summary
public String appendIdentitySelectToInsert(String insertString)

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
insertString:String

The insert command

Returns:String

The insert command with any necessary identity select clause attached.

Annotations
@Override
buildGetGeneratedKeysDelegateback to summary
public GetGeneratedKeysDelegate buildGetGeneratedKeysDelegate(PostInsertIdentityPersister persister, Dialect dialect)

Implements org.hibernate.dialect.identity.IdentityColumnSupport.buildGetGeneratedKeysDelegate.

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

The Delegate for dealing with IDENTITY columns using JDBC3 getGeneratedKeys

Parameters
persister:PostInsertIdentityPersister

The persister

dialect:Dialect

The dialect against which to generate the delegate

Returns:GetGeneratedKeysDelegate

the dialect specific GetGeneratedKeys delegate

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

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.
getIdentityInsertStringback to summary
public String getIdentityInsertString()

Implements org.hibernate.dialect.identity.IdentityColumnSupport.getIdentityInsertString.

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

The keyword used to insert a generated value into an identity column (or null). Need if the dialect does not support inserts that specify no column values.

Returns:String

The appropriate keyword.

Annotations
@Override
getIdentitySelectStringback to summary
public String getIdentitySelectString(String table, String column, int type) throws MappingException

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.
hasDataTypeInIdentityColumnback to summary
public boolean hasDataTypeInIdentityColumn()

Implements org.hibernate.dialect.identity.IdentityColumnSupport.hasDataTypeInIdentityColumn.

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

Whether this dialect have an Identity clause added to the data type or a completely separate identity data type

Returns:boolean

boolean

Annotations
@Override
supportsIdentityColumnsback to summary
public boolean 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()

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