Java interface to Oracle object types [message #394542] |
Fri, 27 March 2009 13:30 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
Rudolphk
Messages: 7 Registered: March 2009 Location: Washington D.C.
|
Junior Member |
|
|
I know I can use oracle.STRUCT to map a Java object to an Oracle object type in order to access the attributes of the Oracle object. Is there an API which allows me to also access the member functions/procedures of an Oracle object?
|
|
|
Re: Java interface to Oracle object types [message #395180 is a reply to message #394542] |
Tue, 31 March 2009 10:06 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
Rudolphk
Messages: 7 Registered: March 2009 Location: Washington D.C.
|
Junior Member |
|
|
I found the answer to my own question. The solution is to make your class implement the oracle.sql.ORAData interface. A really easy way to do this is to create your Oracle object type in the database, then run:
jpub -user=user/pass -sql=my_object_type -methods=true
This will create the java code to create your object mapping, though the code is a bit messy.
|
|
|