Module org.eclipse.persistence.core
Class AttributeChangeListener
java.lang.Object
org.eclipse.persistence.internal.descriptors.changetracking.ObjectChangeListener
org.eclipse.persistence.internal.descriptors.changetracking.AttributeChangeListener
- All Implemented Interfaces:
PropertyChangeListener,Serializable,EventListener
- Direct Known Subclasses:
AggregateAttributeChangeListener
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:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ClassDescriptorprotected ObjectChangeSetprotected Objectprotected UnitOfWorkImplFields inherited from class org.eclipse.persistence.internal.descriptors.changetracking.ObjectChangeListener
hasChanges, ignoreDepth, ignoreEvents -
Constructor Summary
ConstructorsConstructorDescriptionAttributeChangeListener(ClassDescriptor descriptor, UnitOfWorkImpl uow, Object owner) INTERNAL: Create a AttributeChangeListener with a descriptor and unit of work -
Method Summary
Modifier and TypeMethodDescriptionvoidclearChanges(boolean forRefresh) INTERNAL: Clear the changes in this listenerINTERNAL: Return the descriptor associated with this listenerINTERNAL: Return the object change set associated with this listenerINTERNAL: Return the unit of work associated with this listenervoidINTERNAL: This method marks the object as changed.voidPUBLIC: 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 listenervoidINTERNAL: Set the unit of work associated with this listenertoString()Methods inherited from class org.eclipse.persistence.internal.descriptors.changetracking.ObjectChangeListener
hasChanges, ignoreEvents, processEvents
-
Field Details
-
descriptor
-
uow
-
objectChangeSet
-
owner
-
-
Constructor Details
-
AttributeChangeListener
INTERNAL: Create a AttributeChangeListener with a descriptor and unit of work
-
-
Method Details
-
getObjectChangeSet
INTERNAL: Return the object change set associated with this listener -
setObjectChangeSet
INTERNAL: Return the object change set associated with this listener -
getDescriptor
INTERNAL: Return the descriptor associated with this listener -
setDescriptor
INTERNAL: Set the descriptor associated with this listener -
getUnitOfWork
INTERNAL: Return the unit of work associated with this listener -
setUnitOfWork
INTERNAL: Set the unit of work associated with this listener -
propertyChange
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 interfacePropertyChangeListener- Overrides:
propertyChangein classObjectChangeListener
-
internalPropertyChange
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
-