public interface ObjectChangePolicy
extends java.io.Serializable
DeferredChangeDetectionPolicy
,
ObjectChangeTrackingPolicy
,
AttributeChangeTrackingPolicy
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
buildBackupClone(java.lang.Object clone,
ObjectBuilder builder,
UnitOfWorkImpl uow)
INTERNAL:
Build back up clone.
|
ObjectChangeSet |
calculateChanges(java.lang.Object clone,
java.lang.Object backupClone,
boolean isNew,
UnitOfWorkChangeSet changes,
UnitOfWorkImpl unitOfWork,
ClassDescriptor descriptor,
boolean shouldRaiseEvent)
INTERNAL:
CalculateChanges creates a change set for an existing object.
|
ObjectChangeSet |
calculateChangesForExistingObject(java.lang.Object clone,
UnitOfWorkChangeSet changes,
UnitOfWorkImpl unitOfWork,
ClassDescriptor descriptor,
boolean shouldRaiseEvent)
INTERNAL:
CalculateChanges creates a change set for an existing object.
|
ObjectChangeSet |
calculateChangesForNewObject(java.lang.Object clone,
UnitOfWorkChangeSet changes,
UnitOfWorkImpl unitOfWork,
ClassDescriptor descriptor,
boolean shouldRaiseEvent)
INTERNAL:
CalculateChanges creates a change set for a new object.
|
void |
clearChanges(java.lang.Object object,
UnitOfWorkImpl uow,
ClassDescriptor descriptor,
boolean forRefresh)
INTERNAL:
This is a place holder for reseting the listener on one of the subclasses
|
ObjectChangeSet |
createObjectChangeSetThroughComparison(java.lang.Object clone,
java.lang.Object backUp,
UnitOfWorkChangeSet changeSet,
boolean isNew,
AbstractSession session,
ClassDescriptor descriptor)
INTERNAL:
Create ObjectChangeSet through comparison.
|
void |
dissableEventProcessing(java.lang.Object changeTracker)
INTERNAL:
This method is used to disable changetracking temporarily
|
void |
enableEventProcessing(java.lang.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(java.lang.Object source,
java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
INTERNAL:
This may cause a property change event to be raised to a listener in the case that a listener exists.
|
void |
revertChanges(java.lang.Object clone,
ClassDescriptor descriptor,
UnitOfWorkImpl uow,
java.util.Map cloneMapping,
boolean forRefresh)
INTERNAL:
This method is used to revert an object within the unit of work
|
void |
setAggregateChangeListener(java.lang.Object parent,
java.lang.Object aggregate,
UnitOfWorkImpl uow,
ClassDescriptor descriptor,
java.lang.String mappingAttribute)
INTERNAL:
Assign Changelistener to an aggregate object
|
java.beans.PropertyChangeListener |
setChangeListener(java.lang.Object clone,
UnitOfWorkImpl uow,
ClassDescriptor descriptor)
INTERNAL:
Assign appropriate ChangeListener to PropertyChangeListener based on the policy.
|
void |
setChangeSetOnListener(ObjectChangeSet objectChangeSet,
java.lang.Object clone)
INTERNAL:
Set the ObjectChangeSet on the Listener, initially used for aggregate support
|
boolean |
shouldCompareExistingObjectForChange(java.lang.Object object,
UnitOfWorkImpl unitOfWork,
ClassDescriptor descriptor)
INTERNAL:
Return true if the Object should be compared, false otherwise.
|
void |
updateListenerForSelfMerge(ObjectChangeListener listener,
ForeignReferenceMapping mapping,
java.lang.Object source,
java.lang.Object target,
UnitOfWorkImpl unitOfWork)
INTERNAL:
In cases where a relationship with detached or new entities is merged into itself previous changes may have been recorded for
the detached/new entity that need to be updated.
|
void |
updateWithChanges(java.lang.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 calculateChangesForNewObject(java.lang.Object clone, UnitOfWorkChangeSet changes, UnitOfWorkImpl unitOfWork, ClassDescriptor descriptor, boolean shouldRaiseEvent)
clone
- the Object to compute a change set forchanges
- the change set to add changes tounitOfWork
- the current sessiondescriptor
- the descriptor for this objectshouldRaiseEvent
- indicates whether PreUpdate event should be risen (usually true)ObjectChangeSet calculateChangesForExistingObject(java.lang.Object clone, UnitOfWorkChangeSet changes, UnitOfWorkImpl unitOfWork, ClassDescriptor descriptor, boolean shouldRaiseEvent)
clone
- the Object to compute a change set forchanges
- the change set to add changes tounitOfWork
- the current sessiondescriptor
- the descriptor for this objectshouldRaiseEvent
- indicates whether PreUpdate event should be risen (usually true)ObjectChangeSet calculateChanges(java.lang.Object clone, java.lang.Object backupClone, boolean isNew, UnitOfWorkChangeSet changes, UnitOfWorkImpl unitOfWork, ClassDescriptor descriptor, boolean shouldRaiseEvent)
clone
- the object to compute a change set forbackupClone
- the object used to compute changes fromisNew
- determines if the object is newchanges
- the change set to add changes tounitOfWork
- the current sessiondescriptor
- the descriptor for this objectshouldRaiseEvent
- indicates whether PreUpdate event should be risen (usually true)ObjectChangeSet createObjectChangeSetThroughComparison(java.lang.Object clone, java.lang.Object backUp, UnitOfWorkChangeSet changeSet, boolean isNew, AbstractSession session, ClassDescriptor descriptor)
void updateListenerForSelfMerge(ObjectChangeListener listener, ForeignReferenceMapping mapping, java.lang.Object source, java.lang.Object target, UnitOfWorkImpl unitOfWork)
void dissableEventProcessing(java.lang.Object changeTracker)
void enableEventProcessing(java.lang.Object changeTracker)
void raiseInternalPropertyChangeEvent(java.lang.Object source, java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
void revertChanges(java.lang.Object clone, ClassDescriptor descriptor, UnitOfWorkImpl uow, java.util.Map cloneMapping, boolean forRefresh)
void clearChanges(java.lang.Object object, UnitOfWorkImpl uow, ClassDescriptor descriptor, boolean forRefresh)
void updateWithChanges(java.lang.Object clone, ObjectChangeSet objectChangeSet, UnitOfWorkImpl uow, ClassDescriptor descriptor)
boolean shouldCompareExistingObjectForChange(java.lang.Object object, UnitOfWorkImpl unitOfWork, ClassDescriptor descriptor)
object
- the object that will be comparedunitOfWork
- the active unitOfWorkdescriptor
- the descriptor for the current objectvoid setAggregateChangeListener(java.lang.Object parent, java.lang.Object aggregate, UnitOfWorkImpl uow, ClassDescriptor descriptor, java.lang.String mappingAttribute)
java.beans.PropertyChangeListener setChangeListener(java.lang.Object clone, UnitOfWorkImpl uow, ClassDescriptor descriptor)
void setChangeSetOnListener(ObjectChangeSet objectChangeSet, java.lang.Object clone)
java.lang.Object buildBackupClone(java.lang.Object clone, ObjectBuilder builder, UnitOfWorkImpl uow)
void initialize(AbstractSession session, ClassDescriptor descriptor)
boolean isDeferredChangeDetectionPolicy()
boolean isObjectChangeTrackingPolicy()
boolean isAttributeChangeTrackingPolicy()
EclipseLink 2.6.3, "build v20160428-59c81c5" API Reference