public class AttributeChangeTrackingPolicy extends ObjectChangeTrackingPolicy
Constructor and Description |
---|
AttributeChangeTrackingPolicy() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
buildBackupClone(java.lang.Object clone,
org.eclipse.persistence.internal.descriptors.ObjectBuilder builder,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
INTERNAL:
Only build backup clone
|
org.eclipse.persistence.internal.sessions.ObjectChangeSet |
calculateChangesForExistingObject(java.lang.Object clone,
org.eclipse.persistence.internal.sessions.UnitOfWorkChangeSet changeSet,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork,
ClassDescriptor descriptor,
boolean shouldRaiseEvent)
INTERNAL:
PERF: Calculate change for the existing object, avoids check for new since already know.
|
org.eclipse.persistence.internal.sessions.ObjectChangeSet |
createObjectChangeSet(java.lang.Object clone,
java.lang.Object backUp,
org.eclipse.persistence.internal.sessions.UnitOfWorkChangeSet changeSet,
boolean isNew,
org.eclipse.persistence.internal.sessions.AbstractSession session,
ClassDescriptor descriptor)
INTERNAL:
Create ObjectChangeSet
|
boolean |
isAttributeChangeTrackingPolicy()
Used to track instances of the change policies without doing an instance of check
|
void |
revertChanges(java.lang.Object clone,
ClassDescriptor descriptor,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow,
java.util.Map cloneMapping,
boolean forRefresh)
INTERNAL:
Clear the change set in the change event listener.
|
void |
setAggregateChangeListener(java.lang.Object parent,
java.lang.Object aggregate,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow,
ClassDescriptor descriptor,
java.lang.String mappingAttribute)
INTERNAL:
Assign ChangeListener to an aggregate object
|
java.beans.PropertyChangeListener |
setChangeListener(java.lang.Object clone,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow,
ClassDescriptor descriptor)
INTERNAL:
Assign AttributeChangeListener to PropertyChangeListener
|
void |
setChangeSetOnListener(org.eclipse.persistence.internal.sessions.ObjectChangeSet objectChangeSet,
java.lang.Object clone)
INTERNAL:
Set the ObjectChangeSet on the Listener, initially used for aggregate support
|
void |
updateListenerForSelfMerge(org.eclipse.persistence.internal.descriptors.changetracking.ObjectChangeListener listener,
ForeignReferenceMapping mapping,
java.lang.Object source,
java.lang.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(java.lang.Object object,
org.eclipse.persistence.internal.sessions.ObjectChangeSet changeSet,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow,
ClassDescriptor descriptor)
INTERNAL:
Clear the change set in the change event listener.
|
clearChanges, dissableEventProcessing, enableEventProcessing, initialize, isDeferredChangeDetectionPolicy, isObjectChangeTrackingPolicy, raiseInternalPropertyChangeEvent, shouldCompareExistingObjectForChange
calculateChanges, calculateChangesForNewObject, createObjectChangeSetThroughComparison
public org.eclipse.persistence.internal.sessions.ObjectChangeSet calculateChangesForExistingObject(java.lang.Object clone, org.eclipse.persistence.internal.sessions.UnitOfWorkChangeSet changeSet, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork, ClassDescriptor descriptor, boolean shouldRaiseEvent)
calculateChangesForExistingObject
in interface ObjectChangePolicy
calculateChangesForExistingObject
in class DeferredChangeDetectionPolicy
clone
- the Object to compute a change set forchangeSet
- the change set to add changes tounitOfWork
- the current sessiondescriptor
- the descriptor for this objectshouldRaiseEvent
- indicates whether PreUpdate event should be risen (usually true)public org.eclipse.persistence.internal.sessions.ObjectChangeSet createObjectChangeSet(java.lang.Object clone, java.lang.Object backUp, org.eclipse.persistence.internal.sessions.UnitOfWorkChangeSet changeSet, boolean isNew, org.eclipse.persistence.internal.sessions.AbstractSession session, ClassDescriptor descriptor)
createObjectChangeSet
in class DeferredChangeDetectionPolicy
public boolean isAttributeChangeTrackingPolicy()
isAttributeChangeTrackingPolicy
in interface ObjectChangePolicy
isAttributeChangeTrackingPolicy
in class DeferredChangeDetectionPolicy
public void updateWithChanges(java.lang.Object object, org.eclipse.persistence.internal.sessions.ObjectChangeSet changeSet, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, ClassDescriptor descriptor)
updateWithChanges
in interface ObjectChangePolicy
updateWithChanges
in class DeferredChangeDetectionPolicy
public void updateListenerForSelfMerge(org.eclipse.persistence.internal.descriptors.changetracking.ObjectChangeListener listener, ForeignReferenceMapping mapping, java.lang.Object source, java.lang.Object target, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork)
updateListenerForSelfMerge
in interface ObjectChangePolicy
updateListenerForSelfMerge
in class DeferredChangeDetectionPolicy
public void revertChanges(java.lang.Object clone, ClassDescriptor descriptor, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, java.util.Map cloneMapping, boolean forRefresh)
revertChanges
in interface ObjectChangePolicy
revertChanges
in class DeferredChangeDetectionPolicy
cloneMapping
- may not be the same as what is in the uowpublic void setAggregateChangeListener(java.lang.Object parent, java.lang.Object aggregate, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, ClassDescriptor descriptor, java.lang.String mappingAttribute)
setAggregateChangeListener
in interface ObjectChangePolicy
setAggregateChangeListener
in class ObjectChangeTrackingPolicy
public java.beans.PropertyChangeListener setChangeListener(java.lang.Object clone, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow, ClassDescriptor descriptor)
setChangeListener
in interface ObjectChangePolicy
setChangeListener
in class ObjectChangeTrackingPolicy
public void setChangeSetOnListener(org.eclipse.persistence.internal.sessions.ObjectChangeSet objectChangeSet, java.lang.Object clone)
setChangeSetOnListener
in interface ObjectChangePolicy
setChangeSetOnListener
in class DeferredChangeDetectionPolicy
public java.lang.Object buildBackupClone(java.lang.Object clone, org.eclipse.persistence.internal.descriptors.ObjectBuilder builder, org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
buildBackupClone
in interface ObjectChangePolicy
buildBackupClone
in class DeferredChangeDetectionPolicy