Class PartBasedObjectContext

    • Constructor Detail

      • PartBasedObjectContext

        public PartBasedObjectContext​(long bmObjectId,
                                      org.eclipse.emf.ecore.EClass eClass,
                                      String segmentId,
                                      Object computationCause)
        Creates a new instance of the context.
        Parameters:
        bmObjectId - The identifier of the top BM object this context corresponds to
        eClass - The EClass of the of the top BM object this context corresponds to
        segmentId - The identifier of DD segment this context belongs to
        computationCause - The identifier of the sync. session
      • PartBasedObjectContext

        public PartBasedObjectContext​(Object objectId,
                                      org.eclipse.emf.ecore.EClass eClass,
                                      String segmentId,
                                      Object computationCause)
        Creates a new instance of the context.
        Parameters:
        bmObjectId - The identifier of the top BM object this context corresponds to
        eClass - The EClass of the of the top BM object this context corresponds to
        segmentId - The identifier of DD segment this context belongs to
        computationCause - The identifier of the sync. session
    • Method Detail

      • addParts

        public void addParts​(Collection<String> parts)
        Adds new DD parts to the context.
        Parameters:
        parts - The DD part set that should be calculated for the object.
      • addParts

        public void addParts​(String... parts)
      • getContainmentContext

        public PartBasedContainmentContext getContainmentContext​(IBmObject bmObject)
        Gets context for the containment object.
        Parameters:
        bmObject - The object to get context for.
        Returns:
        The specific containment context.
      • getContainmentContext

        public PartBasedContainmentContext getContainmentContext​(long bmObjectId,
                                                                 org.eclipse.emf.ecore.EClass eClass)
        Gets context for the containment object.
        Parameters:
        bmObjectId - The BM object identifier to get context for.
        eClass - The EClass of an object. May not be null
        Returns:
        The specific containment context.
      • getContainmentContexts

        public Collection<PartBasedContainmentContext> getContainmentContexts()
        Gets the collection containment contexts associated with this context.
        Returns:
        The collection of containment contexts.
      • clearExtendedData

        protected void clearExtendedData()
        Cleans extended data of the context on full rebuild to free the resources
      • copyExtendedDataForContainments

        protected void copyExtendedDataForContainments​(PartBasedContainmentContext sourceContext,
                                                       PartBasedContainmentContext destinationContext)
        Copies extended data of the containment context
        Parameters:
        sourceContext - Source context to copy data from. May not be null
        destinationContext - Destination context to copy data to. May not be null
      • createPartBasedContainmentContext

        protected PartBasedContainmentContext createPartBasedContainmentContext​(long bmObjectId,
                                                                                org.eclipse.emf.ecore.EClass eClass)
        Creates a corresponding part-based containment context. May be used to customize containment contexts in client applications
        Parameters:
        bmObjectId - The BM object identifier to get context for.
        Returns:
        The context. May not be null
      • mergeContainmentExtendedDataUpdates

        protected boolean mergeContainmentExtendedDataUpdates​(PartBasedContainmentContext sourceContext,
                                                              PartBasedContainmentContext destinationContext)
        Merges the containment context extended data
        Parameters:
        sourceContext - The source containment context. May not be null
        destinationContext - The destination containment context. May not be null
        Returns:
        True if there are changes in the destination context as a result of merge
      • mergeExtendedDataUpdates

        protected boolean mergeExtendedDataUpdates​(IObjectDerivedDataContext context)
        Merges extended data updates.
        Parameters:
        context - The context to get data from. May not be null
        Returns:
        True if changes were made during the merge of the extended updates