Class CollectionChangeEvent

  • All Implemented Interfaces:
    Serializable
    Direct Known Subclasses:
    MapChangeEvent

    public class CollectionChangeEvent
    extends PropertyChangeEvent

    Purpose: Define a change event for collection types.

    Description: For any object that wishes to use either object change tracking or attribute change tracking, its collection attributes need to fire CollectionChangeEvent in the add or remove methods.

    Responsibilities: Create a CollectionChangeEvent for an object

    See Also:
    Serialized Form
    • Field Detail

      • ADD

        public static int ADD
      • REMOVE

        public static int REMOVE
    • Constructor Detail

      • CollectionChangeEvent

        public CollectionChangeEvent​(Object collectionOwner,
                                     String propertyName,
                                     Object collectionChanged,
                                     Object elementChanged,
                                     int changeType)
        Deprecated.
        as of EclipseLink 2.3
        PUBLIC: Create a CollectionChangeEvent for an object based on the property name, old value, new value and change type (add or remove)
      • CollectionChangeEvent

        public CollectionChangeEvent​(Object collectionOwner,
                                     String propertyName,
                                     Object collectionChanged,
                                     Object elementChanged,
                                     int changeType,
                                     boolean isChangeApplied)
        PUBLIC: Create a CollectionChangeEvent for an object based on the property name, old value, new value, change type (add or remove) and change applied.
      • CollectionChangeEvent

        public CollectionChangeEvent​(Object collectionOwner,
                                     String propertyName,
                                     Object collectionChanged,
                                     Object elementChanged,
                                     int changeType,
                                     Integer index)
        Deprecated.
        as of EclipseLink 2.3
        PUBLIC: Create a CollectionChangeEvent for an object based on the property name, old value, new value, change type (add or remove) and the index where the object is/was in the collection (list)
      • CollectionChangeEvent

        public CollectionChangeEvent​(Object collectionOwner,
                                     String propertyName,
                                     Object collectionChanged,
                                     Object elementChanged,
                                     int changeType,
                                     Integer index,
                                     boolean isSet)
        Deprecated.
        as of EclipseLink 2.3
        PUBLIC: Create a CollectionChangeEvent for an object based on the property name, old value, new value, change type (add or remove) and the index where the object is/was in the collection (list), flag indicating whether the change (addition or removal) is part of a single set operation on a list.
      • CollectionChangeEvent

        public CollectionChangeEvent​(Object collectionOwner,
                                     String propertyName,
                                     Object collectionChanged,
                                     Object elementChanged,
                                     int changeType,
                                     Integer index,
                                     boolean isSet,
                                     boolean isChangeApplied)
        PUBLIC: Create a CollectionChangeEvent for an object based on the property name, old value, new value, change type (add or remove) and the index where the object is/was in the collection (list), flag indicating whether the change (addition or removal) is part of a single set operation on a list, flag indicating whether the object has already been added or removed from the collection.
    • Method Detail

      • getChangeType

        public int getChangeType()
        INTERNAL: Return the change type
      • isSet

        public boolean isSet()
        INTERNAL: Return whether the event was raised by set operation on the list.
      • getIndex

        public Integer getIndex()
        INTERNAL: Return the index of the change in the collection
      • setIndex

        public void setIndex​(Integer index)
        INTERNAL: Set the index of the change in the collection
      • isChangeApplied

        public boolean isChangeApplied()
        INTERNAL: Return the value indicating if the object has been already added or removed from the collection.