Class ObjectChangeListener
- java.lang.Object
-
- org.eclipse.persistence.internal.descriptors.changetracking.ObjectChangeListener
-
- All Implemented Interfaces:
PropertyChangeListener
,Serializable
,EventListener
- Direct Known Subclasses:
AggregateObjectChangeListener
,AttributeChangeListener
public class ObjectChangeListener extends Object implements PropertyChangeListener, Serializable
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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
hasChanges
protected int
ignoreDepth
protected boolean
ignoreEvents
-
Constructor Summary
Constructors Constructor Description ObjectChangeListener()
INTERNAL: Create a ObjectChangeListener
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearChanges(boolean forRefresh)
INTERNAL: Clear a change flag used in this method.boolean
hasChanges()
INTERNAL: This method should return true if the object has been changed and false otherwise.void
ignoreEvents()
INTERNAL: This method will set this listener to ignore events not issues by EclipseLinkvoid
internalPropertyChange(PropertyChangeEvent evt)
INTERNAL: This method turns marks the object as changed.void
processEvents()
INTERNAL: This method will set this listener to ignore events not issues by EclipseLinkvoid
propertyChange(PropertyChangeEvent evt)
PUBLIC: This method turns marks the object as changed.
-
-
-
Method Detail
-
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 void propertyChange(PropertyChangeEvent evt)
PUBLIC: This method turns marks the object as changed.- Specified by:
propertyChange
in interfacePropertyChangeListener
-
internalPropertyChange
public void internalPropertyChange(PropertyChangeEvent evt)
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.
-
-