Class DifferenceHelper

    • Constructor Detail

      • DifferenceHelper

        public DifferenceHelper()
    • Method Detail

      • compareHomes

        public static DifferenceBetweenHomes compareHomes​(AdaptationHome leftHome,
                                                          AdaptationHome rightHome,
                                                          boolean isResolvedMode)
        Compares two dataspaces or snapshots and returns the result.
        Parameters:
        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.
        Throws:
        IllegalArgumentException - if one of the specified arguments is not defined.
      • compareInstances

        public static DifferenceBetweenInstances compareInstances​(Adaptation instanceOnLeft,
                                                                  Adaptation instanceOnRight,
                                                                  boolean isResolvedMode)
        Performs a comparison between two datasets.
        Parameters:
        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.
        Throws:
        IllegalArgumentException - if one of the specified arguments is not defined.
      • compareAdaptationTables

        public static DifferenceBetweenTables compareAdaptationTables​(AdaptationTable tableOnLeft,
                                                                      AdaptationTable tableOnRight,
                                                                      boolean isResolvedMode)
        Performs a comparison between two tables.
        Parameters:
        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.
        Throws:
        IllegalArgumentException - if one of the specified arguments is not defined or if tables do not have the same primary key definition.
      • compareOccurrences

        public static DifferenceBetweenOccurrences compareOccurrences​(Adaptation recordOnLeft,
                                                                      Adaptation recordOnRight,
                                                                      boolean isResolvedMode,
                                                                      boolean showDetails)
        Performs a comparison between two records.
        Parameters:
        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.
        Throws:
        IllegalArgumentException - if one of the specified arguments is not defined.