Package org.restlet.ext.odata.internal.edm

Examples of org.restlet.ext.odata.internal.edm.FunctionImport


            Series<Parameter> parameters) throws ResourceException {
        Representation result = null;
        Metadata metadata = (Metadata) getMetadata();
        if (metadata != null && service != null) {
            // Look for the FunctionImport element.
            FunctionImport function = null;
            for (EntityContainer container : metadata.getContainers()) {
                for (FunctionImport f : container.getFunctionImports()) {
                    if (service.equals(f.getName())) {
                        function = f;
                        break;
                    }
                }
                if (function != null) {
                    break;
                }
            }

            if (function != null) {
                ClientResource resource = createResource(service);
                resource.setMethod(function.getMethod());
                if (parameters != null) {
                    for (org.restlet.ext.odata.internal.edm.Parameter parameter : function
                            .getParameters()) {
                        resource.getReference().addQueryParameter(
                                parameter.getName(),
                                TypeUtils.getLiteralForm(parameters
                                        .getFirstValue(parameter.getName()),
View Full Code Here

TOP

Related Classes of org.restlet.ext.odata.internal.edm.FunctionImport

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.