How to use a Get Ref Cursor with Eclipselink Storedfunctioncall ? (Doc ID 1383512.1)

Last updated on MARCH 12, 2015

Applies to:

Oracle TopLink - Version: 11.1.1.0.2 and later   [Release: Oracle11g and later ]
Information in this document applies to any platform.

Goal

An Oracle Database Server stored function is returning a REF Cursor as the following :

create or replace function getDiscoveryRows
(v_name IN varchar2,
v_location IN varchar2
) return sys_refcursor
as
vCursor sys_refcursor;
begin
open vCursor for 'select dname from dept';
return vCursor;
end;
/

Using EclipseLink 2.1.x , the question is to know how to obtain the results of this cursor using the org.eclipse.persistence.queries.StoredFunctionCall class.

The goal of this Note is to show how to use the get ref cursor using an Eclipselink StoredFunctionCall .

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms