com.softwareag.mdm.service.comparison
Class DifferenceHelper

java.lang.Object
  extended bycom.softwareag.mdm.service.comparison.DifferenceHelper

public class DifferenceHelper
extends Object


Constructor Summary
DifferenceHelper()
           
 
Method Summary
static DifferenceBetweenHomes compareHomes(AdaptationHome leftHome, AdaptationHome rightHome, boolean isResolvedMode)
          Compares two homes and returns the result.
static DifferenceBetweenInstances compareInstances(Adaptation instanceOnLeft, Adaptation instanceOnRight, boolean isResolvedMode)
          Performs a comparison between two instances.
static DifferenceBetweenOccurrences compareOccurrences(Adaptation occurrenceOnLeft, Adaptation occurrenceOnRight, boolean isResolvedMode)
          Performs a comparison between two occurrences.
static DifferenceBetweenOccurrences compareOccurrences(Adaptation occurrenceOnLeft, Adaptation occurrenceOnRight, boolean isResolvedMode, boolean showDetails)
          Performs a comparison between two occurrences.
static DifferenceBetweenInstances compareTables(AdaptationTable tableOnLeft, AdaptationTable tableOnRight, boolean isResolvedMode)
          Performs a comparison between two tables.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DifferenceHelper

public DifferenceHelper()
Method Detail

compareHomes

public static DifferenceBetweenHomes compareHomes(AdaptationHome leftHome,
                                                  AdaptationHome rightHome,
                                                  boolean isResolvedMode)
Compares two homes and returns the result.

Parameters:
leftHome - home on left to use for comparison.
rightHome - home on right to use for comparison.
isResolvedMode - if true, comparison is based on the resolved view (for example if two values are inherited and different, then it is considered as a difference); if false, comparison is made only on defined values (for example if two values are inherited then they are not different because they are both equal to AdaptationValue.INHERIT_VALUE).

compareInstances

public static DifferenceBetweenInstances compareInstances(Adaptation instanceOnLeft,
                                                          Adaptation instanceOnRight,
                                                          boolean isResolvedMode)
Performs a comparison between two instances.

Parameters:
instanceOnLeft - instance on left to use for comparison.
instanceOnRight - instance on right to use for comparison.
isResolvedMode - if true, comparison is based on the resolved view (for example if two values are inherited and different, then it is considered as a difference); if false, comparison is made only on defined values (for example if two values are inherited then they are not different because they are both equal to AdaptationValue.INHERIT_VALUE).

compareTables

public static DifferenceBetweenInstances compareTables(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 - if true, comparison is based on the resolved view (for example if two values are inherited and different, then it is considered as a difference); if false, comparison is made only on defined values (for example if two values are inherited then they are not different because they are both equal to AdaptationValue.INHERIT_VALUE).

compareOccurrences

public static DifferenceBetweenOccurrences compareOccurrences(Adaptation occurrenceOnLeft,
                                                              Adaptation occurrenceOnRight,
                                                              boolean isResolvedMode)
Performs a comparison between two occurrences.

This method is equivalent to compareOccurrences(occurrenceOnLeft, occurrenceOnRight, isResolvedMode, false). That is, it does show details on terminal complex nodes.

Parameters:
occurrenceOnLeft - occurrence on left to use for comparison.
occurrenceOnRight - occurrence on right to use for comparison.
isResolvedMode - if true, comparison is based on the resolved view (for example if two values are inherited and different, then it is considered as a difference); if false, comparison is made only on defined values (for example if two values are inherited then they are not different because they are both equal to AdaptationValue.INHERIT_VALUE).

compareOccurrences

public static DifferenceBetweenOccurrences compareOccurrences(Adaptation occurrenceOnLeft,
                                                              Adaptation occurrenceOnRight,
                                                              boolean isResolvedMode,
                                                              boolean showDetails)
Performs a comparison between two occurrences.

Parameters:
occurrenceOnLeft - occurrence on left to use for comparison.
occurrenceOnRight - occurrence on right to use for comparison.
isResolvedMode - if true, comparison is based on the resolved view; if false, comparison is made only on defined values (not inherited ones).
showDetails - if true, differences in terminal complex nodes are detailed; if false, comparison stops on terminal node elements even they are complex.


(report a bug)
webMethods MDM 4.2.8 [0558]
Copyright Software AG 2000-2007. All rights reserved.