Hi,
I have a SP which do not have a parameter to sort the result. (I can not pass the "order by" clause as a IN parameter.) I do not have access to change the SP & even if I change ; it will affect many other applications.
So, I want to sort the result set (which is a refcursor) on a perticular attribute name in java. Is there any way to do that ?
My DB is oracle 10i. JDK 1.5. Hibernate 3.x.
Here is the SP :
Code:
Create or replace PROCEDURE my_borrow (
p_ret_cur OUT sys_refcursor,
in_group_id NUMBER
)...........sp code
Here is Java code :
Code:
Query proc = SessionFactory.getCurrentSession().getNamedQuery("my_borrow");
proc.setParameter("in_group_id", 1123);
List list= proc.list();
I want the list sorted on the some attribute. (I can do that using comparator, but I want to know is there any way with hibernate to achieve this? May be using somewhat similar to Criteria class ?). Any help is appriciable.
Thanks