DBA Data[Home] [Help]

PACKAGE BODY: APPS.JTF_ICXSES

Source


1 package body jtf_icxses as
2 /* $Header: jtficxseb.pls 115.10 2004/07/14 00:40:23 sayarram noship $ */
3 
4 procedure updateSessionInfo(sessionid in number, nametab in jtf_varchar2_table_100, valtab in jtf_varchar2_table_2000, delNameTab in jtf_varchar2_Table_100 ) is
5 PRAGMA AUTONOMOUS_TRANSACTION;
6 indx binary_integer; name varchar2(30); value varchar2(4000);
7 stmt varchar2(200);
8 begin
9   --dbms_output.put_line('something....');
10   --dbms_output.put_line('something1....');
11 
12          -- remove the delete list.
13        if delNameTab is not null and delNameTab.count > 0 then
14      	   begin
15           forall i in delNameTab.first .. delNameTab.last
16            delete from icx_session_attributes where session_id = sessionid and name= delNameTab(i);
17          end;
18        end if;
19 
20          -- remove the update list.
21        if nametab is not null and nametab.count > 0 then
22      	  begin
23           forall i in nametab.first .. nametab.last
24             delete from icx_session_attributes where session_id = sessionid and name= nametab(i);
25         end;
26        end if;
27 
28       -- insert the update list.
29       --dbms_output.put_line('something2....');
30       if nametab is not null and nametab.count > 0 then
31         begin
32           forall i in nametab.first .. nametab.last
33             insert into icx_session_attributes (session_id, name, value) values(sessionid, nametab(i), valtab(i));
34         end;
35       end if;
36 
37      commit;
38   exception
39     when others then
40       rollback;
41 
42 end updateSessionInfo;
43 end jtf_icxses;