Package org.hibernate.engine.spi
Interface SelfDirtinessTracker
- All Superinterfaces:
PrimeAmongSecondarySupertypes
- All Known Subinterfaces:
ExtendedSelfDirtinessTracker
Contract for an entity to report that it tracks the dirtiness of its own state,
as opposed to needing Hibernate to perform state-diff dirty calculations.
Entity classes are free to implement this contract themselves. This contract is also introduced into the entity when using bytecode enhancement and requesting that entities track their own dirtiness.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Clear the stored dirty attributesGet access to the CollectionTrackerString[]
Retrieve the names of all the persistent attributes whose values have changed.boolean
Have any of the entity's persistent attributes changed?void
$$_hibernate_suspendDirtyTracking
(boolean suspend) Temporarily enable / disable dirty trackingvoid
$$_hibernate_trackChange
(String attributes) Adds persistent attribute to the set of values that have changeddefault SelfDirtinessTracker
Special internal contract to optimize type checkingMethods inherited from interface org.hibernate.engine.spi.PrimeAmongSecondarySupertypes
asCompositeOwner, asCompositeTracker, asHibernateProxy, asManaged, asManagedComposite, asManagedEntity, asManagedMappedSuperclass, asPersistentAttributeInterceptable, asProxyConfiguration
-
Method Details
-
$$_hibernate_hasDirtyAttributes
boolean $$_hibernate_hasDirtyAttributes()Have any of the entity's persistent attributes changed?- Returns:
true
indicates one or more persistent attributes have changed;false
indicates none have changed.
-
$$_hibernate_getDirtyAttributes
String[] $$_hibernate_getDirtyAttributes()Retrieve the names of all the persistent attributes whose values have changed.- Returns:
- An array of changed persistent attribute names
-
$$_hibernate_trackChange
Adds persistent attribute to the set of values that have changed -
$$_hibernate_clearDirtyAttributes
void $$_hibernate_clearDirtyAttributes()Clear the stored dirty attributes -
$$_hibernate_suspendDirtyTracking
void $$_hibernate_suspendDirtyTracking(boolean suspend) Temporarily enable / disable dirty tracking -
$$_hibernate_getCollectionTracker
CollectionTracker $$_hibernate_getCollectionTracker()Get access to the CollectionTracker -
asSelfDirtinessTracker
Special internal contract to optimize type checking- Specified by:
asSelfDirtinessTracker
in interfacePrimeAmongSecondarySupertypes
- Returns:
- this same instance
- See Also:
-