-->
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.  [ 3 posts ] 
Author Message
 Post subject: Issue - call Oracle procedure with custom data type
PostPosted: Thu Jan 11, 2007 3:32 am 
Newbie

Joined: Thu Jan 11, 2007 2:49 am
Posts: 4
Code:

I have a custom date TYPE in Oracle

like

CREATE TYPE DATEARRAY AS TABLE OF DATE;

it will create TYPE, like date array

and I have a Oracle function also

like

CREATE OR REPLACE FUNCTION doesContain (list DATEARRAY, val VARCHAR2) RETURN NUMBER
IS
....
....
....
END doesContain;

In my Java class,

I have a collection which contain a list of java.util.Date objects

When I call Oracle function "doesContain", how to pass my java collection to this Oracle function ...

can you provide sample code ?


Thanks,

Pulikkottil






Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 11, 2007 6:23 am 
Expert
Expert

Joined: Tue Nov 23, 2004 7:00 pm
Posts: 570
Location: mostly Frankfurt Germany
In the Hibernate Wiki is an information using a UserType for this issue. If you are calling the Stored Procedure outside of Hibernate for example using the underlying connection of the session, you can have a look at the Oracle website. They describe how to use User types with JDBC.

_________________
Best Regards
Sebastian
---
Training for Hibernate and Java Persistence
Tutorials for Hibernate, Spring, EJB, JSF...
eBook: Hibernate 3 - DeveloperGuide
Paper book: Hibernate 3 - Das Praxisbuch
http://www.laliluna.de


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 11, 2007 6:35 am 
Newbie

Joined: Thu Jan 11, 2007 2:49 am
Posts: 4
No... we use hibernate call

<sql-query name="getDate" callable="true">
<return class="com.abc.StopResults">
<return-property name="stopDate" column="ST_P_DATE"/>
</return>
{ ? = call (:DATEARRAY, :planid)}
</sql-query>


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.