|
EclipseLink 2.3.2, build 'v20111125-r10461' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.EventObject java.beans.PropertyChangeEvent org.eclipse.persistence.descriptors.changetracking.CollectionChangeEvent
public class CollectionChangeEvent
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
Field Summary | |
---|---|
static int |
ADD
|
protected int |
changeType
INTERNAL: Change type is either add or remove |
protected java.lang.Integer |
index
INTERNAL: index is the location of the change in the collection |
protected boolean |
isChangeApplied
INTERNAL: This flag will indicate if the object has already been removed or added to the collection before raising an event. |
protected boolean |
isSet
INTERNAL: Set operation in IndirectList results in raising two events: removal of the old value and addition of the new one at the same index: oldValue = list.set(i, newValue); raiseRemoveEvent(i, oldValue, true); raiseAddEvent(i, newValue, true); This flag indicates whether the event was raised by set operation on the list. |
static int |
REMOVE
|
Fields inherited from class java.util.EventObject |
---|
source |
Constructor Summary | |
---|---|
CollectionChangeEvent(java.lang.Object collectionOwner,
java.lang.String propertyName,
java.lang.Object collectionChanged,
java.lang.Object elementChanged,
int changeType)
Deprecated. as of EclipseLink 2.3 |
|
CollectionChangeEvent(java.lang.Object collectionOwner,
java.lang.String propertyName,
java.lang.Object collectionChanged,
java.lang.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(java.lang.Object collectionOwner,
java.lang.String propertyName,
java.lang.Object collectionChanged,
java.lang.Object elementChanged,
int changeType,
java.lang.Integer index)
Deprecated. as of EclipseLink 2.3 |
|
CollectionChangeEvent(java.lang.Object collectionOwner,
java.lang.String propertyName,
java.lang.Object collectionChanged,
java.lang.Object elementChanged,
int changeType,
java.lang.Integer index,
boolean isSet)
Deprecated. as of EclipseLink 2.3 |
|
CollectionChangeEvent(java.lang.Object collectionOwner,
java.lang.String propertyName,
java.lang.Object collectionChanged,
java.lang.Object elementChanged,
int changeType,
java.lang.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 Summary | |
---|---|
int |
getChangeType()
INTERNAL: Return the change type |
java.lang.Integer |
getIndex()
INTERNAL: Return the index of the change in the collection |
boolean |
isChangeApplied()
INTERNAL: Return the value indicating if the object has been already added or removed from the collection. |
boolean |
isSet()
INTERNAL: Return whether the event was raised by set operation on the list. |
void |
setIndex(java.lang.Integer index)
INTERNAL: Set the index of the change in the collection |
Methods inherited from class java.beans.PropertyChangeEvent |
---|
getNewValue, getOldValue, getPropagationId, getPropertyName, setPropagationId |
Methods inherited from class java.util.EventObject |
---|
getSource, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static int ADD
public static int REMOVE
protected int changeType
protected java.lang.Integer index
protected boolean isSet
protected boolean isChangeApplied
Constructor Detail |
---|
public CollectionChangeEvent(java.lang.Object collectionOwner, java.lang.String propertyName, java.lang.Object collectionChanged, java.lang.Object elementChanged, int changeType)
public CollectionChangeEvent(java.lang.Object collectionOwner, java.lang.String propertyName, java.lang.Object collectionChanged, java.lang.Object elementChanged, int changeType, boolean isChangeApplied)
public CollectionChangeEvent(java.lang.Object collectionOwner, java.lang.String propertyName, java.lang.Object collectionChanged, java.lang.Object elementChanged, int changeType, java.lang.Integer index)
public CollectionChangeEvent(java.lang.Object collectionOwner, java.lang.String propertyName, java.lang.Object collectionChanged, java.lang.Object elementChanged, int changeType, java.lang.Integer index, boolean isSet)
public CollectionChangeEvent(java.lang.Object collectionOwner, java.lang.String propertyName, java.lang.Object collectionChanged, java.lang.Object elementChanged, int changeType, java.lang.Integer index, boolean isSet, boolean isChangeApplied)
Method Detail |
---|
public int getChangeType()
public boolean isSet()
public java.lang.Integer getIndex()
public void setIndex(java.lang.Integer index)
public boolean isChangeApplied()
|
EclipseLink 2.3.2, build 'v20111125-r10461' API Reference | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |