Package com.sap.cds
Interface CdsDiffProcessor
public interface CdsDiffProcessor
The CdsDiffProcessor allows to process two sets of nested maps of a CDS data that represent
the old and the new image of the data of the same type and notifies a
CdsDiffProcessor.DiffVisitor about differences.-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceA callback, which is called by theCdsDiffProcessoron differences between two images of data.static interface -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionadd(CdsDataProcessor.Filter filter, CdsDiffProcessor.DiffVisitor diffVisitor) Adds aCdsDiffProcessor.DiffVisitor, which is notified about the differences in elements that match a given filter.default CdsDiffProcessoradd(CdsDiffProcessor.DiffVisitor diffVisitor) Adds an object implementing interfaceCdsDiffProcessor.DiffVisitor, which is notified about the differences in all elements.static CdsDiffProcessorcreate()Creates a new CdsDiffProcessor instance.voidprocess(Iterable<? extends Map<String, Object>> newImages, Iterable<? extends Map<String, Object>> oldImages, CdsStructuredType type) Runs the CdsDiffProcessor on the new and old images of the data represented as a collection of entries or an instances of theResultvoidRuns the CdsDiffProcessor on the new and old image of the data.
-
Field Details
-
factory
-
-
Method Details
-
create
Creates a new CdsDiffProcessor instance.- Returns:
- a DiffProcessor instance
-
add
Adds an object implementing interfaceCdsDiffProcessor.DiffVisitor, which is notified about the differences in all elements.- Parameters:
diffVisitor- the instance of the object that will observe found changes- Returns:
- this instance of the
CdsDiffProcessor
-
add
Adds aCdsDiffProcessor.DiffVisitor, which is notified about the differences in elements that match a given filter.- Parameters:
filter- the filter predicate (seeCdsDataProcessor.Filter)diffVisitor- the visitor that will be notified about changes- Returns:
- this instance of the
CdsDiffProcessor
-
process
Runs the CdsDiffProcessor on the new and old image of the data.- Parameters:
newImage- new image of the dataoldImage- old image of the datatype- the type of the data
-
process
void process(Iterable<? extends Map<String, Object>> newImages, Iterable<? extends Map<String, Object>> oldImages, CdsStructuredType type) Runs the CdsDiffProcessor on the new and old images of the data represented as a collection of entries or an instances of theResult- Parameters:
newImages- sequence of the new images of the dataoldImages- sequence of the old images of the datatype- the type of the data
-
forDeepTraversal
CdsDiffProcessor forDeepTraversal()
-