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:
  • 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 void propertyChange(PropertyChangeEvent evt)
      PUBLIC: This method turns marks the object as changed.
      Specified by:
      propertyChange in interface PropertyChangeListener
    • 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.