-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: http://www.hibernate.org/hib_docs/v3/reference/en/html_singl
PostPosted: Sun Jan 01, 2006 9:51 pm 
Beginner
Beginner

Joined: Wed Dec 14, 2005 10:32 am
Posts: 20
Is there any sample java code for calling a function that returns a sys_refcursor?

I have a stored procedure like this:
CREATE OR REPLACE FUNCTION Batch_Process ( p_active_dt IN DATE,p_truncate IN CHAR)

RETURN Types.cursor_type
AS
st_cursor Types.cursor_type;

.....

END Batch_Process

and the Mapping




<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping>
<class name="com.telcove.phoenix.picc.dao.common.PICCRecord"
dynamic-insert="false"
dynamic-update="false">

<id name="correlationID" type="string" >
<generator class="increment"/>
</id>




</class>
<sql-query name="Sp_Pic" callable="true">
<return class="com.example.Record" />
{? = call SpBatch_Process (?,?) }

</sql-query>

</hibernate-mapping>


any help is greatly appreciated.

-Ram


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 01, 2006 11:19 pm 
Expert
Expert

Joined: Sat Jun 12, 2004 4:49 pm
Posts: 915
you have example in hibernate reference
file:///u2/radni/hibernate-3.1/doc/reference/en/html_single/index.html#sp_query


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.