类 AbstractEntityInsertAction
- java.lang.Object
-
- org.hibernate.action.internal.EntityAction
-
- org.hibernate.action.internal.AbstractEntityInsertAction
-
public abstract class AbstractEntityInsertAction extends EntityAction
A base class for entity insert actions.- 作者:
- Gail Badner
- 另请参阅:
- 序列化表格
-
-
构造器概要
构造器 限定符 构造器 说明 protectedAbstractEntityInsertAction(Serializable id, Object[] state, Object instance, boolean isVersionIncrementDisabled, EntityPersister persister, SharedSessionContractImplementor session)Constructs an AbstractEntityInsertAction object.
-
方法概要
所有方法 实例方法 抽象方法 具体方法 修饰符和类型 方法 说明 voidafterDeserialize(SharedSessionContractImplementor session)Reconnect to session after deserialization...NonNullableTransientDependenciesfindNonNullableTransientEntities()Find the transient unsaved entity dependencies that are non-nullable.protected abstract EntityKeygetEntityKey()Returns theEntityKey.Object[]getState()Returns the entity state.voidhandleNaturalIdPostSaveNotifications(Serializable generatedId)Handle sending notifications needed for natural-id after savingprotected voidhandleNaturalIdPreSaveNotifications()Handle sending notifications needed for natural-id before savingabstract booleanisEarlyInsert()Does this insert action need to be executed as soon as possible (e.g., to generate an ID)?voidmakeEntityManaged()Make the entity "managed" by the persistence context.protected voidmarkExecuted()Indicate that the action has executed.protected voidnullifyTransientReferencesIfNotAlready()Nullifies any references to transient entities in the entity state maintained by this action.-
从类继承的方法 org.hibernate.action.internal.EntityAction
beforeExecutions, compareTo, eventSource, getAfterTransactionCompletionProcess, getBeforeTransactionCompletionProcess, getDelayedId, getEntityName, getId, getInstance, getPersister, getPropertySpaces, getSession, hasPostCommitEventListeners, isVeto, listenerGroup, needsAfterTransactionCompletion, setVeto, toString
-
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
从接口继承的方法 org.hibernate.action.spi.AfterTransactionCompletionProcess
doAfterTransactionCompletion
-
从接口继承的方法 org.hibernate.action.spi.Executable
execute
-
-
-
-
构造器详细资料
-
AbstractEntityInsertAction
protected AbstractEntityInsertAction(Serializable id, Object[] state, Object instance, boolean isVersionIncrementDisabled, EntityPersister persister, SharedSessionContractImplementor session)
Constructs an AbstractEntityInsertAction object.- 参数:
id- - the entity IDstate- - the entity stateinstance- - the entityisVersionIncrementDisabled- - true, if version increment should be disabled; false, otherwisepersister- - the entity persistersession- - the session
-
-
方法详细资料
-
getState
public Object[] getState()
Returns the entity state. NOTE: callingnullifyTransientReferencesIfNotAlready()can modify the entity state.- 返回:
- the entity state.
-
isEarlyInsert
public abstract boolean isEarlyInsert()
Does this insert action need to be executed as soon as possible (e.g., to generate an ID)?- 返回:
- true, if it needs to be executed as soon as possible; false, otherwise.
-
findNonNullableTransientEntities
public NonNullableTransientDependencies findNonNullableTransientEntities()
Find the transient unsaved entity dependencies that are non-nullable.- 返回:
- the transient unsaved entity dependencies that are non-nullable, or null if there are none.
-
nullifyTransientReferencesIfNotAlready
protected final void nullifyTransientReferencesIfNotAlready()
Nullifies any references to transient entities in the entity state maintained by this action. References to transient entities should be nullified when an entity is made "managed" or when this action is executed, whichever is first. References will only be nullified the first time this method is called for a this object, so it can safely be called both when the entity is made "managed" and when this action is executed.
-
makeEntityManaged
public final void makeEntityManaged()
Make the entity "managed" by the persistence context.
-
markExecuted
protected void markExecuted()
Indicate that the action has executed.
-
afterDeserialize
public void afterDeserialize(SharedSessionContractImplementor session)
从类复制的说明:EntityActionReconnect to session after deserialization...- 指定者:
afterDeserialize在接口中Executable- 覆盖:
afterDeserialize在类中EntityAction- 参数:
session- The session being deserialized
-
handleNaturalIdPreSaveNotifications
protected void handleNaturalIdPreSaveNotifications()
Handle sending notifications needed for natural-id before saving
-
handleNaturalIdPostSaveNotifications
public void handleNaturalIdPostSaveNotifications(Serializable generatedId)
Handle sending notifications needed for natural-id after saving- 参数:
generatedId- The generated entity identifier
-
-