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 Type
    Method
    Description
    default void
    added(Path path, CdsElement association, Map<String,Object> newValue)
    This method is called when the CdsDiffProcessor 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
    default void
    changed(Path path, CdsElement element, Object newValue, Object oldValue)
    This method is called when the CdsDiffProcessor detects a change between values of an element of an entity
    default void
    removed(Path path, CdsElement association, Map<String,Object> oldValue)
    This method is called when the CdsDiffProcessor 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 path, CdsElement element, Object newValue, Object oldValue)
      This method is called when the CdsDiffProcessor detects a change between values of an element of an entity
      Parameters:
      path - the path to the entity where the changed element is found
      element - the CdsElement that represents the changed element
      newValue - the new value of the element or null if the element is removed or explicitly set to null
      oldValue - the old value of the element or null if the element is added
    • added

      default void added(Path path, CdsElement association, Map<String,Object> newValue)
      This method is called when the CdsDiffProcessor 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 the CdsElement that represents element that defines the association where change occurs.
      newValue - the content of the added entity
    • removed

      default void removed(Path path, CdsElement association, Map<String,Object> oldValue)
      This method is called when the CdsDiffProcessor 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 the CdsElement that represents element that defines the association where change occurs.
      oldValue - the content of the removed entity