public static ComponentResultSet_c resolveInstance(
      ModelRoot modelRoot, java.util.UUID p_m_id, String p_m_name, int p_m_type) {
    InstanceList instances = modelRoot.getInstanceList(ComponentResultSet_c.class);
    ComponentResultSet_c source = null;
    synchronized (instances) {
      Object[] key = {p_m_name, new UUID(0, new Long(p_m_type)), p_m_id};
      source = (ComponentResultSet_c) instances.get(key);
      if (source != null && !modelRoot.isCompareRoot()) {
        source.convertFromProxy();
        source.batchUnrelate();
        source.m_name = p_m_name;
        source.m_type = p_m_type;
        // pre-process the uuid so that we re-use null uuid instance rather then creating a new one.
        source.m_id = IdAssigner.preprocessUUID(p_m_id);

        return source;
      }
    }
    // there is no instance matching the id
    ComponentResultSet_c new_inst = new ComponentResultSet_c(modelRoot, p_m_id, p_m_name, p_m_type);
    return new_inst;
  }