Package com.sap.cds.impl.diff
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
changed
(Path path, CdsElement element, Object newValue, Object oldValue) 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
This method is called when theCdsDiffProcessor
detects a change between values of an element of an entity- Parameters:
path
- the path to the entity where the changed element is foundelement
- 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:
path
- path to the association where the change occurs.association
- the instance of theCdsElement
that represents element that defines the association where change occurs.newValue
- the content of the added entity
-
removed
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:
path
- path to the association where the change occurs.association
- the instance of theCdsElement
that represents element that defines the association where change occurs.oldValue
- the content of the removed entity
-