类 DefaultFlushEntityEventListener
- java.lang.Object
-
- org.hibernate.event.internal.DefaultFlushEntityEventListener
-
public class DefaultFlushEntityEventListener extends Object implements FlushEntityEventListener, CallbackRegistryConsumer
An event that occurs for each entity instance at flush time- 作者:
- Gavin King
- 另请参阅:
- 序列化表格
-
-
构造器概要
构造器 构造器 说明 DefaultFlushEntityEventListener()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 voidcheckId(Object object, EntityPersister persister, Serializable id, SessionImplementor session)make sure user didn't mangle the idprotected voiddirtyCheck(FlushEntityEvent event)Perform a dirty check, and attach the results to the eventprotected booleanhandleInterception(FlushEntityEvent event)voidinjectCallbackRegistry(CallbackRegistry callbackRegistry)Injection of the CallbackRegistryprotected booleaninvokeInterceptor(SessionImplementor session, Object entity, EntityEntry entry, Object[] values, EntityPersister persister)protected booleanisUpdateNecessary(FlushEntityEvent event)Performs all necessary checking to determine if an entity needs an SQL update to synchronize its state to the database.voidonFlushEntity(FlushEntityEvent event)Flushes a single entity's state to the database, by scheduling an update action, if necessary
-
-
-
方法详细资料
-
injectCallbackRegistry
public void injectCallbackRegistry(CallbackRegistry callbackRegistry)
从接口复制的说明:CallbackRegistryConsumerInjection of the CallbackRegistry- 指定者:
injectCallbackRegistry在接口中CallbackRegistryConsumer- 参数:
callbackRegistry- The CallbackRegistry
-
checkId
public void checkId(Object object, EntityPersister persister, Serializable id, SessionImplementor session) throws HibernateException
make sure user didn't mangle the id
-
onFlushEntity
public void onFlushEntity(FlushEntityEvent event) throws HibernateException
Flushes a single entity's state to the database, by scheduling an update action, if necessary- 指定者:
onFlushEntity在接口中FlushEntityEventListener- 抛出:
HibernateException
-
handleInterception
protected boolean handleInterception(FlushEntityEvent event)
-
invokeInterceptor
protected boolean invokeInterceptor(SessionImplementor session, Object entity, EntityEntry entry, Object[] values, EntityPersister persister)
-
isUpdateNecessary
protected final boolean isUpdateNecessary(FlushEntityEvent event) throws HibernateException
Performs all necessary checking to determine if an entity needs an SQL update to synchronize its state to the database. Modifies the event by side-effect! Note: this method is quite slow, avoid calling if possible!
-
dirtyCheck
protected void dirtyCheck(FlushEntityEvent event) throws HibernateException
Perform a dirty check, and attach the results to the event
-
-