This discussion is archived
0 Replies Latest reply: Sep 10, 2012 4:00 AM by 961061 RSS

How to return multiple instances from a Java stored procedure

961061 Newbie
Currently Being Moderated
Hi Guys

So I have written a Java stored procedure that shoudl return a list of Subscriber changes.

A subscriber change is just a java POJO and the procedure will just query a change table to get indications of all the changes that has happened since last and then build a number of theses SubscriptionChange instances.

Now I want to be able to expose these from the procedure to another java client so the questions are,

1. How should I declare the Java method to be able to send output as a ARRAY or List of values

Example: public List<SubscriberChange> getSubscriptionChanges(){}

(I know this is not how it will look but just to give you the idea)

2. How should I publish the method using 'CREATE OR REPLACE PACKAGE po_mgr AS'

3. How should I call it on the java client side

I have to say it is extremely hard to find a full example of this and I guess someone else is doing it.


Thanks for your efforts


Magnus

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points