public interface ObjectChangePolicy extends Serializable
DeferredChangeDetectionPolicy
,
ObjectChangeTrackingPolicy
,
AttributeChangeTrackingPolicy
Modifier and Type | Method and Description |
---|---|
Object |
buildBackupClone(Object clone,
org.eclipse.persistence.internal.descriptors.ObjectBuilder builder,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
INTERNAL:
Build back up clone.
|
org.eclipse.persistence.internal.sessions.ObjectChangeSet |
calculateChanges(Object clone,
Object backupClone,
boolean isNew,
org.eclipse.persistence.internal.sessions.UnitOfWorkChangeSet changes,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork,
ClassDescriptor descriptor,
boolean shouldRaiseEvent)
INTERNAL:
CalculateChanges creates a change set for an existing object.
|
org.eclipse.persistence.internal.sessions.ObjectChangeSet |
calculateChangesForExistingObject(Object clone,
org.eclipse.persistence.internal.sessions.UnitOfWorkChangeSet changes,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork,
ClassDescriptor descriptor,
boolean shouldRaiseEvent)
INTERNAL:
CalculateChanges creates a change set for an existing object.
|
org.eclipse.persistence.internal.sessions.ObjectChangeSet |
calculateChangesForNewObject(Object clone,
org.eclipse.persistence.internal.sessions.UnitOfWorkChangeSet changes,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork,
ClassDescriptor descriptor,
boolean shouldRaiseEvent)
INTERNAL:
CalculateChanges creates a change set for a new object.
|
void |
clearChanges(Object object,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow,
ClassDescriptor descriptor,
boolean forRefresh)
INTERNAL:
This is a place holder for reseting the listener on one of the subclasses
|
org.eclipse.persistence.internal.sessions.ObjectChangeSet |
createObjectChangeSetThroughComparison(Object clone,
Object backUp,
org.eclipse.persistence.internal.sessions.UnitOfWorkChangeSet changeSet,
boolean isNew,
org.eclipse.persistence.internal.sessions.AbstractSession session,
ClassDescriptor descriptor)
INTERNAL:
Create ObjectChangeSet through comparison.
|
void |
dissableEventProcessing(Object changeTracker)
INTERNAL:
This method is used to disable changetracking temporarily
|
void |
enableEventProcessing(Object changeTracker)
INTERNAL:
This method is used to enable changetracking temporarily
|
void |
initialize(org.eclipse.persistence.internal.sessions.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 listener in the case that a listener exists.
|
void |
revertChanges(Object clone,
ClassDescriptor descriptor,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow,
Map cloneMapping,
boolean forRefresh)
INTERNAL:
This method is used to revert an object within the unit of work
|
void |
setAggregateChangeListener(Object parent,
Object aggregate,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow,
ClassDescriptor descriptor,
String mappingAttribute)
INTERNAL:
Assign Changelistener to an aggregate object
|
PropertyChangeListener |
setChangeListener(Object clone,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow,
ClassDescriptor descriptor)
INTERNAL:
Assign appropriate ChangeListener to PropertyChangeListener based on the policy.
|
void |
setChangeSetOnListener(org.eclipse.persistence.internal.sessions.ObjectChangeSet objectChangeSet,
Object clone)
INTERNAL:
Set the ObjectChangeSet on the Listener, initially used for aggregate support
|
boolean |
shouldCompareExistingObjectForChange(Object object,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork,
ClassDescriptor descriptor)
INTERNAL:
Return true if the Object should be compared, false otherwise.
|
void |
updateListenerForSelfMerge(org.eclipse.persistence.internal.descriptors.changetracking.ObjectChangeListener listener,
ForeignReferenceMapping mapping,
Object source,
Object target,
org.eclipse.persistence.internal.sessions.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(Object clone,
org.eclipse.persistence.internal.sessions.ObjectChangeSet objectChangeSet,
org.eclipse.persistence.internal.sessions.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.
|
org.eclipse.persistence.internal.sessions.ObjectChangeSet calculateChangesForNewObject(Object clone, org.eclipse.persistence.internal.sessions.UnitOfWorkChangeSet changes, org.eclipse.persistence.internal.sessions.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)org.eclipse.persistence.internal.sessions.ObjectChangeSet calculateChangesForExistingObject(Object clone, org.eclipse.persistence.internal.sessions.UnitOfWorkChangeSet changes, org.eclipse.persistence.internal.sessions.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)org.eclipse.persistence.internal.sessions.ObjectChangeSet calculateChanges(Object clone, Object backupClone, boolean isNew, org.eclipse.persistence.internal.sessions.UnitOfWorkChangeSet changes, org.eclipse.persistence.internal.sessions.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)org.eclipse.persistence.internal.sessions.ObjectChangeSet createObjectChangeSetThroughComparison(Object clone, Object backUp, org.eclipse.persistence.internal.sessions.UnitOfWorkChangeSet changeSet, boolean isNew, org.eclipse.persistence.internal.sessions.AbstractSession session, ClassDescriptor descriptor)
void updateListenerForSelfMerge(org.eclipse.persistence.internal.descriptors.changetracking.ObjectChangeListener listener, ForeignReferenceMapping mapping, Object source, Object target, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork)
void dissableEventProcessing(Object changeTracker)
void enableEventProcessing(Object changeTracker)
void raiseInternalPropertyChangeEvent(Object source, String propertyName, Object oldValue, Object newValue)
void revertChanges(Object clone, ClassDescriptor descriptor, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, Map cloneMapping, boolean forRefresh)
void clearChanges(Object object, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, ClassDescriptor descriptor, boolean forRefresh)
void updateWithChanges(Object clone, org.eclipse.persistence.internal.sessions.ObjectChangeSet objectChangeSet, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, ClassDescriptor descriptor)
boolean shouldCompareExistingObjectForChange(Object object, org.eclipse.persistence.internal.sessions.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, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, ClassDescriptor descriptor, String mappingAttribute)
PropertyChangeListener setChangeListener(Object clone, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, ClassDescriptor descriptor)
void setChangeSetOnListener(org.eclipse.persistence.internal.sessions.ObjectChangeSet objectChangeSet, Object clone)
Object buildBackupClone(Object clone, org.eclipse.persistence.internal.descriptors.ObjectBuilder builder, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
void initialize(org.eclipse.persistence.internal.sessions.AbstractSession session, ClassDescriptor descriptor)
boolean isDeferredChangeDetectionPolicy()
boolean isObjectChangeTrackingPolicy()
boolean isAttributeChangeTrackingPolicy()
Copyright © 2007–2020 Eclipse.org - EclipseLink Project. All rights reserved.