Home » Developer & Programmer » JDeveloper, Java & XML » About Creating Java Objects in Oracle (oracle 10g)
About Creating Java Objects in Oracle [message #321127] Mon, 19 May 2008 03:19 Go to next message
didiera
Messages: 134
Registered: August 2007
Location: Mauritius
Senior Member
Hi all,

I have been playing around these days with creating and using java objects in oracle database. In all the examples i've consulted online, i've found a ubiquitous pattern of imports; namely

import java.io.*;
import java.util.*;

...I was wondering if this is compulsory in getting java code to execute properly in response to RPC calls from oracle stored procs/ functions?

One other thing i've noticed is that java classes declared via the
CREATE [...]JAVA SOURCE NAMED[...] did not always follow the usual Java standards; namely you could create a Java object as a class without providing a constructor implementation and yet get to call its member functions. Is that all ok (looks like anyway )?

Last question : Regarding data types and parameter passing, are there any implications/incompatibilities to provide for as far as complex data types are concerned? I know this is a very vast question and I can see some expert eyebrows raising... but say, can I pass in a record type from oracle and get a serializable object in response or something like that?

Thanks in advance and don't bother if it's too mind-boggling
Didz
Re: About Creating Java Objects in Oracle [message #321220 is a reply to message #321127] Mon, 19 May 2008 08:16 Go to previous message
Frank
Messages: 7901
Registered: March 2000
Senior Member
The imports are mandatory if you use anything from those packages. Wouldn't worry about it though, it's not like the complete package is imported, it's merely a guidance to the compiler as to what namespaces can be used.
Every class has a constructor. If you do not create one explicitly, it inherits the default contructor from Object.
That's no different from regular java.
Previous Topic: Number of node elements in XML
Next Topic: How to query for xml atrribute?
Goto Forum:
  


Current Time: Fri Mar 29 03:26:05 CDT 2024