类 IdentityColumnSupportImpl
- java.lang.Object
-
- org.hibernate.dialect.identity.IdentityColumnSupportImpl
-
- 所有已实现的接口:
IdentityColumnSupport
- 直接已知子类:
AbstractTransactSQLIdentityColumnSupport,Chache71IdentityColumnSupport,CUBRIDIdentityColumnSupport,DB2IdentityColumnSupport,H2IdentityColumnSupport,HANAIdentityColumnSupport,HSQLIdentityColumnSupport,InformixIdentityColumnSupport,Ingres9IdentityColumnSupport,JDataStoreIdentityColumnSupport,MimerSQLIdentityColumnSupport,MySQLIdentityColumnSupport,Oracle12cIdentityColumnSupport,PostgreSQL10IdentityColumnSupport,PostgreSQL81IdentityColumnSupport,Teradata14IdentityColumnSupport
public class IdentityColumnSupportImpl extends Object implements IdentityColumnSupport
- 作者:
- Andrea Boriero
-
-
构造器概要
构造器 构造器 说明 IdentityColumnSupportImpl()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 StringappendIdentitySelectToInsert(String insertString)Provided weIdentityColumnSupport.supportsInsertSelectIdentity(), 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
public boolean supportsIdentityColumns()
从接口复制的说明:IdentityColumnSupportDoes this dialect support identity column key generation?- 指定者:
supportsIdentityColumns在接口中IdentityColumnSupport- 返回:
- True if IDENTITY columns are supported; false otherwise.
-
supportsInsertSelectIdentity
public boolean supportsInsertSelectIdentity()
从接口复制的说明:IdentityColumnSupportDoes the dialect support some form of inserting and selecting the generated IDENTITY value all in the same statement.- 指定者:
supportsInsertSelectIdentity在接口中IdentityColumnSupport- 返回:
- True if the dialect supports selecting the just generated IDENTITY in the insert statement.
-
hasDataTypeInIdentityColumn
public boolean hasDataTypeInIdentityColumn()
从接口复制的说明:IdentityColumnSupportWhether this dialect have an Identity clause added to the data type or a completely separate identity data type- 指定者:
hasDataTypeInIdentityColumn在接口中IdentityColumnSupport- 返回:
- boolean
-
appendIdentitySelectToInsert
public String appendIdentitySelectToInsert(String insertString)
从接口复制的说明:IdentityColumnSupportProvided weIdentityColumnSupport.supportsInsertSelectIdentity(), then attach the "select identity" clause to the insert statement. Note, ifIdentityColumnSupport.supportsInsertSelectIdentity()== false then the insert-string should be returned without modification.- 指定者:
appendIdentitySelectToInsert在接口中IdentityColumnSupport- 参数:
insertString- The insert command- 返回:
- The insert command with any necessary identity select clause attached.
-
getIdentitySelectString
public 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在接口中IdentityColumnSupport- 参数:
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
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在接口中IdentityColumnSupport- 参数:
type- TheTypestype code.- 返回:
- The appropriate DDL fragment.
- 抛出:
MappingException- If IDENTITY generation is not supported.
-
getIdentityInsertString
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在接口中IdentityColumnSupport- 返回:
- The appropriate keyword.
-
buildGetGeneratedKeysDelegate
public GetGeneratedKeysDelegate buildGetGeneratedKeysDelegate(PostInsertIdentityPersister persister, Dialect dialect)
从接口复制的说明:IdentityColumnSupportThe Delegate for dealing with IDENTITY columns using JDBC3 getGeneratedKeys- 指定者:
buildGetGeneratedKeysDelegate在接口中IdentityColumnSupport- 参数:
persister- The persisterdialect- The dialect against which to generate the delegate- 返回:
- the dialect specific GetGeneratedKeys delegate
-
-