Ejemplo n.º 1
0
  public void relateAcrossR689To(Value_c target, boolean notifyChanges) {
    if (target == null) return;

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

    if (WritesValue != target) {

      Object oldKey = getInstanceKey();

      if (WritesValue != null) {

        WritesValue.clearBackPointerR689To(this);

        if (Boolean.valueOf(System.getenv("PTC_MCC_ENABLED")) == true) { // $NON-NLS-1$
          Ooaofooa.log.println(
              ILogger.CONSISTENCY,
              "AssignToMember_c.relateAcrossR689To(Value_c target)",
              "Relate performed across R689 from Assign to Member to Value without unrelate of prior instance.");
        }
      }

      WritesValue = target;
      m_l_value_id = target.getValue_id();
      updateInstanceKey(oldKey, getInstanceKey());
      target.setBackPointerR689To(this);
      target.addRef();
    }
  }
  public void relateAcrossR801To(Value_c target, boolean notifyChanges) {
    if (target == null) return;

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

    if (IsSupertypeValue != target) {

      Object oldKey = getInstanceKey();

      if (IsSupertypeValue != null) {

        IsSupertypeValue.clearBackPointerR801To(this);

        if (Boolean.valueOf(System.getenv("PTC_MCC_ENABLED")) == true) { // $NON-NLS-1$
          Ooaofooa.log.println(
              ILogger.CONSISTENCY,
              "TransientValueReference_c.relateAcrossR801To(Value_c target)",
              "Relate performed across R801 from Transient Value Reference to Value without unrelate of prior instance.");
        }
      }

      IsSupertypeValue = target;
      m_value_id = target.getValue_id();
      updateInstanceKey(oldKey, getInstanceKey());
      target.setBackPointerR801To(this);
      target.addRef();
    }
  }