Called when an object is detected to be dirty, during a flush. The interceptor may modify the detected
currentState, which will be propagated to both the database and the persistent object. Note that not all flushes end in actual synchronization with the database, in which case the new
currentState will be propagated to the object, but not necessarily (immediately) to the database. It is strongly recommended that the interceptor
not modify the
previousState.
NOTE: The indexes across the
currentState,
previousState,
propertyNames and
types arrays match.
@param entity The entity instance detected as being dirty and being flushed
@param id The identifier of the entity
@param currentState The entity's current state
@param previousState The entity's previous (load time) state.
@param propertyNames The names of the entity properties
@param types The types of the entity properties
@return {@code true} if the user modified the
currentState in any way.
@throws CallbackException Thrown if the interceptor encounters any problems handling the callback.