类 DefaultPersistEventListener
- java.lang.Object
-
- org.hibernate.event.internal.AbstractReassociateEventListener
-
- org.hibernate.event.internal.AbstractSaveEventListener
-
- org.hibernate.event.internal.DefaultPersistEventListener
-
- 所有已实现的接口:
Serializable,PersistEventListener,CallbackRegistryConsumer
public class DefaultPersistEventListener extends AbstractSaveEventListener implements PersistEventListener, CallbackRegistryConsumer
Defines the default create event listener used by hibernate for creating transient entities in response to generated create events.- 作者:
- Gavin King
- 另请参阅:
- 序列化表格
-
-
构造器概要
构造器 构造器 说明 DefaultPersistEventListener()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected voidentityIsPersistent(PersistEvent event, Map createCache)protected voidentityIsTransient(PersistEvent event, Map createCache)Handle the given create event.protected CascadingActiongetCascadeAction()voidonPersist(PersistEvent event)Handle the given create event.voidonPersist(PersistEvent event, Map createCache)Handle the given create event.-
从类继承的方法 org.hibernate.event.internal.AbstractSaveEventListener
cascadeAfterSave, cascadeBeforeSave, getMergeMap, injectCallbackRegistry, invokeSaveLifecycle, isVersionIncrementDisabled, performSave, performSaveOrReplicate, saveWithGeneratedId, saveWithRequestedId, substituteValuesIfNecessary, visitCollectionsBeforeSave
-
从类继承的方法 org.hibernate.event.internal.AbstractReassociateEventListener
reassociate
-
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
从接口继承的方法 org.hibernate.jpa.event.spi.CallbackRegistryConsumer
injectCallbackRegistry
-
-
-
-
方法详细资料
-
getCascadeAction
protected CascadingAction getCascadeAction()
-
onPersist
public void onPersist(PersistEvent event) throws HibernateException
Handle the given create event.- 指定者:
onPersist在接口中PersistEventListener- 参数:
event- The create event to be handled.- 抛出:
HibernateException
-
onPersist
public void onPersist(PersistEvent event, Map createCache) throws HibernateException
Handle the given create event.- 指定者:
onPersist在接口中PersistEventListener- 参数:
event- The create event to be handled.- 抛出:
HibernateException
-
entityIsPersistent
protected void entityIsPersistent(PersistEvent event, Map createCache)
-
entityIsTransient
protected void entityIsTransient(PersistEvent event, Map createCache)
Handle the given create event.- 参数:
event- The save event to be handled.createCache- The copy cache of entity instance to merge/copy instance.
-
-