Package org.hibernate

Interface CustomEntityDirtinessStrategy


  • public interface CustomEntityDirtinessStrategy
    During a flush cycle, Hibernate needs to determine which of the entities associated with a Session. Dirty entities are the ones that get UPDATEed to the database.

    In some circumstances, that process of determining whether an entity is dirty can take a significant time as by default Hibernate must check each of the entity's attribute values one-by-one. Oftentimes applications already have knowledge of an entity's dirtiness and using that information instead would be more performant. The purpose of this contract then is to allow applications such a plug-in point.