Package com.sap.cds
Interface CdsDiffProcessor.DiffVisitor
- Enclosing interface:
- CdsDiffProcessor
@Beta
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 void
This method is called when theCdsDiffProcessor
detects 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 void
This method is called when theCdsDiffProcessor
detects a change between values of an element of an entitydefault void
This method is called when theCdsDiffProcessor
detects 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 theCdsDiffProcessor
detects 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
- theCdsElement
that represents the changed elementnewValue
- the new value of the element ornull
if the element is removed or explicitly set tonull
oldValue
- the old value of the element ornull
if the element is added
-
added
This method is called when theCdsDiffProcessor
detects 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 theCdsElement
that 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 theCdsDiffProcessor
detects 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 theCdsElement
that represents element that defines the association where change occurs.oldValue
- the content of the removed entity
-