Search in sources :

Example 1 with ODataRuntimeException

use of org.apache.olingo.commons.api.ex.ODataRuntimeException in project teiid by teiid.

the class ODataSQLBuilder method visitOperation.

private void visitOperation(EdmOperation operation) {
    try {
        ProcedureSQLBuilder builder = new ProcedureSQLBuilder(this.metadata, operation, this.parameters, this.params);
        ProcedureReturn pp = builder.getReturn();
        if (!pp.hasResultSet()) {
            NoDocumentNode ndn = new NoDocumentNode();
            ndn.setProcedureReturn(pp);
            ndn.setQuery(builder.buildProcedureSQL());
            this.context = ndn;
        } else {
            ComplexDocumentNode cdn = ComplexDocumentNode.buildComplexDocumentNode(operation, this.metadata, this.odata, this.nameGenerator, this.aliasedGroups, getUriInfo(), this.parseService);
            cdn.setProcedureReturn(pp);
            this.context = cdn;
        }
    } catch (TeiidProcessingException e) {
        throw new ODataRuntimeException(e);
    }
}
Also used : ProcedureReturn(org.teiid.olingo.service.ProcedureSQLBuilder.ProcedureReturn) ODataRuntimeException(org.apache.olingo.commons.api.ex.ODataRuntimeException) TeiidProcessingException(org.teiid.core.TeiidProcessingException)

Aggregations

ODataRuntimeException (org.apache.olingo.commons.api.ex.ODataRuntimeException)1 TeiidProcessingException (org.teiid.core.TeiidProcessingException)1 ProcedureReturn (org.teiid.olingo.service.ProcedureSQLBuilder.ProcedureReturn)1