Package org.javers.core.diff
Class Diff
java.lang.Object
org.javers.core.diff.Diff
- All Implemented Interfaces:
Serializable
Diff is a list of changes between two object graphs.
Typically, it is used to capture and trace changes made on domain objects. In this case, diff is done between previous and current state of an object graph.
Typically, it is used to capture and trace changes made on domain objects. In this case, diff is done between previous and current state of an object graph.
getChanges() returns a flat list of Changes
groupByObject() returns Changes grouped by objects
prettyPrint() prints Changes to the the nicely formatted String
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionFlat list of changesgetChanges(Predicate<Change> predicate) Changes that satisfies given filtergetChangesByType(Class<C> type) getObjectsByChangeType(Class<C> type) Selects new, removed or changed objectsgetObjectsWithChangedProperty(String propertyName) Selects objects with changed property for given property namegetPropertyChanges(String propertyName) Selects property changes for given property nameChanges grouped by entitiesbooleanfinal StringPrints the nicely formatted list of Changes.toString()
-
Method Details
-
getObjectsByChangeType
Selects new, removed or changed objects- Throws:
JaversException- AFFECTED_CDO_IS_NOT_AVAILABLE if diff is restored from a repository
-
getObjectsWithChangedProperty
Selects objects with changed property for given property name- Throws:
JaversException- AFFECTED_CDO_IS_NOT_AVAILABLE if diff is restored from repository,
-
getChanges
Flat list of changes -
groupByObject
Changes grouped by entities- Since:
- 3.9
-
getChanges
Changes that satisfies given filter -
getChangesByType
-
getPropertyChanges
Selects property changes for given property name -
hasChanges
public boolean hasChanges() -
prettyPrint
Prints the nicely formatted list of Changes. Alias totoString(). -
toString
-
changesSummary
-
countByType
-