Class AttributeChangeListener
- java.lang.Object
-
- org.eclipse.persistence.internal.descriptors.changetracking.ObjectChangeListener
-
- org.eclipse.persistence.internal.descriptors.changetracking.AttributeChangeListener
-
- All Implemented Interfaces:
java.beans.PropertyChangeListener,java.io.Serializable,java.util.EventListener
- Direct Known Subclasses:
AggregateAttributeChangeListener
public class AttributeChangeListener extends ObjectChangeListener
Purpose: Define a listener for attribute change tracking.
Description: Listener is notified on a PropertyChangeEvent from the object it belongs to.
Responsibilities: Set the flag to true and build ObjectChangeSet that includes the ChangeRecords for the changed attributes.
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected ClassDescriptordescriptorprotected ObjectChangeSetobjectChangeSetprotected java.lang.Objectownerprotected UnitOfWorkImpluow-
Fields inherited from class org.eclipse.persistence.internal.descriptors.changetracking.ObjectChangeListener
hasChanges, ignoreDepth, ignoreEvents
-
-
Constructor Summary
Constructors Constructor Description AttributeChangeListener(ClassDescriptor descriptor, UnitOfWorkImpl uow, java.lang.Object owner)INTERNAL: Create a AttributeChangeListener with a descriptor and unit of work
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearChanges(boolean forRefresh)INTERNAL: Clear the changes in this listenerClassDescriptorgetDescriptor()INTERNAL: Return the descriptor associated with this listenerObjectChangeSetgetObjectChangeSet()INTERNAL: Return the object change set associated with this listenerUnitOfWorkImplgetUnitOfWork()INTERNAL: Return the unit of work associated with this listenervoidinternalPropertyChange(java.beans.PropertyChangeEvent evt)INTERNAL: This method marks the object as changed.voidpropertyChange(java.beans.PropertyChangeEvent evt)PUBLIC: This method creates the object change set if necessary.voidsetDescriptor(ClassDescriptor descriptor)INTERNAL: Set the descriptor associated with this listenervoidsetObjectChangeSet(ObjectChangeSet changeSet)INTERNAL: Return the object change set associated with this listenervoidsetUnitOfWork(UnitOfWorkImpl uow)INTERNAL: Set the unit of work associated with this listenerjava.lang.StringtoString()-
Methods inherited from class org.eclipse.persistence.internal.descriptors.changetracking.ObjectChangeListener
hasChanges, ignoreEvents, processEvents
-
-
-
-
Field Detail
-
descriptor
protected transient ClassDescriptor descriptor
-
uow
protected transient UnitOfWorkImpl uow
-
objectChangeSet
protected ObjectChangeSet objectChangeSet
-
owner
protected java.lang.Object owner
-
-
Constructor Detail
-
AttributeChangeListener
public AttributeChangeListener(ClassDescriptor descriptor, UnitOfWorkImpl uow, java.lang.Object owner)
INTERNAL: Create a AttributeChangeListener with a descriptor and unit of work
-
-
Method Detail
-
getObjectChangeSet
public ObjectChangeSet getObjectChangeSet()
INTERNAL: Return the object change set associated with this listener
-
setObjectChangeSet
public void setObjectChangeSet(ObjectChangeSet changeSet)
INTERNAL: Return the object change set associated with this listener
-
getDescriptor
public ClassDescriptor getDescriptor()
INTERNAL: Return the descriptor associated with this listener
-
setDescriptor
public void setDescriptor(ClassDescriptor descriptor)
INTERNAL: Set the descriptor associated with this listener
-
getUnitOfWork
public UnitOfWorkImpl getUnitOfWork()
INTERNAL: Return the unit of work associated with this listener
-
setUnitOfWork
public void setUnitOfWork(UnitOfWorkImpl uow)
INTERNAL: Set the unit of work associated with this listener
-
propertyChange
public void propertyChange(java.beans.PropertyChangeEvent evt)
PUBLIC: This method creates the object change set if necessary. It also creates/updates the change record based on the new value. Object should check the if newValue and oldValue are identical. If they are identical, do not create PropertyChangeEvent and call this method.- Specified by:
propertyChangein interfacejava.beans.PropertyChangeListener- Overrides:
propertyChangein classObjectChangeListener
-
internalPropertyChange
public void internalPropertyChange(java.beans.PropertyChangeEvent evt)
INTERNAL: This method marks the object as changed. This method is only called by EclipseLink- Overrides:
internalPropertyChangein classObjectChangeListener
-
clearChanges
public void clearChanges(boolean forRefresh)
INTERNAL: Clear the changes in this listener- Overrides:
clearChangesin classObjectChangeListener
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-