Home » Developer & Programmer » JDeveloper, Java & XML » Passing array of objects from java to oracle.
Passing array of objects from java to oracle. [message #214132] Mon, 15 January 2007 01:56
kdipankar
Messages: 9
Registered: December 2006
Junior Member
Hi,
We have the following structure in oracle.

We have a nested table type of varchar2(50).
-----------------------------------------------------------
type var_tab is table of varchar2(50);
-----------------------------------------------------------
We have one object type with one member as varchar2 and another one as var_tab type.
-------------------------------------------------
type attribute_obj is object(
attrib_name varchar2(100)
,attrib_val var_tab
);
-------------------------------------------------
Then we have table type of that object type,
-------------------------------------------------
type table_tab is table of attribute_obj;
-------------------------------------------------
Then we have one object type with one member as varchar2,another member as integer and another one as table_tab type.
------------------------------------------------
type prod_obj is object(
pr_name varchar2(100), tb_flag integer
,pr_attrib table_tab
);
------------------------------------------------
Then we have table type of this object type,
----------------------------------------------
type prod_tab as table of prod_obj;
----------------------------------------------
So, the total structure is something like this;
'OS','OS_NAME', 'Windows'
'Linux'
'UNIX'
'OS_VERSION','XP'
'RED HAT'
'SOLARIS'

so, basically we have
x prod_tab:=prod_tab();
x(3):=prod_obj('OS',0,table_tab(attribute_obj('OS_NAME',var_tab('Windows','Linux','UNIX')),attribute_obj('OS_VERSION','XP','RED HAT','SOLARIS'))));
And this how we call the procedure ---
all_prod_comb_pkg.sp_main(x)
------------------------------------------------
The procedure deifinition is -
procedure sp_main ( p_prod_arr prod_tab);
------------------------------------------------
Please suggest a way so that we can implement the same structure in Java and then call the procedure using that array of objects from java.

regards,
Dipankar.
Previous Topic: how get radiobutton index in textfield
Next Topic: Reading XML file
Goto Forum:
  


Current Time: Thu Dec 05 07:09:17 CST 2024