Package org.hibernate.event.internal
Class DefaultDirtyCheckEventListener
java.lang.Object
org.hibernate.event.internal.DefaultDirtyCheckEventListener
- All Implemented Interfaces:
DirtyCheckEventListener
Determines if the current session holds modified state which
would be synchronized with the database if the session were
flushed. Approximately reproduces the logic that is executed
on an
AutoFlushEvent.- Implementation Note:
- Historically,
Session.isDirty()was implemented to actually execute a partial flush and then returntrueif there were any resulting operations to be executed. This was extremely inefficient and side-effecty. The new implementation below is non-perfect and probably misses some subtleties, but it's I guess OK to view it as an approximation.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidonDirtyCheck(DirtyCheckEvent event) Handle the given dirty-check event.
-
Constructor Details
-
DefaultDirtyCheckEventListener
public DefaultDirtyCheckEventListener()
-
-
Method Details
-
onDirtyCheck
Description copied from interface:DirtyCheckEventListenerHandle the given dirty-check event.- Specified by:
onDirtyCheckin interfaceDirtyCheckEventListener- Parameters:
event- The dirty-check event to be handled.- Throws:
HibernateException
-