public class IdentityColumnSupportImpl extends Object implements IdentityColumnSupport
| Constructor and Description |
|---|
IdentityColumnSupportImpl() |
| Modifier and Type | Method and Description |
|---|---|
String |
appendIdentitySelectToInsert(String insertString)
Provided we
IdentityColumnSupport.supportsInsertSelectIdentity(), then attach the
"select identity" clause to the insert statement. |
GetGeneratedKeysDelegate |
buildGetGeneratedKeysDelegate(PostInsertIdentityPersister persister,
Dialect dialect)
The Delegate for dealing with IDENTITY columns using JDBC3 getGeneratedKeys
|
String |
getIdentityColumnString(int type)
The syntax used during DDL to define a column as being an IDENTITY of
a particular type.
|
String |
getIdentityInsertString()
The keyword used to insert a generated value into an identity column (or null).
|
String |
getIdentitySelectString(String table,
String column,
int type)
Get the select command to use to retrieve the last generated IDENTITY
value for a particular table
|
boolean |
hasDataTypeInIdentityColumn()
Whether this dialect have an Identity clause added to the data type or a
completely separate identity data type
|
boolean |
supportsIdentityColumns()
Does this dialect support identity column key generation?
|
boolean |
supportsInsertSelectIdentity()
Does the dialect support some form of inserting and selecting
the generated IDENTITY value all in the same statement.
|
public boolean supportsIdentityColumns()
IdentityColumnSupportDoes this dialect support identity column key generation?
supportsIdentityColumns in interface IdentityColumnSupportpublic boolean supportsInsertSelectIdentity()
IdentityColumnSupportDoes the dialect support some form of inserting and selecting the generated IDENTITY value all in the same statement.
supportsInsertSelectIdentity in interface IdentityColumnSupportpublic boolean hasDataTypeInIdentityColumn()
IdentityColumnSupportWhether this dialect have an Identity clause added to the data type or a completely separate identity data type
hasDataTypeInIdentityColumn in interface IdentityColumnSupportpublic String appendIdentitySelectToInsert(String insertString)
IdentityColumnSupportProvided we IdentityColumnSupport.supportsInsertSelectIdentity(), then attach the
"select identity" clause to the insert statement.
<p/>
Note, if IdentityColumnSupport.supportsInsertSelectIdentity() == false then
the insert-string should be returned without modification.
appendIdentitySelectToInsert in interface IdentityColumnSupportinsertString - The insert commandpublic String getIdentitySelectString(String table, String column, int type) throws MappingException
IdentityColumnSupportGet the select command to use to retrieve the last generated IDENTITY value for a particular table
getIdentitySelectString in interface IdentityColumnSupporttable - The table into which the insert was donecolumn - The PK column.type - The Types type code.MappingException - If IDENTITY generation is not supported.public String getIdentityColumnString(int type) throws MappingException
IdentityColumnSupportThe syntax used during DDL to define a column as being an IDENTITY of a particular type.
getIdentityColumnString in interface IdentityColumnSupporttype - The Types type code.MappingException - If IDENTITY generation is not supported.public String getIdentityInsertString()
IdentityColumnSupportThe 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.
getIdentityInsertString in interface IdentityColumnSupportpublic GetGeneratedKeysDelegate buildGetGeneratedKeysDelegate(PostInsertIdentityPersister persister, Dialect dialect)
IdentityColumnSupportThe Delegate for dealing with IDENTITY columns using JDBC3 getGeneratedKeys
buildGetGeneratedKeysDelegate in interface IdentityColumnSupportpersister - The persisterdialect - The dialect against which to generate the delegateCopyright © 2001-2018 Red Hat, Inc. All Rights Reserved.