Called from flush(). The return value determines whether the entity is updated
an array of property indices - the entity is dirty
and empty array - the entity is not dirty
null - use Hibernate's default dirty-checking algorithm
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.