1 package body umx_registration_pvt_w as
2 /* $Header: UMXWREGB.pls 120.1.12010000.2 2009/07/22 19:06:00 jstyles ship $ */
3 rosetta_g_mistake_date date := to_date('01/01/+4713', 'MM/DD/SYYYY');
4 rosetta_g_miss_date date := to_date('01/01/-4712', 'MM/DD/SYYYY');
5
6 -- this is to workaround the JDBC bug regarding IN DATE of value GMiss
7 function rosetta_g_miss_date_in_map(d date) return date as
8 begin
9 if d = rosetta_g_mistake_date then return fnd_api.g_miss_date; end if;
10 return d;
11 end;
12
13 procedure rosetta_table_copy_in_p1(t out nocopy umx_registration_pvt.umx_registration_data_tbl, a0 JTF_VARCHAR2_TABLE_100
14 , a1 JTF_VARCHAR2_TABLE_2000
15 ) as
16 ddindx binary_integer; indx binary_integer;
17 begin
18 if a0 is not null and a0.count > 0 then
19 if a0.count > 0 then
20 indx := a0.first;
21 ddindx := 1;
22 while true loop
23 t(ddindx).attr_name := a0(indx);
24 t(ddindx).attr_value := a1(indx);
25 ddindx := ddindx+1;
26 if a0.last =indx
27 then exit;
28 end if;
29 indx := a0.next(indx);
30 end loop;
31 end if;
32 end if;
33 end rosetta_table_copy_in_p1;
34
35 procedure rosetta_table_copy_out_p1(t umx_registration_pvt.umx_registration_data_tbl, a0 out nocopy JTF_VARCHAR2_TABLE_100
36 , a1 out nocopy JTF_VARCHAR2_TABLE_2000
37 ) as
38 ddindx binary_integer; indx binary_integer;
39 begin
40 if t is null or t.count = 0 then
41 a0 := JTF_VARCHAR2_TABLE_100();
42 a1 := JTF_VARCHAR2_TABLE_2000();
43 else
44 a0 := JTF_VARCHAR2_TABLE_100();
45 a1 := JTF_VARCHAR2_TABLE_2000();
46 if t.count > 0 then
47 a0.extend(t.count);
48 a1.extend(t.count);
49 ddindx := t.first;
50 indx := 1;
51 while true loop
52 a0(indx) := t(ddindx).attr_name;
53 a1(indx) := t(ddindx).attr_value;
54 indx := indx+1;
55 if t.last =ddindx
56 then exit;
57 end if;
58 ddindx := t.next(ddindx);
59 end loop;
60 end if;
61 end if;
62 end rosetta_table_copy_out_p1;
63
64 procedure umx_process_reg_request(p0_a0 in out nocopy JTF_VARCHAR2_TABLE_100
65 , p0_a1 in out nocopy JTF_VARCHAR2_TABLE_2000
66 , x_return_status out NOCOPY varchar2
67 , x_message_data out NOCOPY varchar2) as
68
69 ddp_registration_data umx_registration_pvt.umx_registration_data_tbl;
70 ddindx binary_integer; indx binary_integer;
71 begin
72
73 -- copy data to the local IN or IN-OUT args, if any
74 umx_registration_pvt_w.rosetta_table_copy_in_p1(ddp_registration_data, p0_a0 , p0_a1);
75
76 -- here's the delegated call to the old PL/SQL routine
77 umx_registration_pvt.umx_process_reg_request(ddp_registration_data,x_return_status, x_message_data);
78
79 -- copy data back from the local variables to OUT or IN-OUT args, if any
80 umx_registration_pvt_w.rosetta_table_copy_out_p1(ddp_registration_data, p0_a0 , p0_a1);
81 end;
82
83 procedure populate_reg_data(p0_a0 in out nocopy JTF_VARCHAR2_TABLE_100
84 , p0_a1 in out nocopy JTF_VARCHAR2_TABLE_2000
85 )
86
87 as
88 ddp_registration_data umx_registration_pvt.umx_registration_data_tbl;
89 ddindx binary_integer; indx binary_integer;
90 begin
91
92 -- copy data to the local IN or IN-OUT args, if any
93 umx_registration_pvt_w.rosetta_table_copy_in_p1(ddp_registration_data, p0_a0 , p0_a1);
94
95 -- here's the delegated call to the old PL/SQL routine
96 umx_registration_pvt.populate_reg_data(ddp_registration_data);
97
98 -- copy data back from the local variables to OUT or IN-OUT args, if any
99 umx_registration_pvt_w.rosetta_table_copy_out_p1(ddp_registration_data, p0_a0 , p0_a1);
100 end;
101
102 procedure assign_role(p0_a0 in out nocopy JTF_VARCHAR2_TABLE_100
103 , p0_a1 in out nocopy JTF_VARCHAR2_TABLE_2000
104 , x_return_status out NOCOPY varchar2
105 , x_message_data out NOCOPY varchar2) as
106 ddp_registration_data umx_registration_pvt.umx_registration_data_tbl;
107 ddindx binary_integer; indx binary_integer;
108 begin
109
110 -- copy data to the local IN or IN-OUT args, if any
111 umx_registration_pvt_w.rosetta_table_copy_in_p1(ddp_registration_data, p0_a0
112 , p0_a1
113 );
114
115 -- here's the delegated call to the old PL/SQL routine
116 umx_registration_pvt.assign_role(ddp_registration_data, x_return_status, x_message_data);
117
118 -- copy data back from the local variables to OUT or IN-OUT args, if any
119 umx_registration_pvt_w.rosetta_table_copy_out_p1(ddp_registration_data, p0_a0
120 , p0_a1
121 );
122 end;
123
124 end umx_registration_pvt_w;