Module org.eclipse.persistence.core
Class ObjectChangeListener
java.lang.Object
org.eclipse.persistence.internal.descriptors.changetracking.ObjectChangeListener
- All Implemented Interfaces:
PropertyChangeListener,Serializable,EventListener
- Direct Known Subclasses:
AggregateObjectChangeListener,AttributeChangeListener
Purpose: Define a listener for object change tracking.
Description: Listener is notified on a PropertyChangeEvent from the object it belongs to.
Responsibilities: Set the flag to true when there is any change in the object.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected intprotected boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclearChanges(boolean forRefresh) INTERNAL: Clear a change flag used in this method.booleanINTERNAL: This method should return true if the object has been changed and false otherwise.voidINTERNAL: This method will set this listener to ignore events not issues by EclipseLinkvoidINTERNAL: This method turns marks the object as changed.voidINTERNAL: This method will set this listener to ignore events not issues by EclipseLinkvoidPUBLIC: This method turns marks the object as changed.
-
Field Details
-
ignoreEvents
protected boolean ignoreEvents -
ignoreDepth
protected int ignoreDepth -
hasChanges
protected boolean hasChanges
-
-
Constructor Details
-
ObjectChangeListener
public ObjectChangeListener()INTERNAL: Create a ObjectChangeListener
-
-
Method Details
-
ignoreEvents
public void ignoreEvents()INTERNAL: This method will set this listener to ignore events not issues by EclipseLink -
processEvents
public void processEvents()INTERNAL: This method will set this listener to ignore events not issues by EclipseLink -
propertyChange
PUBLIC: This method turns marks the object as changed.- Specified by:
propertyChangein interfacePropertyChangeListener
-
internalPropertyChange
INTERNAL: This method turns marks the object as changed. This method is only called by EclipseLink -
hasChanges
public boolean hasChanges()INTERNAL: This method should return true if the object has been changed and false otherwise. Changed Objects will be compared for changes in the UnitOfWork commit process. Unchanged objects will not be compared. -
clearChanges
public void clearChanges(boolean forRefresh) INTERNAL: Clear a change flag used in this method. This will be called in TopLink's UnitOfWork commit process when a change set has been calculated for an object.
-