1 package body jtf_icxses as
2 /* $Header: jtficxseb.pls 120.1.12010000.2 2008/10/06 05:22:37 gteella ship $ */
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 commit;
18 exception
19 when others then
20 rollback;
21 end;
22 end if;
23
24 -- remove the update list.
25 if nametab is not null and nametab.count > 0 then
26 begin
27 forall i in nametab.first .. nametab.last
28 delete from icx_session_attributes where session_id = sessionid and name= nametab(i);
29 commit;
30 exception
31 when others then
32 rollback;
33 end;
34 end if;
35
36 -- insert the update list.
37 --dbms_output.put_line('something2....');
38 if nametab is not null and nametab.count > 0 then
39 begin
40 forall i in nametab.first .. nametab.last
41 insert into icx_session_attributes (session_id, name, value) values(sessionid, nametab(i), valtab(i));
42 commit;
43 exception
44 when others then
45 rollback;
46 end;
47 end if;
48
49 commit;
50 exception
51 when others then
52 rollback;
53
54 end updateSessionInfo;
55 end jtf_icxses;