Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] StoredFunctionCall with ROWTYPE as returnvalue

Hello,
we have a lot of StoredProcedures and StoredFunctions on the underlying Oracle 10g Database written in PL/SQL. I managed to access a Function returning a single Value of a JDBC normal Type for example by using this wrapperfunction: public <T> T executeFunction(String functionName, HashMap<String, Object> params, Class<T> returnValueClass) {
       StoredFunctionCall functionCall = new StoredFunctionCall();
       functionCall.setProcedureName(functionName);
       ValueReadQuery query = new ValueReadQuery();
       query.setCall(functionCall);
       List args = new ArrayList();
       for (String key : params.keySet()) {
           functionCall.addNamedArgument(key);
           query.addArgument(key);
           args.add(params.get(key));
       }
      functionCall.setResult("FUNCTION_RESULT", returnValueClass);
      return (T) getSession().executeQuery(query, args);
   }


But some of our Function return a row of a Table. For example:
FUNCTION rowGetZwParameter(pnParID IN NUMBER) RETURN T_ZWPARAMETER%ROWTYPE;

How do I access such a Function?

I'm very kind of any help.
Berner Martin


Back to the top