Package org.adfemg.datacontrol.xml.provider.structure

Examples of org.adfemg.datacontrol.xml.provider.structure.MovableStructureDefinition


            }

            // have StructureProvider build a StructureDef for root data node (XSD Element or ComplexType)
            StructureProvider structProv = defNode.getProviderInstance(StructureProvider.class);
            TypeMapper typeMapper = defNode.getProviderInstance(TypeMapper.class);
            MovableStructureDefinition structDef =
                structProv.buildStructure(rootDataNode, getReturnStructName(rootStruct, defNode), typeMapper);

            // create MethodDef with StructureDef from StructureProvider as return value
            final MethodDef method = new MethodDef(defNode.getDatacontrolOperation(), rootStruct);
            rootStruct.addMethod(method);

            // add parameters to method-definition if data provider has dynamic parameters
            {
                final Set<DynamicParameter> dynamicParams = defNode.getDynamicParams();
                if (dynamicParams != null) {
                    for (DynamicParameter dynpar : dynamicParams) {
                        method.addParameter(dynpar.getName(), dynpar.getJavaType());
                    }
                }
            }

            // link StructureDef to MethodDef using a MethodReturnDef
            final MethodReturnDef methodReturn =
                new MethodReturnDef(rootDataNode.getName(), structDef, method, COLLECTION_FALSE,
                                    SCALAR_COLLECTION_FALSE);
            structDef.setParent(methodReturn);
            method.setReturnType(methodReturn);

            // apply customizations to the structure
            CustomizationProvider custProv = defNode.getProviderInstance(CustomizationProvider.class);
            if (custProv != null) {
View Full Code Here

TOP

Related Classes of org.adfemg.datacontrol.xml.provider.structure.MovableStructureDefinition

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.