public static InformalArgument_c[] getManyMSG_IAsOnR1013( MessageArgument_c[] targets, ClassQueryInterface_c test, boolean loadComponent) { if (targets == null || targets.length == 0 || targets[0] == null) return new InformalArgument_c[0]; ModelRoot modelRoot = targets[0].getModelRoot(); InstanceList instances = modelRoot.getInstanceList(InformalArgument_c.class); Vector matches = new Vector(); for (int i = 0; i < targets.length; i++) { InformalArgument_c source = (InformalArgument_c) targets[i].backPointer_IsSubtypeInformalArgumentIsSubtype_R1013; if (source != null && (test == null || test.evaluate(source))) { matches.add(source); } } if (matches.size() > 0) { InformalArgument_c[] ret_set = new InformalArgument_c[matches.size()]; matches.copyInto(ret_set); return ret_set; } else { return new InformalArgument_c[0]; } }
public static DataTypeInPackage_c[] getManyS_DIPsOnR39( DataType_c[] targets, ClassQueryInterface_c test, boolean loadComponent) { if (targets == null || targets.length == 0 || targets[0] == null) return new DataTypeInPackage_c[0]; ModelRoot modelRoot = targets[0].getModelRoot(); InstanceList instances = modelRoot.getInstanceList(DataTypeInPackage_c.class); Vector matches = new Vector(); for (int i = 0; i < targets.length; i++) { synchronized (targets[i].backPointer_IsContainedInDataTypeInPackageIsContainedIn_R39) { for (int j = 0; j < targets[i].backPointer_IsContainedInDataTypeInPackageIsContainedIn_R39.size(); ++j) { DataTypeInPackage_c source = (DataTypeInPackage_c) targets[i].backPointer_IsContainedInDataTypeInPackageIsContainedIn_R39.get(j); if (source != null && (test == null || test.evaluate(source))) { matches.add(source); } } } } if (matches.size() > 0) { DataTypeInPackage_c[] ret_set = new DataTypeInPackage_c[matches.size()]; matches.copyInto(ret_set); return ret_set; } else { return new DataTypeInPackage_c[0]; } }
public static AssignToMember_c[] getManyACT_AIsOnR603( Statement_c[] targets, ClassQueryInterface_c test, boolean loadComponent) { if (targets == null || targets.length == 0 || targets[0] == null) return new AssignToMember_c[0]; ModelRoot modelRoot = targets[0].getModelRoot(); InstanceList instances = modelRoot.getInstanceList(AssignToMember_c.class); Vector matches = new Vector(); for (int i = 0; i < targets.length; i++) { AssignToMember_c source = (AssignToMember_c) targets[i].backPointer_IsSubtypeAssignToMemberIsSubtype_R603; if (source != null && (test == null || test.evaluate(source))) { matches.add(source); } } if (matches.size() > 0) { AssignToMember_c[] ret_set = new AssignToMember_c[matches.size()]; matches.copyInto(ret_set); return ret_set; } else { return new AssignToMember_c[0]; } }
public void batchRelate( ModelRoot modelRoot, boolean relateProxies, boolean notifyChanges, boolean searchAllRoots) { InstanceList instances = null; ModelRoot baseRoot = modelRoot; // R301 Graphelement_c relInst21771 = (Graphelement_c) baseRoot.getInstanceList(Graphelement_c.class).get(new Object[] {m_elementid}); // if there was no local element, check for any global elements // failing that proceed to check other model roots if (relInst21771 == null) { relInst21771 = (Graphelement_c) Ooaofooa.getDefaultInstance() .getInstanceList(Graphelement_c.class) .get(new Object[] {m_elementid}); } // synchronized if (relInst21771 != null) { if (relateProxies || !isProxy() || (inSameComponent(this, relInst21771) && !isProxy())) { relInst21771.relateAcrossR301To(this, notifyChanges); } } }
public static TransientValueReference_c[] getManyV_TVLsOnR801( Value_c[] targets, ClassQueryInterface_c test, boolean loadComponent) { if (targets == null || targets.length == 0 || targets[0] == null) return new TransientValueReference_c[0]; ModelRoot modelRoot = targets[0].getModelRoot(); InstanceList instances = modelRoot.getInstanceList(TransientValueReference_c.class); Vector matches = new Vector(); for (int i = 0; i < targets.length; i++) { TransientValueReference_c source = (TransientValueReference_c) targets[i].backPointer_IsSubtypeTransientValueReferenceIsSubtype_R801; if (source != null && (test == null || test.evaluate(source))) { matches.add(source); } } if (matches.size() > 0) { TransientValueReference_c[] ret_set = new TransientValueReference_c[matches.size()]; matches.copyInto(ret_set); return ret_set; } else { return new TransientValueReference_c[0]; } }
public void batchRelate( ModelRoot modelRoot, boolean relateProxies, boolean notifyChanges, boolean searchAllRoots) { InstanceList instances = null; ModelRoot baseRoot = modelRoot; // R9600 Query_c relInst39590 = (Query_c) baseRoot.getInstanceList(Query_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 (relInst39590 == null) { relInst39590 = (Query_c) Ooaofooa.getDefaultInstance().getInstanceList(Query_c.class).get(new Object[] {m_id}); } if (relInst39590 == 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; } relInst39590 = (Query_c) roots[i].getInstanceList(Query_c.class).get(new Object[] {m_id}); if (relInst39590 != null) break; } } // synchronized if (relInst39590 != null) { if (relateProxies || !isProxy() || (inSameComponent(this, relInst39590) && !isProxy())) { relInst39590.relateAcrossR9600To(this, notifyChanges); } } }
public static DescriptionQuery_c[] getManySQU_DEsOnR9600( Query_c[] targets, ClassQueryInterface_c test, boolean loadComponent) { if (targets == null || targets.length == 0 || targets[0] == null) return new DescriptionQuery_c[0]; ModelRoot modelRoot = targets[0].getModelRoot(); InstanceList instances = modelRoot.getInstanceList(DescriptionQuery_c.class); Vector matches = new Vector(); for (int i = 0; i < targets.length; i++) { DescriptionQuery_c source = (DescriptionQuery_c) targets[i].backPointer_IsSubtypeDescriptionQueryIsSubtype_R9600; if (source != null && (test == null || test.evaluate(source))) { matches.add(source); } } if (matches.size() > 0) { DescriptionQuery_c[] ret_set = new DescriptionQuery_c[matches.size()]; matches.copyInto(ret_set); return ret_set; } else { return new DescriptionQuery_c[0]; } }
public static ElementInMove_c[] getManyGD_EIMsOnR25( GraphicalElement_c[] targets, ClassQueryInterface_c test, boolean loadComponent) { if (targets == null || targets.length == 0 || targets[0] == null) return new ElementInMove_c[0]; ModelRoot modelRoot = targets[0].getModelRoot(); InstanceList instances = modelRoot.getInstanceList(ElementInMove_c.class); Vector matches = new Vector(); for (int i = 0; i < targets.length; i++) { synchronized (targets[i].backPointer_IsMovingInElementInMoveIsMovingIn_R25) { for (int j = 0; j < targets[i].backPointer_IsMovingInElementInMoveIsMovingIn_R25.size(); ++j) { ElementInMove_c source = (ElementInMove_c) targets[i].backPointer_IsMovingInElementInMoveIsMovingIn_R25.get(j); if (source != null && (test == null || test.evaluate(source))) { matches.add(source); } } } } if (matches.size() > 0) { ElementInMove_c[] ret_set = new ElementInMove_c[matches.size()]; matches.copyInto(ret_set); return ret_set; } else { return new ElementInMove_c[0]; } }
public static InstanceStateMachine_c[] getManySM_ISMsOnR518( ModelClass_c[] targets, ClassQueryInterface_c test, boolean loadComponent) { if (targets == null || targets.length == 0 || targets[0] == null) return new InstanceStateMachine_c[0]; ModelRoot modelRoot = targets[0].getModelRoot(); if (loadComponent) { // Containment Relation PersistableModelComponent[] pmcs = new PersistableModelComponent[targets.length]; for (int i = 0; i < targets.length; i++) { pmcs[i] = targets[i].getPersistableComponent(); } PersistenceManager.ensureAllChildInstancesLoaded( pmcs, modelRoot, InstanceStateMachine_c.class); } InstanceList instances = modelRoot.getInstanceList(InstanceStateMachine_c.class); Vector matches = new Vector(); for (int i = 0; i < targets.length; i++) { InstanceStateMachine_c source = (InstanceStateMachine_c) targets[i].backPointer_InstanceStateMachine_R518; if (source != null && (test == null || test.evaluate(source))) { matches.add(source); } } if (matches.size() > 0) { InstanceStateMachine_c[] ret_set = new InstanceStateMachine_c[matches.size()]; matches.copyInto(ret_set); return ret_set; } else { return new InstanceStateMachine_c[0]; } }
public static ElementInMove_c resolveInstance( ModelRoot modelRoot, java.util.UUID p_m_elementid, java.util.UUID p_m_diagramid, float p_m_startingx, float p_m_startingy) { InstanceList instances = modelRoot.getInstanceList(ElementInMove_c.class); ElementInMove_c source = null; synchronized (instances) { Object[] key = {p_m_elementid, p_m_diagramid}; source = (ElementInMove_c) instances.get(key); if (source != null && !modelRoot.isCompareRoot()) { source.convertFromProxy(); source.batchUnrelate(); // pre-process the uuid so that we re-use null uuid instance rather then creating a new one. source.m_elementid = IdAssigner.preprocessUUID(p_m_elementid); // pre-process the uuid so that we re-use null uuid instance rather then creating a new one. source.m_diagramid = IdAssigner.preprocessUUID(p_m_diagramid); source.m_startingx = p_m_startingx; source.m_startingy = p_m_startingy; return source; } } // there is no instance matching the id ElementInMove_c new_inst = new ElementInMove_c(modelRoot, p_m_elementid, p_m_diagramid, p_m_startingx, p_m_startingy); return new_inst; }
public static BridgeInvocation_c[] getManyACT_BRGsOnR674( Bridge_c[] targets, ClassQueryInterface_c test, boolean loadComponent) { if (targets == null || targets.length == 0 || targets[0] == null) return new BridgeInvocation_c[0]; ModelRoot modelRoot = targets[0].getModelRoot(); InstanceList instances = modelRoot.getInstanceList(BridgeInvocation_c.class); Vector matches = new Vector(); for (int i = 0; i < targets.length; i++) { synchronized (targets[i].backPointer_BridgeInvocation_R674) { for (int j = 0; j < targets[i].backPointer_BridgeInvocation_R674.size(); ++j) { BridgeInvocation_c source = (BridgeInvocation_c) targets[i].backPointer_BridgeInvocation_R674.get(j); 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 ComponentInComponent_c[] getManyCN_CICsOnR4202( Component_c[] targets, ClassQueryInterface_c test, boolean loadComponent) { if (targets == null || targets.length == 0 || targets[0] == null) return new ComponentInComponent_c[0]; ModelRoot modelRoot = targets[0].getModelRoot(); InstanceList instances = modelRoot.getInstanceList(ComponentInComponent_c.class); Vector matches = new Vector(); for (int i = 0; i < targets.length; i++) { synchronized (targets[i].backPointer_CanNestComponentInComponentCanNest_R4202) { for (int j = 0; j < targets[i].backPointer_CanNestComponentInComponentCanNest_R4202.size(); ++j) { ComponentInComponent_c source = (ComponentInComponent_c) targets[i].backPointer_CanNestComponentInComponentCanNest_R4202.get(j); if (source != null && (test == null || test.evaluate(source))) { matches.add(source); } } } } if (matches.size() > 0) { ComponentInComponent_c[] ret_set = new ComponentInComponent_c[matches.size()]; matches.copyInto(ret_set); return ret_set; } else { return new ComponentInComponent_c[0]; } }
public static BridgeInvocation_c createProxy( ModelRoot modelRoot, java.util.UUID p_m_statement_id, java.util.UUID p_m_brg_id, int p_m_bridgenamelinenumber, int p_m_bridgenamecolumn, int p_m_externalentitykeyletterslinenumber, int p_m_externalentitykeyletterscolumn, String p_contentPath, IPath p_localPath) { ModelRoot resolvedModelRoot = ModelRoot.findModelRoot(modelRoot, p_contentPath, p_localPath); // if a model root was not resolved it is most likely // due to a missing file of the proxy, defualt back to // the original model root if (resolvedModelRoot != null) modelRoot = resolvedModelRoot; InstanceList instances = modelRoot.getInstanceList(BridgeInvocation_c.class); BridgeInvocation_c new_inst = null; synchronized (instances) { Object[] key = {p_m_statement_id}; new_inst = (BridgeInvocation_c) instances.get(key); } String contentPath = PersistenceUtil.resolveRelativePath(p_localPath, new Path(p_contentPath)); if (modelRoot.isNewCompareRoot()) { // for comparisons we do not want to change // the content path contentPath = p_contentPath; } if (new_inst != null && !modelRoot.isCompareRoot()) { PersistableModelComponent pmc = new_inst.getPersistableComponent(); if (pmc == null) { // dangling reference, redo this instance new_inst.batchUnrelate(); // pre-process the uuid so that we re-use null uuid instance rather then creating a new one. new_inst.m_statement_id = IdAssigner.preprocessUUID(p_m_statement_id); // pre-process the uuid so that we re-use null uuid instance rather then creating a new one. new_inst.m_brg_id = IdAssigner.preprocessUUID(p_m_brg_id); new_inst.m_bridgenamelinenumber = p_m_bridgenamelinenumber; new_inst.m_bridgenamecolumn = p_m_bridgenamecolumn; new_inst.m_externalentitykeyletterslinenumber = p_m_externalentitykeyletterslinenumber; new_inst.m_externalentitykeyletterscolumn = p_m_externalentitykeyletterscolumn; } } if (new_inst == null) { // there is no instance matching the id, create a proxy // if the resource doesn't exist then this will be a dangling reference new_inst = new BridgeInvocation_c( modelRoot, p_m_statement_id, p_m_brg_id, p_m_bridgenamelinenumber, p_m_bridgenamecolumn, p_m_externalentitykeyletterslinenumber, p_m_externalentitykeyletterscolumn); new_inst.m_contentPath = contentPath; } return new_inst; }
public static void clearInstances(ModelRoot modelRoot) { InstanceList instances = modelRoot.getInstanceList(InformalArgument_c.class); synchronized (instances) { for (int i = instances.size() - 1; i >= 0; i--) { ((NonRootModelElement) instances.get(i)).delete_unchecked(); } } }
public static ComponentInComponent_c createProxy( ModelRoot modelRoot, java.util.UUID p_m_id, java.util.UUID p_m_parent_id, String p_contentPath, IPath p_localPath) { ModelRoot resolvedModelRoot = ModelRoot.findModelRoot(modelRoot, p_contentPath, p_localPath); // if a model root was not resolved it is most likely // due to a missing file of the proxy, defualt back to // the original model root if (resolvedModelRoot != null) modelRoot = resolvedModelRoot; InstanceList instances = modelRoot.getInstanceList(ComponentInComponent_c.class); ComponentInComponent_c new_inst = null; synchronized (instances) { Object[] key = {p_m_id}; new_inst = (ComponentInComponent_c) instances.get(key); } String contentPath = PersistenceUtil.resolveRelativePath(p_localPath, new Path(p_contentPath)); if (modelRoot.isNewCompareRoot()) { // for comparisons we do not want to change // the content path contentPath = p_contentPath; } if (new_inst != null && !modelRoot.isCompareRoot()) { PersistableModelComponent pmc = new_inst.getPersistableComponent(); if (pmc == null) { // dangling reference, redo this instance new_inst.batchUnrelate(); // pre-process the uuid so that we re-use null uuid instance rather then creating a new one. new_inst.m_id = IdAssigner.preprocessUUID(p_m_id); // extract 28 bit value only new_inst.m_idLongBased = 0xfffffff & p_m_id.getLeastSignificantBits(); // pre-process the uuid so that we re-use null uuid instance rather then creating a new one. new_inst.m_parent_id = IdAssigner.preprocessUUID(p_m_parent_id); } } if (new_inst == null) { // there is no instance matching the id, create a proxy // if the resource doesn't exist then this will be a dangling reference new_inst = new ComponentInComponent_c(modelRoot, p_m_id, p_m_parent_id); new_inst.m_contentPath = contentPath; } return new_inst; }
public static InformalArgument_c resolveInstance(ModelRoot modelRoot, java.util.UUID p_m_arg_id) { InstanceList instances = modelRoot.getInstanceList(InformalArgument_c.class); InformalArgument_c source = null; synchronized (instances) { Object[] key = {p_m_arg_id}; source = (InformalArgument_c) instances.get(key); if (source != null && !modelRoot.isCompareRoot()) { source.convertFromProxy(); source.batchUnrelate(); // pre-process the uuid so that we re-use null uuid instance rather then creating a new one. source.m_arg_id = IdAssigner.preprocessUUID(p_m_arg_id); return source; } } // there is no instance matching the id InformalArgument_c new_inst = new InformalArgument_c(modelRoot, p_m_arg_id); return new_inst; }
public static void batchRelateAll( ModelRoot modelRoot, boolean notifyChanges, boolean searchAllRoots, boolean relateProxies) { InstanceList instances = modelRoot.getInstanceList(InformalArgument_c.class); synchronized (instances) { Iterator<NonRootModelElement> cursor = instances.iterator(); while (cursor.hasNext()) { final InformalArgument_c inst = (InformalArgument_c) cursor.next(); inst.batchRelate(modelRoot, relateProxies, notifyChanges, searchAllRoots); } } }
public static BridgeInvocation_c resolveInstance( ModelRoot modelRoot, java.util.UUID p_m_statement_id, java.util.UUID p_m_brg_id, int p_m_bridgenamelinenumber, int p_m_bridgenamecolumn, int p_m_externalentitykeyletterslinenumber, int p_m_externalentitykeyletterscolumn) { InstanceList instances = modelRoot.getInstanceList(BridgeInvocation_c.class); BridgeInvocation_c source = null; synchronized (instances) { Object[] key = {p_m_statement_id}; source = (BridgeInvocation_c) instances.get(key); if (source != null && !modelRoot.isCompareRoot()) { source.convertFromProxy(); source.batchUnrelate(); // pre-process the uuid so that we re-use null uuid instance rather then creating a new one. source.m_statement_id = IdAssigner.preprocessUUID(p_m_statement_id); // pre-process the uuid so that we re-use null uuid instance rather then creating a new one. source.m_brg_id = IdAssigner.preprocessUUID(p_m_brg_id); source.m_bridgenamelinenumber = p_m_bridgenamelinenumber; source.m_bridgenamecolumn = p_m_bridgenamecolumn; source.m_externalentitykeyletterslinenumber = p_m_externalentitykeyletterslinenumber; source.m_externalentitykeyletterscolumn = p_m_externalentitykeyletterscolumn; return source; } } // there is no instance matching the id BridgeInvocation_c new_inst = new BridgeInvocation_c( modelRoot, p_m_statement_id, p_m_brg_id, p_m_bridgenamelinenumber, p_m_bridgenamecolumn, p_m_externalentitykeyletterslinenumber, p_m_externalentitykeyletterscolumn); return new_inst; }
private static InformalArgument_c findInformalArgumentInstance( ModelRoot modelRoot, ClassQueryInterface_c test, boolean loadComponent) { InstanceList instances = modelRoot.getInstanceList(InformalArgument_c.class); synchronized (instances) { for (int i = 0; i < instances.size(); ++i) { InformalArgument_c x = (InformalArgument_c) instances.get(i); if (test == null || test.evaluate(x)) { if (x.ensureLoaded(loadComponent)) return x; } } } return null; }
public static Graphnode_c resolveInstance( ModelRoot modelRoot, float p_m_width, float p_m_height, java.util.UUID p_m_elementid) { InstanceList instances = modelRoot.getInstanceList(Graphnode_c.class); Graphnode_c source = null; synchronized (instances) { Object[] key = {p_m_elementid}; source = (Graphnode_c) instances.get(key); if (source != null && !modelRoot.isCompareRoot()) { source.convertFromProxy(); source.batchUnrelate(); source.m_width = p_m_width; source.m_height = p_m_height; // pre-process the uuid so that we re-use null uuid instance rather then creating a new one. source.m_elementid = IdAssigner.preprocessUUID(p_m_elementid); return source; } } // there is no instance matching the id Graphnode_c new_inst = new Graphnode_c(modelRoot, p_m_width, p_m_height, p_m_elementid); return new_inst; }
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; }
private static Graphnode_c findGraphnodeInstance( ModelRoot modelRoot, ClassQueryInterface_c test, boolean loadComponent) { InstanceList instances = modelRoot.getInstanceList(Graphnode_c.class); synchronized (instances) { for (int i = 0; i < instances.size(); ++i) { Graphnode_c x = (Graphnode_c) instances.get(i); if (test == null || test.evaluate(x)) { return x; } } } return null; }
public static AssignToMember_c resolveInstance( ModelRoot modelRoot, java.util.UUID p_m_statement_id, java.util.UUID p_m_r_value_id, java.util.UUID p_m_l_value_id, int p_m_attributelinenumber, int p_m_attributecolumn) { InstanceList instances = modelRoot.getInstanceList(AssignToMember_c.class); AssignToMember_c source = null; synchronized (instances) { Object[] key = {p_m_statement_id}; source = (AssignToMember_c) instances.get(key); if (source != null && !modelRoot.isCompareRoot()) { source.convertFromProxy(); source.batchUnrelate(); // pre-process the uuid so that we re-use null uuid instance rather then creating a new one. source.m_statement_id = IdAssigner.preprocessUUID(p_m_statement_id); // pre-process the uuid so that we re-use null uuid instance rather then creating a new one. source.m_r_value_id = IdAssigner.preprocessUUID(p_m_r_value_id); source.m_attributelinenumber = p_m_attributelinenumber; source.m_attributecolumn = p_m_attributecolumn; // pre-process the uuid so that we re-use null uuid instance rather then creating a new one. source.m_l_value_id = IdAssigner.preprocessUUID(p_m_l_value_id); return source; } } // there is no instance matching the id AssignToMember_c new_inst = new AssignToMember_c( modelRoot, p_m_statement_id, p_m_r_value_id, p_m_l_value_id, p_m_attributelinenumber, p_m_attributecolumn); return new_inst; }
public static ComponentInComponent_c resolveInstance( ModelRoot modelRoot, java.util.UUID p_m_id, java.util.UUID p_m_parent_id) { InstanceList instances = modelRoot.getInstanceList(ComponentInComponent_c.class); ComponentInComponent_c source = null; synchronized (instances) { Object[] key = {p_m_id}; source = (ComponentInComponent_c) instances.get(key); if (source != null && !modelRoot.isCompareRoot()) { source.convertFromProxy(); source.batchUnrelate(); // 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); // extract 28 bit value only source.m_idLongBased = 0xfffffff & p_m_id.getLeastSignificantBits(); // pre-process the uuid so that we re-use null uuid instance rather then creating a new one. source.m_parent_id = IdAssigner.preprocessUUID(p_m_parent_id); return source; } } // there is no instance matching the id ComponentInComponent_c new_inst = new ComponentInComponent_c(modelRoot, p_m_id, p_m_parent_id); return new_inst; }
public static Graphnode_c[] GraphnodeInstances( ModelRoot modelRoot, ClassQueryInterface_c test, boolean loadComponent) { InstanceList instances = modelRoot.getInstanceList(Graphnode_c.class); Vector matches = new Vector(); synchronized (instances) { for (int i = 0; i < instances.size(); ++i) { Graphnode_c x = (Graphnode_c) instances.get(i); if (test == null || test.evaluate(x)) { matches.add(x); } } if (matches.size() > 0) { Graphnode_c[] ret_set = new Graphnode_c[matches.size()]; matches.copyInto(ret_set); return ret_set; } else { return new Graphnode_c[0]; } } }
public static InformalArgument_c[] InformalArgumentInstances( ModelRoot modelRoot, ClassQueryInterface_c test, boolean loadComponent) { if (loadComponent) { PersistenceManager.ensureAllInstancesLoaded(modelRoot, InformalArgument_c.class); } InstanceList instances = modelRoot.getInstanceList(InformalArgument_c.class); Vector matches = new Vector(); synchronized (instances) { for (int i = 0; i < instances.size(); ++i) { InformalArgument_c x = (InformalArgument_c) instances.get(i); if (test == null || test.evaluate(x)) { if (x.ensureLoaded(loadComponent)) matches.add(x); } } if (matches.size() > 0) { InformalArgument_c[] ret_set = new InformalArgument_c[matches.size()]; matches.copyInto(ret_set); return ret_set; } else { return new InformalArgument_c[0]; } } }
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 void batchRelate( ModelRoot modelRoot, boolean relateProxies, boolean notifyChanges, boolean searchAllRoots) { InstanceList instances = null; ModelRoot baseRoot = modelRoot; if (ReadsValue == null) { // R609 Value_c relInst40728 = (Value_c) baseRoot.getInstanceList(Value_c.class).get(new Object[] {m_r_value_id}); // if there was no local element, check for any global elements // failing that proceed to check other model roots if (relInst40728 == null) { relInst40728 = (Value_c) Ooaofooa.getDefaultInstance() .getInstanceList(Value_c.class) .get(new Object[] {m_r_value_id}); } if (relInst40728 == 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; } relInst40728 = (Value_c) roots[i].getInstanceList(Value_c.class).get(new Object[] {m_r_value_id}); if (relInst40728 != null) break; } } // synchronized if (relInst40728 != null) { if (relateProxies || !isProxy() || (inSameComponent(this, relInst40728) && !isProxy())) { relInst40728.relateAcrossR609To(this, notifyChanges); } } } if (WritesValue == null) { // R689 Value_c relInst40729 = (Value_c) baseRoot.getInstanceList(Value_c.class).get(new Object[] {m_l_value_id}); // if there was no local element, check for any global elements // failing that proceed to check other model roots if (relInst40729 == null) { relInst40729 = (Value_c) Ooaofooa.getDefaultInstance() .getInstanceList(Value_c.class) .get(new Object[] {m_l_value_id}); } if (relInst40729 == 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; } relInst40729 = (Value_c) roots[i].getInstanceList(Value_c.class).get(new Object[] {m_l_value_id}); if (relInst40729 != null) break; } } // synchronized if (relInst40729 != null) { if (relateProxies || !isProxy() || (inSameComponent(this, relInst40729) && !isProxy())) { relInst40729.relateAcrossR689To(this, notifyChanges); } } } // R603 Statement_c relInst40730 = (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 (relInst40730 == null) { relInst40730 = (Statement_c) Ooaofooa.getDefaultInstance() .getInstanceList(Statement_c.class) .get(new Object[] {m_statement_id}); } if (relInst40730 == 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; } relInst40730 = (Statement_c) roots[i].getInstanceList(Statement_c.class).get(new Object[] {m_statement_id}); if (relInst40730 != null) break; } } // synchronized if (relInst40730 != null) { if (relateProxies || !isProxy() || (inSameComponent(this, relInst40730) && !isProxy())) { relInst40730.relateAcrossR603To(this, notifyChanges); } } }