org.eclipse.incquery.viewmodel.traceability

## Class TraceabilityUtil

- java.lang.Object
- - org.eclipse.incquery.viewmodel.traceability.TraceabilityUtil

-     public class TraceabilityUtil
      extends java.lang.Object

  Utility class for traceability model.
  Author:
    Csaba Debreceni

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `createTrace(Traceability refModel, java.lang.String id, java.util.Collection<org.eclipse.emf.ecore.EObject> sourcesEObject, java.util.Collection<java.lang.Object> sourcesJavaObject, java.util.Collection<org.eclipse.emf.ecore.EObject> targets)` Creates a new `Trace` instance with the given parameters, and adds it to the referenced `Traceability` model
    `static void` | `deleteTraceAndTarget(IncQueryEngine engine, org.eclipse.emf.ecore.EObject toDelete)` Detaches the `Trace` with the given id and the corresponding target instances from the base notifier of the `IncQueryEngine` and returns the target instances.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### createTrace

          public static void createTrace(Traceability refModel,
                                         java.lang.String id,
                                         java.util.Collection<org.eclipse.emf.ecore.EObject> sourcesEObject,
                                         java.util.Collection<java.lang.Object> sourcesJavaObject,
                                         java.util.Collection<org.eclipse.emf.ecore.EObject> targets)

      Creates a new `Trace` instance with the given parameters, and adds it to the referenced `Traceability` model
      Parameters:
        `refModel` - is the referenced `Traceability` model
        `target` - will be on the target side of the new `Trace`
        `id` - for the new `Trace`
        `sourcesEObject` - will be on the source side of the new `Trace`

    - #### deleteTraceAndTarget

          public static void deleteTraceAndTarget(IncQueryEngine engine,
                                                  org.eclipse.emf.ecore.EObject toDelete)
                                           throws IncQueryException

      Detaches the `Trace` with the given id and the corresponding target instances from the base notifier of the `IncQueryEngine` and returns the target instances.
      Parameters:
        `engine` - for trace pattern matching
        `id` - of traces to be detached
        `sources` - of traces to be detached
      Throws:
        `IncQueryException`