public void relateAcrossR674To(Bridge_c target, boolean notifyChanges) {
    if (target == null) return;

    if (target == IsAnInvocationOfBridge) return; // already related

    if (IsAnInvocationOfBridge != target) {

      Object oldKey = getInstanceKey();

      if (IsAnInvocationOfBridge != null) {

        IsAnInvocationOfBridge.clearBackPointerR674To(this);

        if (Boolean.valueOf(System.getenv("PTC_MCC_ENABLED")) == true) { // $NON-NLS-1$
          Ooaofooa.log.println(
              ILogger.CONSISTENCY,
              "BridgeInvocation_c.relateAcrossR674To(Bridge_c target)",
              "Relate performed across R674 from Bridge Invocation to Bridge without unrelate of prior instance.");
        }
      }

      IsAnInvocationOfBridge = target;
      m_brg_id = target.getBrg_id();
      updateInstanceKey(oldKey, getInstanceKey());
      target.setBackPointerR674To(this);
      target.addRef();
    }
  }
  public boolean delete() {
    boolean result = super.delete();
    boolean delete_error = false;
    String errorMsg =
        "The following relationships were not torn down by the Bridge Invocation.dispose call: ";
    ActualParameter_c testR628Inst = ActualParameter_c.getOneV_PAROnR628(this, false);

    if (testR628Inst != null) {
      delete_error = true;
      errorMsg = errorMsg + "628 ";
    }
    Statement_c testR603Inst7 = Statement_c.getOneACT_SMTOnR603(this, false);

    if (testR603Inst7 != null) {
      delete_error = true;
      errorMsg = errorMsg + "603 ";
    }
    Bridge_c testR674Inst = Bridge_c.getOneS_BRGOnR674(this, false);

    if (testR674Inst != null) {
      delete_error = true;
      errorMsg = errorMsg + "674 ";
    }
    if (delete_error == true) {

      if (CorePlugin.getDefault().isDebugging()) {
        Ooaofooa.log.println(ILogger.DELETE, "Bridge Invocation", errorMsg);
      } else {
        Exception e = new Exception();
        e.fillInStackTrace();
        CorePlugin.logError(errorMsg, e);
      }
    }
    return result;
  }
  public static BridgeInvocation_c[] getManyACT_BRGsOnR674(
      Bridge_c target, ClassQueryInterface_c test, boolean loadComponent) {
    if (target == null) return new BridgeInvocation_c[0];

    ModelRoot modelRoot = target.getModelRoot();
    Vector matches = new Vector();
    synchronized (target.backPointer_BridgeInvocation_R674) {
      for (int i = 0; i < target.backPointer_BridgeInvocation_R674.size(); ++i) {
        BridgeInvocation_c source =
            (BridgeInvocation_c) target.backPointer_BridgeInvocation_R674.get(i);
        if (source != null && (test == null || test.evaluate(source))) {

          matches.add(source);
        }
      }
    }

    if (matches.size() > 0) {
      BridgeInvocation_c[] ret_set = new BridgeInvocation_c[matches.size()];
      matches.copyInto(ret_set);
      return ret_set;
    } else {
      return new BridgeInvocation_c[0];
    }
  }
 public static BridgeInvocation_c getOneACT_BRGOnR674(
     Bridge_c target, ClassQueryInterface_c test) {
   if (target != null) {
     return getOneACT_BRGOnR674(target.getModelRoot(), target, test);
   }
   return null;
 }
  // declare transform functions
  public void Dispose() {
    Ooaofooa.log.println(
        ILogger.OPERATION, "Bridge Invocation", " Operation entered: BridgeInvocation::Dispose");
    final ModelRoot modelRoot = getModelRoot();
    Bridge_c v_brg = Bridge_c.getOneS_BRGOnR674(this);

    if ((!(v_brg == null))) {

      this.unrelateAcrossR674From(v_brg);
    }

    ActualParameter_c[] v_parm_set = ActualParameter_c.getManyV_PARsOnR628(this);

    ActualParameter_c v_parm = null;
    for (int i37268 = 0; i37268 < v_parm_set.length; i37268++) {
      v_parm = v_parm_set[i37268];

      this.unrelateAcrossR628From(v_parm);

      if (v_parm != null) {
        v_parm.Dispose();
      } else {
        Throwable t = new Throwable();
        t.fillInStackTrace();
        CorePlugin.logError("Attempted to call an operation on a null instance.", t);
      }
    }

    delete();
  } // End dispose
  public void unrelateAcrossR674From(Bridge_c target, boolean notifyChanges) {
    if (target == null) return;

    if (IsAnInvocationOfBridge == null) return; // already unrelated

    if (target != IsAnInvocationOfBridge) {
      Exception e = new Exception();
      e.fillInStackTrace();
      CorePlugin.logError("Tried to unrelate from non-related instance across R674", e);
      return;
    }

    if (target != null) {
      target.clearBackPointerR674To(this);
    }

    if (IsAnInvocationOfBridge != null) {

      m_brg_id = IsAnInvocationOfBridge.getBrg_id();
      IsAnInvocationOfBridge = null;
      target.removeRef();
    }
  }
  public void batchRelate(
      ModelRoot modelRoot, boolean relateProxies, boolean notifyChanges, boolean searchAllRoots) {
    InstanceList instances = null;
    ModelRoot baseRoot = modelRoot;

    // R603
    Statement_c relInst40372 =
        (Statement_c)
            baseRoot.getInstanceList(Statement_c.class).get(new Object[] {m_statement_id});
    // if there was no local element, check for any global elements
    // failing that proceed to check other model roots
    if (relInst40372 == null) {
      relInst40372 =
          (Statement_c)
              Ooaofooa.getDefaultInstance()
                  .getInstanceList(Statement_c.class)
                  .get(new Object[] {m_statement_id});
    }
    if (relInst40372 == null && searchAllRoots && !baseRoot.isCompareRoot()) {
      Ooaofooa[] roots = Ooaofooa.getInstances();
      for (int i = 0; i < roots.length; i++) {
        if (roots[i].isCompareRoot()) {
          // never use elements from any compare root
          continue;
        }
        relInst40372 =
            (Statement_c)
                roots[i].getInstanceList(Statement_c.class).get(new Object[] {m_statement_id});
        if (relInst40372 != null) break;
      }
    }
    // synchronized
    if (relInst40372 != null) {
      if (relateProxies || !isProxy() || (inSameComponent(this, relInst40372) && !isProxy())) {
        relInst40372.relateAcrossR603To(this, notifyChanges);
      }
    }

    if (IsAnInvocationOfBridge == null) {
      // R674
      Bridge_c relInst40373 =
          (Bridge_c) baseRoot.getInstanceList(Bridge_c.class).get(new Object[] {m_brg_id});
      // if there was no local element, check for any global elements
      // failing that proceed to check other model roots
      if (relInst40373 == null) {
        relInst40373 =
            (Bridge_c)
                Ooaofooa.getDefaultInstance()
                    .getInstanceList(Bridge_c.class)
                    .get(new Object[] {m_brg_id});
      }
      if (relInst40373 == null && searchAllRoots && !baseRoot.isCompareRoot()) {
        Ooaofooa[] roots = Ooaofooa.getInstances();
        for (int i = 0; i < roots.length; i++) {
          if (roots[i].isCompareRoot()) {
            // never use elements from any compare root
            continue;
          }
          relInst40373 =
              (Bridge_c) roots[i].getInstanceList(Bridge_c.class).get(new Object[] {m_brg_id});
          if (relInst40373 != null) break;
        }
      }
      // synchronized
      if (relInst40373 != null) {
        if (relateProxies || !isProxy() || (inSameComponent(this, relInst40373) && !isProxy())) {
          relInst40373.relateAcrossR674To(this, notifyChanges);
        }
      }
    }
  }
 public static BridgeInvocation_c getOneACT_BRGOnR674(Bridge_c target, boolean loadComponent) {
   return getOneACT_BRGOnR674(target.getModelRoot(), target, null, loadComponent);
 }
 public boolean evaluate(Object candidate) {
   Bridge_c selected = (Bridge_c) candidate;
   boolean retval = false;
   retval = (selected.getBrg_id().equals(m_p40384));
   return retval;
 }
  public boolean checkConsistency() {
    Ooaofooa.log.println(
        ILogger.OPERATION,
        "Bridge Invocation", //$NON-NLS-1$
        " Operation entered: Bridge Invocation::checkConsistency"); //$NON-NLS-1$
    if (Boolean.valueOf(System.getenv("PTC_MCC_ENABLED")) == false) { // $NON-NLS-1$
      return true;
    }
    ModelRoot modelRoot = getModelRoot();
    boolean retval = true;
    class BridgeInvocation_c_test40375_c implements ClassQueryInterface_c {
      BridgeInvocation_c_test40375_c(java.util.UUID p40376) {
        m_p40376 = p40376;
      }

      private java.util.UUID m_p40376;

      public boolean evaluate(Object candidate) {
        BridgeInvocation_c selected = (BridgeInvocation_c) candidate;
        boolean retval = false;
        retval = (selected.getStatement_id().equals(m_p40376));
        return retval;
      }
    }

    BridgeInvocation_c[] objs40374 =
        BridgeInvocation_c.BridgeInvocationInstances(
            modelRoot, new BridgeInvocation_c_test40375_c(getStatement_id()));

    if (((objs40374.length) == 0)) {

      if (CorePlugin.getDefault().isDebugging()) {
        Ooaofooa.log.println(
            ILogger.CONSISTENCY,
            "Bridge Invocation", //$NON-NLS-1$
            "Consistency: Object: Bridge Invocation: Cardinality of an identifier is zero. " //$NON-NLS-1$
                + "Actual Value: "
                + Integer.toString(objs40374.length)); // $NON-NLS-1$
      } else {
        Exception e = new Exception();
        CorePlugin.logError(
            "Consistency: Object: Bridge Invocation: Cardinality of an identifier is zero. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs40374.length),
            e);
      }
      retval = false;
    }

    if (((objs40374.length) > 1)) {

      if (CorePlugin.getDefault().isDebugging()) {
        Ooaofooa.log.println(
            ILogger.CONSISTENCY,
            "Bridge Invocation", //$NON-NLS-1$
            "Consistency: Object: Bridge Invocation: Cardinality of an identifier is greater than 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs40374.length)
                + " Statement_ID: "
                + "Not Printable"); //$NON-NLS-1$
      } else {
        Exception e = new Exception();
        CorePlugin.logError(
            "Consistency: Object: Bridge Invocation: Cardinality of an identifier is greater than 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs40374.length)
                + " Statement_ID: "
                + "Not Printable",
            e); //$NON-NLS-1$
      }
      retval = false;
    }

    // Bridge Invocation is a subtype in association: rel.Numb = 603
    // The supertype class is: Statement
    class Statement_c_test40380_c implements ClassQueryInterface_c {
      Statement_c_test40380_c(java.util.UUID p40381) {
        m_p40381 = p40381;
      }

      private java.util.UUID m_p40381;

      public boolean evaluate(Object candidate) {
        Statement_c selected = (Statement_c) candidate;
        boolean retval = false;
        retval = (selected.getStatement_id().equals(m_p40381));
        return retval;
      }
    }

    Statement_c[] objs40379 =
        Statement_c.StatementInstances(modelRoot, new Statement_c_test40380_c(getStatement_id()));

    if (((objs40379.length) != 1)) {

      if (CorePlugin.getDefault().isDebugging()) {
        Ooaofooa.log.println(
            ILogger.CONSISTENCY,
            "Bridge Invocation", //$NON-NLS-1$
            "Consistency: Object: Bridge Invocation: Association: 603: Cardinality of a supertype is not equal to 1. " //$NON-NLS-1$
                + "Actual Value: "
                + Integer.toString(objs40379.length)); // $NON-NLS-1$
      } else {
        Exception e = new Exception();
        CorePlugin.logError(
            "Consistency: Object: Bridge Invocation: Association: 603: Cardinality of a supertype is not equal to 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs40379.length),
            e);
      }
      retval = false;
    }

    // Bridge Invocation is a referring class in association: rel.Numb = 674
    // The participating class is: Bridge
    class Bridge_c_test40383_c implements ClassQueryInterface_c {
      Bridge_c_test40383_c(java.util.UUID p40384) {
        m_p40384 = p40384;
      }

      private java.util.UUID m_p40384;

      public boolean evaluate(Object candidate) {
        Bridge_c selected = (Bridge_c) candidate;
        boolean retval = false;
        retval = (selected.getBrg_id().equals(m_p40384));
        return retval;
      }
    }

    Bridge_c[] objs40382 =
        Bridge_c.BridgeInstances(modelRoot, new Bridge_c_test40383_c(getBrg_id()));

    if (((objs40382.length) > 1)) {

      if (CorePlugin.getDefault().isDebugging()) {
        Ooaofooa.log.println(
            ILogger.CONSISTENCY,
            "Bridge Invocation", //$NON-NLS-1$
            "Consistency: Object: Bridge Invocation: Association: 674: Cardinality of a participant is greater than 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs40382.length)
                + " Brg_ID: "
                + "Not Printable"); //$NON-NLS-1$
      } else {
        Exception e = new Exception();
        CorePlugin.logError(
            "Consistency: Object: Bridge Invocation: Association: 674: Cardinality of a participant is greater than 1. " //$NON-NLS-1$
                + "Actual Value: " //$NON-NLS-1$
                + Integer.toString(objs40382.length)
                + " Brg_ID: "
                + "Not Printable",
            e); //$NON-NLS-1$
      }
      retval = false;
    }

    // Bridge Invocation is a participating class in association: rel.Numb = 628
    // Object: Actual Parameter
    return retval;
  }
 public java.util.UUID getBrg_id() {
   if (IsAnInvocationOfBridge != null) {
     return IsAnInvocationOfBridge.getBrg_id();
   }
   return IdAssigner.NULL_UUID;
 }
 public long getBrg_idLongBased() {
   if (IsAnInvocationOfBridge != null) {
     return IsAnInvocationOfBridge.getBrg_idLongBased();
   }
   return 0;
 }