类 EntityInsertAction
- java.lang.Object
-
- org.hibernate.action.internal.EntityAction
-
- org.hibernate.action.internal.AbstractEntityInsertAction
-
- org.hibernate.action.internal.EntityInsertAction
-
public class EntityInsertAction extends AbstractEntityInsertAction
The action for performing an entity insertion, for entities not defined to use IDENTITY generation.- 另请参阅:
EntityIdentityInsertAction, 序列化表格
-
-
构造器概要
构造器 构造器 说明 EntityInsertAction(Serializable id, Object[] state, Object instance, Object version, EntityPersister persister, boolean isVersionIncrementDisabled, SharedSessionContractImplementor session)Constructs an EntityInsertAction.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected booleancacheAfterInsert(EntityDataAccess cache, Object ck)protected booleancacheInsert(EntityPersister persister, Object ck)voiddoAfterTransactionCompletion(boolean success, SharedSessionContractImplementor session)Perform whatever processing is encapsulated here after completion of the transaction.voidexecute()Execute this action.protected ObjectgetCacheEntry()protected EntityKeygetEntityKey()Returns theEntityKey.ObjectgetVersion()protected booleanhasPostCommitEventListeners()protected booleanisCachePutEnabled(EntityPersister persister, SharedSessionContractImplementor session)booleanisEarlyInsert()Does this insert action need to be executed as soon as possible (e.g., to generate an ID)?protected voidpostCommitInsert(boolean success)protected voidpostInsert()protected booleanpreInsert()protected voidsetCacheEntry(Object cacheEntry)voidsetVersion(Object version)-
从类继承的方法 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, needsAfterTransactionCompletion, setVeto, toString
-
-
-
-
构造器详细资料
-
EntityInsertAction
public EntityInsertAction(Serializable id, Object[] state, Object instance, Object version, EntityPersister persister, boolean isVersionIncrementDisabled, SharedSessionContractImplementor session)
Constructs an EntityInsertAction.- 参数:
id- The entity identifierstate- The current (extracted) entity stateinstance- The entity instanceversion- The current entity version valuepersister- The entity's persisterisVersionIncrementDisabled- Whether version incrementing is disabled.session- The session
-
-
方法详细资料
-
getVersion
public Object getVersion()
-
setVersion
public void setVersion(Object version)
-
getCacheEntry
protected Object getCacheEntry()
-
setCacheEntry
protected void setCacheEntry(Object cacheEntry)
-
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.
-
execute
public void execute() throws HibernateException从接口复制的说明:ExecutableExecute this action.- 抛出:
HibernateException- Indicates a problem during execution.
-
cacheInsert
protected boolean cacheInsert(EntityPersister persister, Object ck)
-
postInsert
protected void postInsert()
-
postCommitInsert
protected void postCommitInsert(boolean success)
-
preInsert
protected boolean preInsert()
-
doAfterTransactionCompletion
public void doAfterTransactionCompletion(boolean success, SharedSessionContractImplementor session) throws HibernateException从接口复制的说明: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.- 抛出:
HibernateException
-
cacheAfterInsert
protected boolean cacheAfterInsert(EntityDataAccess cache, Object ck)
-
hasPostCommitEventListeners
protected boolean hasPostCommitEventListeners()
- 指定者:
hasPostCommitEventListeners在类中EntityAction
-
isCachePutEnabled
protected boolean isCachePutEnabled(EntityPersister persister, SharedSessionContractImplementor session)
-
-