Class ObjectChangeListener

  • All Implemented Interfaces:
    java.beans.PropertyChangeListener, java.io.Serializable, java.util.EventListener
    Direct Known Subclasses:
    AggregateObjectChangeListener, AttributeChangeListener

    public class ObjectChangeListener
    extends java.lang.Object
    implements java.beans.PropertyChangeListener, java.io.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
    • 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 EclipseLink
      void internalPropertyChange​(java.beans.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 EclipseLink
      void propertyChange​(java.beans.PropertyChangeEvent evt)
      PUBLIC: This method turns marks the object as changed.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • ignoreEvents

        protected boolean ignoreEvents
      • ignoreDepth

        protected int ignoreDepth
      • hasChanges

        protected boolean hasChanges
    • Constructor Detail

      • ObjectChangeListener

        public ObjectChangeListener()
        INTERNAL: Create a ObjectChangeListener
    • 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​(java.beans.PropertyChangeEvent evt)
        PUBLIC: This method turns marks the object as changed.
        Specified by:
        propertyChange in interface java.beans.PropertyChangeListener
      • internalPropertyChange

        public void internalPropertyChange​(java.beans.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.