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.
Constructor and Description |
---|
AttributeChangeListener(ClassDescriptor descriptor,
UnitOfWorkImpl uow,
java.lang.Object owner)
INTERNAL:
Create a AttributeChangeListener with a descriptor and unit of work
|
Modifier and Type | Method and Description |
---|---|
void |
clearChanges(boolean forRefresh)
INTERNAL:
Clear the changes in this listener
|
ClassDescriptor |
getDescriptor()
INTERNAL:
Return the descriptor associated with this listener
|
ObjectChangeSet |
getObjectChangeSet()
INTERNAL:
Return the object change set associated with this listener
|
UnitOfWorkImpl |
getUnitOfWork()
INTERNAL:
Return the unit of work associated with this listener
|
void |
internalPropertyChange(java.beans.PropertyChangeEvent evt)
INTERNAL:
This method marks the object as changed.
|
void |
propertyChange(java.beans.PropertyChangeEvent evt)
PUBLIC:
This method creates the object change set if necessary.
|
void |
setDescriptor(ClassDescriptor descriptor)
INTERNAL:
Set the descriptor associated with this listener
|
void |
setObjectChangeSet(ObjectChangeSet changeSet)
INTERNAL:
Return the object change set associated with this listener
|
void |
setUnitOfWork(UnitOfWorkImpl uow)
INTERNAL:
Set the unit of work associated with this listener
|
java.lang.String |
toString() |
hasChanges, ignoreEvents, processEvents
public AttributeChangeListener(ClassDescriptor descriptor, UnitOfWorkImpl uow, java.lang.Object owner)
public ObjectChangeSet getObjectChangeSet()
public void setObjectChangeSet(ObjectChangeSet changeSet)
public ClassDescriptor getDescriptor()
public void setDescriptor(ClassDescriptor descriptor)
public UnitOfWorkImpl getUnitOfWork()
public void setUnitOfWork(UnitOfWorkImpl uow)
public void propertyChange(java.beans.PropertyChangeEvent evt)
propertyChange
in interface java.beans.PropertyChangeListener
propertyChange
in class ObjectChangeListener
public void internalPropertyChange(java.beans.PropertyChangeEvent evt)
internalPropertyChange
in class ObjectChangeListener
public void clearChanges(boolean forRefresh)
clearChanges
in class ObjectChangeListener
public java.lang.String toString()
toString
in class java.lang.Object
EclipseLink 2.6.3, "build v20160428-59c81c5" API Reference