Package oracle.adf.model.adapter.dataformat

Examples of oracle.adf.model.adapter.dataformat.MethodDef


            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) {
                new Customizer(custProv).customize(method);
View Full Code Here


     * @inheritDoc
     */
    @Override
    public void adjustStructure(StructureDef structure, Operation annotation, final Method method) {
        final String methodName = method.getName();
        final MethodDef methodDef = new MethodDef(methodName, structure);
        int i = 0;
        for (Class param : method.getParameterTypes()) {
            if (i == 0) {
                // do not expose first (XMLDCElement) parameter in datacontrol structure
                i++;
                continue;
            }
            // FIXME: would be nice if we can discover the parameter names
            methodDef.addParameter(argName(i - 1), param.getName());
            i++;
        }
        Class returnType = method.getReturnType();
        if (!Void.TYPE.equals(returnType)) {
            methodDef.setReturnType(returnType.getName());
        }
        structure.addMethod(methodDef);
    }
View Full Code Here

TOP

Related Classes of oracle.adf.model.adapter.dataformat.MethodDef

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.