接口 IdentityColumnSupport
-
- 所有已知实现类:
AbstractTransactSQLIdentityColumnSupport,Chache71IdentityColumnSupport,CUBRIDIdentityColumnSupport,DB2390IdentityColumnSupport,DB2IdentityColumnSupport,H2IdentityColumnSupport,HANAIdentityColumnSupport,HSQLIdentityColumnSupport,IdentityColumnSupportImpl,InformixIdentityColumnSupport,Ingres10IdentityColumnSupport,Ingres9IdentityColumnSupport,JDataStoreIdentityColumnSupport,MimerSQLIdentityColumnSupport,MySQLIdentityColumnSupport,Oracle12cIdentityColumnSupport,PostgreSQL10IdentityColumnSupport,PostgreSQL81IdentityColumnSupport,SQLServerIdentityColumnSupport,SybaseAnywhereIdentityColumnSupport,Teradata14IdentityColumnSupport
public interface IdentityColumnSupportRepresents a support for the Dialect identity key generation- 从以下版本开始:
- 5.1
- 作者:
- Andrea Boriero
-
-
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 StringappendIdentitySelectToInsert(String insertString)Provided wesupportsInsertSelectIdentity(), then attach the "select identity" clause to the insert statement.GetGeneratedKeysDelegatebuildGetGeneratedKeysDelegate(PostInsertIdentityPersister persister, Dialect dialect)The Delegate for dealing with IDENTITY columns using JDBC3 getGeneratedKeysStringgetIdentityColumnString(int type)The syntax used during DDL to define a column as being an IDENTITY of a particular type.StringgetIdentityInsertString()The keyword used to insert a generated value into an identity column (or null).StringgetIdentitySelectString(String table, String column, int type)Get the select command to use to retrieve the last generated IDENTITY value for a particular tablebooleanhasDataTypeInIdentityColumn()Whether this dialect have an Identity clause added to the data type or a completely separate identity data typebooleansupportsIdentityColumns()Does this dialect support identity column key generation?booleansupportsInsertSelectIdentity()Does the dialect support some form of inserting and selecting the generated IDENTITY value all in the same statement.
-
-
-
方法详细资料
-
supportsIdentityColumns
boolean supportsIdentityColumns()
Does this dialect support identity column key generation?- 返回:
- True if IDENTITY columns are supported; false otherwise.
-
supportsInsertSelectIdentity
boolean supportsInsertSelectIdentity()
Does the dialect support some form of inserting and selecting the generated IDENTITY value all in the same statement.- 返回:
- True if the dialect supports selecting the just generated IDENTITY in the insert statement.
-
hasDataTypeInIdentityColumn
boolean hasDataTypeInIdentityColumn()
Whether this dialect have an Identity clause added to the data type or a completely separate identity data type- 返回:
- boolean
-
appendIdentitySelectToInsert
String appendIdentitySelectToInsert(String insertString)
Provided wesupportsInsertSelectIdentity(), then attach the "select identity" clause to the insert statement. Note, ifsupportsInsertSelectIdentity()== false then the insert-string should be returned without modification.- 参数:
insertString- The insert command- 返回:
- The insert command with any necessary identity select clause attached.
-
getIdentitySelectString
String getIdentitySelectString(String table, String column, int type) throws MappingException
Get the select command to use to retrieve the last generated IDENTITY value for a particular table- 参数:
table- The table into which the insert was donecolumn- The PK column.type- TheTypestype code.- 返回:
- The appropriate select command
- 抛出:
MappingException- If IDENTITY generation is not supported.
-
getIdentityColumnString
String getIdentityColumnString(int type) throws MappingException
The syntax used during DDL to define a column as being an IDENTITY of a particular type.- 参数:
type- TheTypestype code.- 返回:
- The appropriate DDL fragment.
- 抛出:
MappingException- If IDENTITY generation is not supported.
-
getIdentityInsertString
String 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.- 返回:
- The appropriate keyword.
-
buildGetGeneratedKeysDelegate
GetGeneratedKeysDelegate buildGetGeneratedKeysDelegate(PostInsertIdentityPersister persister, Dialect dialect)
The Delegate for dealing with IDENTITY columns using JDBC3 getGeneratedKeys- 参数:
persister- The persisterdialect- The dialect against which to generate the delegate- 返回:
- the dialect specific GetGeneratedKeys delegate
-
-