public class DifferenceHelper extends Object
When resolved mode is used:
Conversely, disabling the resolved mode means to focus on the raw persisted data:
AdaptationValue.INHERIT_VALUE
(result is independent of the values actually inherited).
ignored
are not omitted from comparisons, even if their values
contain
differences.NodeComparisonMode
Constructor and Description |
---|
DifferenceHelper() |
Modifier and Type | Method and Description |
---|---|
static DifferenceBetweenTables |
compareAdaptationTables(AdaptationTable tableOnLeft,
AdaptationTable tableOnRight,
boolean isResolvedMode)
Performs a comparison between two tables.
|
static DifferenceBetweenHomes |
compareHomes(AdaptationHome leftHome,
AdaptationHome rightHome,
boolean isResolvedMode)
Compares two dataspaces or snapshots and returns the result.
|
static DifferenceBetweenInstances |
compareInstances(Adaptation instanceOnLeft,
Adaptation instanceOnRight,
boolean isResolvedMode)
Performs a comparison between two datasets.
|
static DifferenceBetweenOccurrences |
compareOccurrences(Adaptation recordOnLeft,
Adaptation recordOnRight,
boolean isResolvedMode)
Performs a comparison between two records.
|
static DifferenceBetweenOccurrences |
compareOccurrences(Adaptation recordOnLeft,
Adaptation recordOnRight,
boolean isResolvedMode,
boolean showDetails)
Performs a comparison between two records.
|
public static DifferenceBetweenHomes compareHomes(AdaptationHome leftHome, AdaptationHome rightHome, boolean isResolvedMode)
leftHome
- dataspace or snapshot on left to use for comparison.rightHome
- dataspace or snapshot on right to use for comparison.isResolvedMode
- specifies whether or not the comparison is in resolved mode.IllegalArgumentException
- if one of the specified arguments is not defined.public static DifferenceBetweenInstances compareInstances(Adaptation instanceOnLeft, Adaptation instanceOnRight, boolean isResolvedMode)
instanceOnLeft
- dataset on left to use for comparison.instanceOnRight
- dataset on right to use for comparison.isResolvedMode
- specifies whether the comparison is in resolved mode.IllegalArgumentException
- if one of the specified arguments is not defined.public static DifferenceBetweenTables compareAdaptationTables(AdaptationTable tableOnLeft, AdaptationTable tableOnRight, boolean isResolvedMode)
tableOnLeft
- table on left to use for comparison.tableOnRight
- table on right to use for comparison.isResolvedMode
- specifies whether the comparison is in resolved mode.IllegalArgumentException
- if one of the specified arguments is not defined or
if tables do not have the same primary key definition.public static DifferenceBetweenOccurrences compareOccurrences(Adaptation recordOnLeft, Adaptation recordOnRight, boolean isResolvedMode)
This method is equivalent to
compareOccurrences(recordOnLeft,
recordOnRight, isResolvedMode, false)
.
That is, it does show details on terminal complex nodes.
recordOnLeft
- record on left to use for comparison.recordOnRight
- record on right to use for comparison.isResolvedMode
- specifies whether the comparison is in resolved mode.IllegalArgumentException
- if one of the specified arguments is not defined.public static DifferenceBetweenOccurrences compareOccurrences(Adaptation recordOnLeft, Adaptation recordOnRight, boolean isResolvedMode, boolean showDetails)
recordOnLeft
- record on left to use for comparison.recordOnRight
- record on right to use for comparison.isResolvedMode
- specifies whether the comparison is in resolved mode.showDetails
- if true
, differences on terminal complex nodes
are detailed; if false
, comparison stops on terminal node elements even
if they are complex.
showDetails
is forced to false
if isResolvedMode
is set to false
.IllegalArgumentException
- if one of the specified arguments is not defined.