Exemplo n.º 1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @SuppressWarnings("unchecked") public void performModelBuild(org.camunda.bpm.model.xml.Model model)
        public virtual void performModelBuild(Model model)
        {
            // register declaring type as a referencing type of referenced type
            ModelElementTypeImpl referenceTargetType = (ModelElementTypeImpl)model.getType(referenceTargetElement);

            // the actual referenced type
            attributeReferenceImpl.ReferenceTargetElementType = referenceTargetType;

            // the referenced attribute may be declared on a base type of the referenced type.
            AttributeImpl <string> idAttribute = (AttributeImpl <string>)referenceTargetType.getAttribute("id");

            if (idAttribute != null)
            {
                idAttribute.registerIncoming(attributeReferenceImpl);
                attributeReferenceImpl.ReferenceTargetAttribute = idAttribute;
            }
            else
            {
                throw new ModelException("Element type " + referenceTargetType.TypeNamespace + ":" + referenceTargetType.TypeName + " has no id attribute");
            }
        }
Exemplo n.º 2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @SuppressWarnings("unchecked") public void performModelBuild(org.camunda.bpm.model.xml.Model model)
        public virtual void performModelBuild(Model model)
        {
            ModelElementTypeImpl referenceTargetType = (ModelElementTypeImpl)model.getType(referenceTargetClass);
            ModelElementTypeImpl referenceSourceType = (ModelElementTypeImpl)model.getType(childElementType);

            elementReferenceCollectionImpl.ReferenceTargetElementType = referenceTargetType;
            elementReferenceCollectionImpl.setReferenceSourceElementType(referenceSourceType);

            // the referenced attribute may be declared on a base type of the referenced type.
            AttributeImpl <string> idAttribute = (AttributeImpl <string>)referenceTargetType.getAttribute("id");

            if (idAttribute != null)
            {
                idAttribute.registerIncoming(elementReferenceCollectionImpl);
                elementReferenceCollectionImpl.ReferenceTargetAttribute = idAttribute;
            }
            else
            {
                throw new ModelException("Unable to find id attribute of " + referenceTargetClass);
            }
        }