public void batchRelate( ModelRoot modelRoot, boolean relateProxies, boolean notifyChanges, boolean searchAllRoots) { InstanceList instances = null; ModelRoot baseRoot = modelRoot; if (HeldByComponent == null) { // R8007 Component_c relInst39972 = (Component_c) baseRoot.getInstanceList(Component_c.class).get(new Object[] {m_id}); // if there was no local element, check for any global elements // failing that proceed to check other model roots if (relInst39972 == null) { relInst39972 = (Component_c) Ooaofooa.getDefaultInstance() .getInstanceList(Component_c.class) .get(new Object[] {m_id}); } if (relInst39972 == 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; } relInst39972 = (Component_c) roots[i].getInstanceList(Component_c.class).get(new Object[] {m_id}); if (relInst39972 != null) break; } } // synchronized if (relInst39972 != null) { if (relateProxies || !isProxy() || (inSameComponent(this, relInst39972) && !isProxy())) { relInst39972.relateAcrossR8007To(this, notifyChanges); } } } }