Package org.hibernate.boot.internal
Class DefaultCustomEntityDirtinessStrategy
java.lang.Object
org.hibernate.boot.internal.DefaultCustomEntityDirtinessStrategy
- All Implemented Interfaces:
CustomEntityDirtinessStrategy
public class DefaultCustomEntityDirtinessStrategy
extends Object
implements CustomEntityDirtinessStrategy
The default implementation of
CustomEntityDirtinessStrategy which does nada.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.hibernate.CustomEntityDirtinessStrategy
CustomEntityDirtinessStrategy.AttributeChecker, CustomEntityDirtinessStrategy.AttributeInformation, CustomEntityDirtinessStrategy.DirtyCheckContext -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanDirtyCheck(Object entity, EntityPersister persister, Session session) Is this strategy capable of telling whether the given entity is dirty? A return oftruemeans thatCustomEntityDirtinessStrategy.isDirty(java.lang.Object, org.hibernate.persister.entity.EntityPersister, org.hibernate.Session)will be called next as the definitive means to determine whether the entity is dirty.voidfindDirty(Object entity, EntityPersister persister, Session session, CustomEntityDirtinessStrategy.DirtyCheckContext dirtyCheckContext) Callback used to hook into Hibernate algorithm for determination of which attributes have changed.booleanisDirty(Object entity, EntityPersister persister, Session session) The callback used by Hibernate to determine if the given entity is dirty.voidresetDirty(Object entity, EntityPersister persister, Session session) Callback used by Hibernate to signal that the entity dirty flag should be cleared.
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
DefaultCustomEntityDirtinessStrategy
public DefaultCustomEntityDirtinessStrategy()
-
-
Method Details
-
canDirtyCheck
Description copied from interface:CustomEntityDirtinessStrategyIs this strategy capable of telling whether the given entity is dirty? A return oftruemeans thatCustomEntityDirtinessStrategy.isDirty(java.lang.Object, org.hibernate.persister.entity.EntityPersister, org.hibernate.Session)will be called next as the definitive means to determine whether the entity is dirty.- Specified by:
canDirtyCheckin interfaceCustomEntityDirtinessStrategy- Parameters:
entity- The entity to be checkedpersister- The persister corresponding to the given entitysession- The session from which this check originates.- Returns:
trueindicates the dirty check can be done;falseindicates it cannot.
-
isDirty
Description copied from interface:CustomEntityDirtinessStrategyThe callback used by Hibernate to determine if the given entity is dirty. Only called if the previousCustomEntityDirtinessStrategy.canDirtyCheck(java.lang.Object, org.hibernate.persister.entity.EntityPersister, org.hibernate.Session)returnedtrue- Specified by:
isDirtyin interfaceCustomEntityDirtinessStrategy- Parameters:
entity- The entity to check.persister- The persister corresponding to the given entitysession- The session from which this check originates.- Returns:
trueindicates the entity is dirty;falseindicates the entity is not dirty.
-
resetDirty
Description copied from interface:CustomEntityDirtinessStrategyCallback used by Hibernate to signal that the entity dirty flag should be cleared. Generally this happens after previous dirty changes were written to the database.- Specified by:
resetDirtyin interfaceCustomEntityDirtinessStrategy- Parameters:
entity- The entity to resetpersister- The persister corresponding to the given entitysession- The session from which this call originates.
-
findDirty
public void findDirty(Object entity, EntityPersister persister, Session session, CustomEntityDirtinessStrategy.DirtyCheckContext dirtyCheckContext) Description copied from interface:CustomEntityDirtinessStrategyCallback used to hook into Hibernate algorithm for determination of which attributes have changed. Applications wanting to hook in to this would call back into the givenCustomEntityDirtinessStrategy.DirtyCheckContext.doDirtyChecking(org.hibernate.CustomEntityDirtinessStrategy.AttributeChecker)method, passing along an appropriateCustomEntityDirtinessStrategy.AttributeCheckerimplementation.- Specified by:
findDirtyin interfaceCustomEntityDirtinessStrategy- Parameters:
entity- The entity being checkedpersister- The persister corresponding to the given entitysession- The session from which this call originates.dirtyCheckContext- The callback context
-