Class ExternalPropertyComparisonData


  • public final class ExternalPropertyComparisonData
    extends Object
    Stores data about external property to be compared.
    • Constructor Detail

      • ExternalPropertyComparisonData

        public ExternalPropertyComparisonData​(AbstractComparedEmfObjects<?> parentComparingObjects,
                                              ComparedSymlinks extPropSymlinks,
                                              ComparedFeatures<org.eclipse.emf.ecore.EReference> extPropFeatures,
                                              ObjectsTriple<String> qualifyingTypes)
        Creates external property data instance.
        Parameters:
        parentComparingObjects - the triple of parent objects containing the external property, cannot be null
        extPropSymlinks - the triple of symlinks identifying the external property, cannot be null
        extPropFeatures - the triple of features related to the external property, cannot be null
        qualifyingTypes - the triple of external property qualifying types, cannot be null
    • Method Detail

      • getParentComparingObjects

        public AbstractComparedEmfObjects<?> getParentComparingObjects()
        Gets the triple of parent objects containing the external property.
        Returns:
        the triple of parent objects, never null
      • getFeatures

        public ComparedFeatures<org.eclipse.emf.ecore.EReference> getFeatures()
        Gets the triple of external property features.
        Returns:
        the triple of external property features, never null
      • getQualifyingType

        public String getQualifyingType​(ComparisonSide side)
        Gets the qualifying type from the corresponding side.
        Parameters:
        side - the side to get qualifying type for, cannot be null
        Returns:
        the qualifying type or null if no qualifying type at that side
      • getNonNullSymlink

        public String getNonNullSymlink()
        Gets symlink identifying the external property. It will be first non-null symlink from MAIN or OTHER sides.
        Returns:
        the symlink, never null
      • getSymlink

        public String getSymlink​(ComparisonSide side)
        Gets symlink identifying the external property from the corresponding side.
        Parameters:
        side - the side to get symlink from, cannot be null
        Returns:
        the symlink or null if no symlink from that side
      • getNewNodeSupplier

        public Supplier<? extends ExternalPropertyComparisonNode> getNewNodeSupplier()
        Gets stored supplier of a new comparison node related to the external property.
        Returns:
        the supplier, may be null if not yet stored
      • setNewNodeSupplier

        public void setNewNodeSupplier​(Supplier<? extends ExternalPropertyComparisonNode> newNodeSupplier)
        Stores the supplier of a new comparison node related to the external property.
        Parameters:
        newNodeSupplier - the supplier to store, cannot be null
      • getExternalPropertyObjects

        public ComparedObjects<?> getExternalPropertyObjects()
        Gets the triple of stored external property objects.
        Returns:
        the triple of objects, may be null if not yet stored
      • setExternalPropertyObjects

        public void setExternalPropertyObjects​(ComparedObjects<?> extPropObjects,
                                               boolean storeInCache)
        Stores the triple of external property objects.
        Parameters:
        extPropObjects - the triple of objects, cannot be null
        storeInCache - the flag to store the triple in cache when attaching the comparison node to BM
      • shouldStoreObjectsInCache

        public boolean shouldStoreObjectsInCache()
        Tells whether to store external property objects in cache when creating the comparison node.
        Returns:
        true if should store objects in cache, false otherwise