DBA Data[Home] [Help]

PACKAGE BODY: APPS.UMX_REGISTRATION_PVT_W

Source


1 package body umx_registration_pvt_w as
2   /* $Header: UMXWREGB.pls 115.2 2004/07/09 20:36:37 kching noship $ */
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   procedure rosetta_table_copy_out_p1(t umx_registration_pvt.umx_registration_data_tbl, a0 out nocopy JTF_VARCHAR2_TABLE_100
35     , a1 out nocopy JTF_VARCHAR2_TABLE_2000
36     ) as
37     ddindx binary_integer; indx binary_integer;
38   begin
39   if t is null or t.count = 0 then
40     a0 := JTF_VARCHAR2_TABLE_100();
41     a1 := JTF_VARCHAR2_TABLE_2000();
42   else
43       a0 := JTF_VARCHAR2_TABLE_100();
44       a1 := JTF_VARCHAR2_TABLE_2000();
45       if t.count > 0 then
46         a0.extend(t.count);
47         a1.extend(t.count);
48         ddindx := t.first;
49         indx := 1;
50         while true loop
51           a0(indx) := t(ddindx).attr_name;
52           a1(indx) := t(ddindx).attr_value;
53           indx := indx+1;
54           if t.last =ddindx
55             then exit;
56           end if;
57           ddindx := t.next(ddindx);
58         end loop;
59       end if;
60    end if;
61   end rosetta_table_copy_out_p1;
62 
63   procedure umx_process_reg_request(p0_a0 in out nocopy JTF_VARCHAR2_TABLE_100
64     , p0_a1 in out nocopy JTF_VARCHAR2_TABLE_2000
65   )
66 
67   as
68     ddp_registration_data umx_registration_pvt.umx_registration_data_tbl;
69     ddindx binary_integer; indx binary_integer;
70   begin
71 
72     -- copy data to the local IN or IN-OUT args, if any
73     umx_registration_pvt_w.rosetta_table_copy_in_p1(ddp_registration_data, p0_a0
74       , p0_a1
75       );
76 
77     -- here's the delegated call to the old PL/SQL routine
78     umx_registration_pvt.umx_process_reg_request(ddp_registration_data);
79 
80     -- copy data back from the local variables to OUT or IN-OUT args, if any
81     umx_registration_pvt_w.rosetta_table_copy_out_p1(ddp_registration_data, p0_a0
82       , p0_a1
83       );
84   end;
85 
86   procedure populate_reg_data(p0_a0 in out nocopy JTF_VARCHAR2_TABLE_100
87     , p0_a1 in out nocopy JTF_VARCHAR2_TABLE_2000
88   )
89 
90   as
91     ddp_registration_data umx_registration_pvt.umx_registration_data_tbl;
92     ddindx binary_integer; indx binary_integer;
93   begin
94 
95     -- copy data to the local IN or IN-OUT args, if any
96     umx_registration_pvt_w.rosetta_table_copy_in_p1(ddp_registration_data, p0_a0
97       , p0_a1
98       );
99 
100     -- here's the delegated call to the old PL/SQL routine
101     umx_registration_pvt.populate_reg_data(ddp_registration_data);
102 
103     -- copy data back from the local variables to OUT or IN-OUT args, if any
104     umx_registration_pvt_w.rosetta_table_copy_out_p1(ddp_registration_data, p0_a0
105       , p0_a1
106       );
107   end;
108 
109   procedure assign_role(p0_a0 in out nocopy JTF_VARCHAR2_TABLE_100
110     , p0_a1 in out nocopy JTF_VARCHAR2_TABLE_2000
111   )
112 
113   as
114     ddp_registration_data umx_registration_pvt.umx_registration_data_tbl;
115     ddindx binary_integer; indx binary_integer;
116   begin
117 
118     -- copy data to the local IN or IN-OUT args, if any
119     umx_registration_pvt_w.rosetta_table_copy_in_p1(ddp_registration_data, p0_a0
120       , p0_a1
121       );
122 
123     -- here's the delegated call to the old PL/SQL routine
124     umx_registration_pvt.assign_role(ddp_registration_data);
125 
126     -- copy data back from the local variables to OUT or IN-OUT args, if any
127     umx_registration_pvt_w.rosetta_table_copy_out_p1(ddp_registration_data, p0_a0
128       , p0_a1
129       );
130   end;
131 
132 end umx_registration_pvt_w;