I have stored procedure in Oracle DB. It's output parameters are Number ("RETURN_VALUE") and three parameters of SYS_REFCURSOR type ("ONE", "TWO"...). I know how to call this procedure and to get numeric parameter:
SimpleJdbcCall call = new SimpleJdbcCall(jdbcTemplate)
.withProcedureName("NAME")
.withReturnValue();
Map<String, Object> response = call.execute(new MapSqlParameterSource(...));
Integer responseCode = (Integer) response.get("RETURN_VALUE");
But how to map SYS_REFCURSOR parameter to some List of DesiredClassType?
List<DesiredClassType> list = (List<DesiredClassType>) response.get("ONE");
I found a solution for this problem by using a CallableStatement instead of SimpleJdbcCall.