类 EntityIdentityInsertAction
- java.lang.Object
-
- org.hibernate.action.internal.EntityAction
-
- org.hibernate.action.internal.AbstractEntityInsertAction
-
- org.hibernate.action.internal.EntityIdentityInsertAction
-
public class EntityIdentityInsertAction extends AbstractEntityInsertAction
The action for performing entity insertions when entity is using IDENTITY column identifier generation- 另请参阅:
EntityInsertAction, 序列化表格
-
-
构造器概要
构造器 构造器 说明 EntityIdentityInsertAction(Object[] state, Object instance, EntityPersister persister, boolean isVersionIncrementDisabled, SharedSessionContractImplementor session, boolean isDelayed)Constructs an EntityIdentityInsertAction
-
方法概要
所有方法 实例方法 具体方法 已过时的方法 修饰符和类型 方法 说明 voiddoAfterTransactionCompletion(boolean success, SharedSessionContractImplementor session)Perform whatever processing is encapsulated here after completion of the transaction.voidexecute()Execute this action.protected EntityKeygenerateDelayedEntityKey()EntityKeygetDelayedEntityKey()已过时。No Hibernate code currently uses this methodprotected EntityKeygetEntityKey()Returns theEntityKey.SerializablegetGeneratedId()Access to the generated identifierprotected booleanhasPostCommitEventListeners()booleanisEarlyInsert()Does this insert action need to be executed as soon as possible (e.g., to generate an ID)?booleanneedsAfterTransactionCompletion()protected voidpostCommitInsert(boolean success)protected voidpostInsert()protected booleanpreInsert()protected voidsetEntityKey(EntityKey entityKey)protected voidsetGeneratedId(Serializable generatedId)-
从类继承的方法 org.hibernate.action.internal.AbstractEntityInsertAction
afterDeserialize, findNonNullableTransientEntities, getState, handleNaturalIdPostSaveNotifications, handleNaturalIdPreSaveNotifications, makeEntityManaged, markExecuted, nullifyTransientReferencesIfNotAlready
-
从类继承的方法 org.hibernate.action.internal.EntityAction
beforeExecutions, compareTo, eventSource, getAfterTransactionCompletionProcess, getBeforeTransactionCompletionProcess, getDelayedId, getEntityName, getId, getInstance, getPersister, getPropertySpaces, getSession, isVeto, listenerGroup, setVeto, toString
-
-
-
-
构造器详细资料
-
EntityIdentityInsertAction
public EntityIdentityInsertAction(Object[] state, Object instance, EntityPersister persister, boolean isVersionIncrementDisabled, SharedSessionContractImplementor session, boolean isDelayed)
Constructs an EntityIdentityInsertAction- 参数:
state- The current (extracted) entity stateinstance- The entity instancepersister- The entity persisterisVersionIncrementDisabled- Whether version incrementing is disabledsession- The sessionisDelayed- Are we in a situation which allows the insertion to be delayed?- 抛出:
HibernateException- Indicates an illegal state
-
-
方法详细资料
-
execute
public void execute() throws HibernateException从接口复制的说明:ExecutableExecute this action.- 抛出:
HibernateException- Indicates a problem during execution.
-
needsAfterTransactionCompletion
public boolean needsAfterTransactionCompletion()
-
hasPostCommitEventListeners
protected boolean hasPostCommitEventListeners()
- 指定者:
hasPostCommitEventListeners在类中EntityAction
-
doAfterTransactionCompletion
public void doAfterTransactionCompletion(boolean success, SharedSessionContractImplementor session)从接口复制的说明:AfterTransactionCompletionProcessPerform whatever processing is encapsulated here after completion of the transaction.- 参数:
success- Did the transaction complete successfully? True means it did.session- The session on which the transaction is completing.
-
postInsert
protected void postInsert()
-
postCommitInsert
protected void postCommitInsert(boolean success)
-
preInsert
protected boolean preInsert()
-
getGeneratedId
public final Serializable getGeneratedId()
Access to the generated identifier- 返回:
- The generated identifier
-
setGeneratedId
protected void setGeneratedId(Serializable generatedId)
-
getDelayedEntityKey
@Deprecated public EntityKey getDelayedEntityKey()
已过时。No Hibernate code currently uses this methodAccess to the delayed entity key- 返回:
- The delayed entity key
-
isEarlyInsert
public boolean isEarlyInsert()
从类复制的说明:AbstractEntityInsertActionDoes this insert action need to be executed as soon as possible (e.g., to generate an ID)?- 指定者:
isEarlyInsert在类中AbstractEntityInsertAction- 返回:
- true, if it needs to be executed as soon as possible; false, otherwise.
-
getEntityKey
protected EntityKey getEntityKey()
从类复制的说明:AbstractEntityInsertActionReturns theEntityKey.- 指定者:
getEntityKey在类中AbstractEntityInsertAction- 返回:
- the
EntityKey.
-
setEntityKey
protected void setEntityKey(EntityKey entityKey)
-
generateDelayedEntityKey
protected EntityKey generateDelayedEntityKey()
-
-