Package com.sap.cds
Interface CdsDiffProcessor.DiffVisitor
- Enclosing interface:
- CdsDiffProcessor
public static interface CdsDiffProcessor.DiffVisitor
A callback, which is called by the
CdsDiffProcessor on differences between two images of data.-
Method Summary
Modifier and TypeMethodDescriptiondefault voidThis method is called when theCdsDiffProcessordetects that a new entry is added to a collection of entities: a composition of many entities a cascading association to many entities the images, if the processor processes a collection of imagesdefault voidThis method is called when theCdsDiffProcessordetects a change between values of an element of an entitydefault voidThis method is called when theCdsDiffProcessordetects that an entry was removed from the collection of entities: a composition of many entities a cascading association to many entities the images, if the processor processes a collection of images
-
Method Details
-
changed
default void changed(Path newPath, Path oldPath, CdsElement element, Object newValue, Object oldValue) This method is called when theCdsDiffProcessordetects a change between values of an element of an entity- Parameters:
newPath- the newPath contains the path to the element in the new image of the entityoldPath- the oldPath contains the path to the element in the old image state of the entityelement- theCdsElementthat represents the changed elementnewValue- the new value of the element ornullif the element is removed or explicitly set tonulloldValue- the old value of the element ornullif the element is added
-
added
This method is called when theCdsDiffProcessordetects that a new entry is added to a collection of entities:- a composition of many entities
- a cascading association to many entities
- the images, if the processor processes a collection of images
The method is called for every added entry.
- Parameters:
newPath- path to the association where the change occurs in the new image of the entity.oldPath- path to the association where the change occurs in the old image of the entity.association- the instance of theCdsElementthat represents element that defines the association where change occurs.newValue- the content of the added entity
-
removed
default void removed(Path newPath, Path oldPath, CdsElement association, Map<String, Object> oldValue) This method is called when theCdsDiffProcessordetects that an entry was removed from the collection of entities:- a composition of many entities
- a cascading association to many entities
- the images, if the processor processes a collection of images
The method is called for every removed entry.
- Parameters:
newPath- path to the association where the change occurs in the new image of the entity.oldPath- path to the association where the change occurs in the old image of the entity.association- the instance of theCdsElementthat represents element that defines the association where change occurs.oldValue- the content of the removed entity
-