public interface ObjectChangePolicy extends Serializable
DeferredChangeDetectionPolicy
,
ObjectChangeTrackingPolicy
,
AttributeChangeTrackingPolicy
Modifier and Type | Method and Description |
---|---|
Object |
buildBackupClone(Object clone,
ObjectBuilder builder,
UnitOfWorkImpl uow)
INTERNAL:
Build back up clone.
|
ObjectChangeSet |
calculateChanges(Object clone,
Object backUp,
UnitOfWorkChangeSet changes,
AbstractSession session,
ClassDescriptor descriptor,
boolean shouldRiseEvent)
INTERNAL:
calculateChanges creates a change set for a particular object
|
void |
clearChanges(Object object,
UnitOfWorkImpl uow,
ClassDescriptor descriptor)
INTERNAL:
This is a place holder for reseting the listener on one of the subclasses
|
ObjectChangeSet |
createObjectChangeSetThroughComparison(Object clone,
Object backUp,
UnitOfWorkChangeSet changeSet,
boolean isNew,
AbstractSession session,
ClassDescriptor descriptor)
INTERNAL:
Create ObjectChangeSet through comparison.
|
void |
dissableEventProcessing(Object changeTracker)
INTERNAL:
This method is used to dissable changetracking temporarily
|
void |
enableEventProcessing(Object changeTracker)
INTERNAL:
This method is used to enable changetracking temporarily
|
void |
initialize(AbstractSession session,
ClassDescriptor descriptor)
INTERNAL:
initialize the Policy
|
boolean |
isAttributeChangeTrackingPolicy()
Used to track instances of the change policies without doing an instance of check
|
boolean |
isDeferredChangeDetectionPolicy()
Used to track instances of the change policies without doing an instance of check
|
boolean |
isObjectChangeTrackingPolicy()
Used to track instances of the change policies without doing an instance of check
|
void |
raiseInternalPropertyChangeEvent(Object source,
String propertyName,
Object oldValue,
Object newValue)
INTERNAL:
This may cause a property change event to be raised to a listner in the case that a listener exists.
|
void |
revertChanges(Object clone,
ClassDescriptor descriptor,
UnitOfWorkImpl uow,
IdentityHashtable cloneMapping)
INTERNAL:
This method is used to revert an object within the unit of work
|
void |
setAggregateChangeListener(Object parent,
Object aggregate,
UnitOfWorkImpl uow,
ClassDescriptor descriptor,
String mappingAttribute)
INTERNAL:
Assign Changelistner to an aggregate object
|
void |
setChangeListener(Object clone,
UnitOfWorkImpl uow,
ClassDescriptor descriptor)
INTERNAL:
Assign appropriate ChangeListener to PropertyChangeListener based on the policy.
|
void |
setChangeSetOnListener(ObjectChangeSet objectChangeSet,
Object clone)
INTERNAL:
Set the ObjectChangeSet on the Listener, initially used for aggregate support
|
boolean |
shouldCompareForChange(Object object,
UnitOfWorkImpl unitOfWork,
ClassDescriptor descriptor)
INTERNAL:
Return true if the Object should be compared, false otherwise.
|
void |
updateWithChanges(Object clone,
ObjectChangeSet objectChangeSet,
UnitOfWorkImpl uow,
ClassDescriptor descriptor)
INTERNAL:
This method is used internally to rest the policies back to original state
This is used when the clones are to be reused.
|
ObjectChangeSet calculateChanges(Object clone, Object backUp, UnitOfWorkChangeSet changes, AbstractSession session, ClassDescriptor descriptor, boolean shouldRiseEvent)
clone
- the Object to compute a change set forbackUp
- the old version of the object to use for comparisonchanges
- the change set to add changes tosession
- the current sessiondescriptor
- the descriptor for this objectshouldRiseEvent
- indicates whether PreUpdate event should be risen (usually true)ObjectChangeSet createObjectChangeSetThroughComparison(Object clone, Object backUp, UnitOfWorkChangeSet changeSet, boolean isNew, AbstractSession session, ClassDescriptor descriptor)
void dissableEventProcessing(Object changeTracker)
void enableEventProcessing(Object changeTracker)
void raiseInternalPropertyChangeEvent(Object source, String propertyName, Object oldValue, Object newValue)
void revertChanges(Object clone, ClassDescriptor descriptor, UnitOfWorkImpl uow, IdentityHashtable cloneMapping)
void clearChanges(Object object, UnitOfWorkImpl uow, ClassDescriptor descriptor)
void updateWithChanges(Object clone, ObjectChangeSet objectChangeSet, UnitOfWorkImpl uow, ClassDescriptor descriptor)
boolean shouldCompareForChange(Object object, UnitOfWorkImpl unitOfWork, ClassDescriptor descriptor)
object
- the object that will be comparedunitOfWork
- the active unitOfWorkdescriptor
- the descriptor for the current objectvoid setAggregateChangeListener(Object parent, Object aggregate, UnitOfWorkImpl uow, ClassDescriptor descriptor, String mappingAttribute)
void setChangeListener(Object clone, UnitOfWorkImpl uow, ClassDescriptor descriptor)
void setChangeSetOnListener(ObjectChangeSet objectChangeSet, Object clone)
Object buildBackupClone(Object clone, ObjectBuilder builder, UnitOfWorkImpl uow)
void initialize(AbstractSession session, ClassDescriptor descriptor)
boolean isDeferredChangeDetectionPolicy()
boolean isObjectChangeTrackingPolicy()
boolean isAttributeChangeTrackingPolicy()
Copyright © 2024. All rights reserved.