|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.eclipse.persistence.descriptors.changetracking.DeferredChangeDetectionPolicy
public class DeferredChangeDetectionPolicy
PUBLIC: A DeferredChangeDetectionPolicy defers all change detection to the UnitOfWork's change detection process. Essentially, the calculateChanges() method will run for all objects in a UnitOfWork. This is the default ObjectChangePolicy unless weaving is used.
| Constructor Summary | |
|---|---|
DeferredChangeDetectionPolicy()
|
|
| Method Summary | |
|---|---|
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 backUp,
boolean isNew,
org.eclipse.persistence.internal.sessions.UnitOfWorkChangeSet changeSet,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork,
ClassDescriptor descriptor,
boolean shouldRaiseEvent)
INTERNAL: calculateChanges creates a change set for a particular object. |
org.eclipse.persistence.internal.sessions.ObjectChangeSet |
calculateChangesForExistingObject(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 new object, avoids check for new since already know. |
org.eclipse.persistence.internal.sessions.ObjectChangeSet |
calculateChangesForNewObject(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 new object, avoids check for new since already know. |
void |
clearChanges(Object object,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow,
ClassDescriptor descriptor)
INTERNAL: This is a place holder for reseting the listener on one of the subclasses |
org.eclipse.persistence.internal.sessions.ObjectChangeSet |
createObjectChangeSet(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 |
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 |
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)
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: Set ChangeListener for the clone |
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 |
updateWithChanges(Object clone,
org.eclipse.persistence.internal.sessions.ObjectChangeSet objectChangeSet,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow,
ClassDescriptor descriptor)
INTERNAL: Clear changes in the ChangeListener of the clone |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DeferredChangeDetectionPolicy()
| Method Detail |
|---|
public org.eclipse.persistence.internal.sessions.ObjectChangeSet calculateChangesForNewObject(Object clone,
org.eclipse.persistence.internal.sessions.UnitOfWorkChangeSet changeSet,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork,
ClassDescriptor descriptor,
boolean shouldRaiseEvent)
calculateChangesForNewObject in interface ObjectChangePolicyclone - the Object to compute a change set forchangeSet - the change set to add changes todescriptor - the descriptor for this objectshouldRaiseEvent - indicates whether PreUpdate event should be risen (usually true)
public org.eclipse.persistence.internal.sessions.ObjectChangeSet calculateChangesForExistingObject(Object clone,
org.eclipse.persistence.internal.sessions.UnitOfWorkChangeSet changeSet,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork,
ClassDescriptor descriptor,
boolean shouldRaiseEvent)
calculateChangesForExistingObject in interface ObjectChangePolicyclone - the Object to compute a change set forchangeSet - the change set to add changes todescriptor - the descriptor for this objectshouldRaiseEvent - indicates whether PreUpdate event should be risen (usually true)
public org.eclipse.persistence.internal.sessions.ObjectChangeSet calculateChanges(Object clone,
Object backUp,
boolean isNew,
org.eclipse.persistence.internal.sessions.UnitOfWorkChangeSet changeSet,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork,
ClassDescriptor descriptor,
boolean shouldRaiseEvent)
calculateChanges in interface ObjectChangePolicyclone - the Object to compute a change set forbackUp - the old version of the object to use for comparisonchangeSet - the change set to add changes tosession - the current sessiondescriptor - the descriptor for this objectshouldRaiseEvent - indicates whether PreUpdate event should be risen (usually true)
public void clearChanges(Object object,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow,
ClassDescriptor descriptor)
clearChanges in interface ObjectChangePolicy
public org.eclipse.persistence.internal.sessions.ObjectChangeSet createObjectChangeSet(Object clone,
Object backUp,
org.eclipse.persistence.internal.sessions.UnitOfWorkChangeSet changeSet,
boolean isNew,
org.eclipse.persistence.internal.sessions.AbstractSession session,
ClassDescriptor descriptor)
public 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)
createObjectChangeSetThroughComparison in interface ObjectChangePolicypublic void dissableEventProcessing(Object changeTracker)
dissableEventProcessing in interface ObjectChangePolicypublic void enableEventProcessing(Object changeTracker)
enableEventProcessing in interface ObjectChangePolicy
public boolean shouldCompareExistingObjectForChange(Object object,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl unitOfWork,
ClassDescriptor descriptor)
shouldCompareExistingObjectForChange in interface ObjectChangePolicyobject - the object that will be comparedunitOfWork - the active unitOfWorkdescriptor - the descriptor for the current object
public Object buildBackupClone(Object clone,
org.eclipse.persistence.internal.descriptors.ObjectBuilder builder,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow)
buildBackupClone in interface ObjectChangePolicy
public void setAggregateChangeListener(Object parent,
Object aggregate,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow,
ClassDescriptor descriptor,
String mappingAttribute)
setAggregateChangeListener in interface ObjectChangePolicy
public PropertyChangeListener setChangeListener(Object clone,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow,
ClassDescriptor descriptor)
setChangeListener in interface ObjectChangePolicy
public void setChangeSetOnListener(org.eclipse.persistence.internal.sessions.ObjectChangeSet objectChangeSet,
Object clone)
setChangeSetOnListener in interface ObjectChangePolicy
public void updateWithChanges(Object clone,
org.eclipse.persistence.internal.sessions.ObjectChangeSet objectChangeSet,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow,
ClassDescriptor descriptor)
updateWithChanges in interface ObjectChangePolicy
public void raiseInternalPropertyChangeEvent(Object source,
String propertyName,
Object oldValue,
Object newValue)
raiseInternalPropertyChangeEvent in interface ObjectChangePolicy
public void revertChanges(Object clone,
ClassDescriptor descriptor,
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl uow,
Map cloneMapping)
revertChanges in interface ObjectChangePolicycloneMapping - may not be the same as what is in the uow
public void initialize(org.eclipse.persistence.internal.sessions.AbstractSession session,
ClassDescriptor descriptor)
initialize in interface ObjectChangePolicypublic boolean isDeferredChangeDetectionPolicy()
isDeferredChangeDetectionPolicy in interface ObjectChangePolicypublic boolean isObjectChangeTrackingPolicy()
isObjectChangeTrackingPolicy in interface ObjectChangePolicypublic boolean isAttributeChangeTrackingPolicy()
isAttributeChangeTrackingPolicy in interface ObjectChangePolicy
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||