类 AbstractFlushingEventListener
- java.lang.Object
-
- org.hibernate.event.internal.AbstractFlushingEventListener
-
- 所有已实现的接口:
Serializable,JpaBootstrapSensitive
public abstract class AbstractFlushingEventListener extends Object implements JpaBootstrapSensitive, Serializable
A convenience base class for listeners whose functionality results in flushing.- 作者:
- Steve Ebersole
- 另请参阅:
- 序列化表格
-
-
构造器概要
构造器 构造器 说明 AbstractFlushingEventListener()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected voidflushEverythingToExecutions(FlushEvent event)Coordinates the processing necessary to get things ready for executions as db calls by preping the session caches and moving the appropriate entities and collections to their respective execution queues.protected ObjectgetAnything()protected CascadingActiongetCascadingAction()protected voidperformExecutions(EventSource session)Execute all SQL (and second-level cache updates) in a special order so that foreign-key constraints cannot be violated: Inserts, in the order they were performed Updates Deletion of collection elements Insertion of collection elements Deletes, in the order they were performedprotected voidpostFlush(SessionImplementor session)1.protected voidpostPostFlush(SessionImplementor session)voidwasJpaBootstrap(boolean wasJpaBootstrap)
-
-
-
方法详细资料
-
wasJpaBootstrap
public void wasJpaBootstrap(boolean wasJpaBootstrap)
- 指定者:
wasJpaBootstrap在接口中JpaBootstrapSensitive
-
flushEverythingToExecutions
protected void flushEverythingToExecutions(FlushEvent event) throws HibernateException
Coordinates the processing necessary to get things ready for executions as db calls by preping the session caches and moving the appropriate entities and collections to their respective execution queues.- 参数:
event- The flush event.- 抛出:
HibernateException- Error flushing caches to execution queues.
-
getAnything
protected Object getAnything()
-
getCascadingAction
protected CascadingAction getCascadingAction()
-
performExecutions
protected void performExecutions(EventSource session)
Execute all SQL (and second-level cache updates) in a special order so that foreign-key constraints cannot be violated:- Inserts, in the order they were performed
- Updates
- Deletion of collection elements
- Insertion of collection elements
- Deletes, in the order they were performed
- 参数:
session- The session being flushed
-
postFlush
protected void postFlush(SessionImplementor session) throws HibernateException
1. Recreate the collection key -> collection map 2. rebuild the collection entries 3. call Interceptor.postFlush()
-
postPostFlush
protected void postPostFlush(SessionImplementor session)
-
-