DBA Data[Home] [Help]

PACKAGE BODY: APPS.IBE_TPLCATEGORY_GRP_W

Source


1 package body ibe_tplcategory_grp_w as
2   /* $Header: IBEGRTGB.pls 115.1 2002/12/18 07:10:23 schak 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   function rosetta_g_miss_num_map(n number) return number as
14     a number := fnd_api.g_miss_num;
15     b number := 0-1962.0724;
16   begin
17     if n=a then return b; end if;
18     if n=b then return a; end if;
19     return n;
20   end;
21 
22   procedure rosetta_table_copy_in_p2(t out nocopy ibe_tplcategory_grp.category_id_tbl_type, a0 JTF_NUMBER_TABLE) as
23     ddindx binary_integer; indx binary_integer;
24   begin
25   if a0 is not null and a0.count > 0 then
26       if a0.count > 0 then
27         indx := a0.first;
28         ddindx := 1;
29         while true loop
30           t(ddindx) := rosetta_g_miss_num_map(a0(indx));
31           ddindx := ddindx+1;
32           if a0.last =indx
33             then exit;
34           end if;
35           indx := a0.next(indx);
36         end loop;
37       end if;
38    end if;
39   end rosetta_table_copy_in_p2;
40   procedure rosetta_table_copy_out_p2(t ibe_tplcategory_grp.category_id_tbl_type, a0 out nocopy JTF_NUMBER_TABLE) as
41     ddindx binary_integer; indx binary_integer;
42   begin
43   if t is null or t.count = 0 then
44     a0 := JTF_NUMBER_TABLE();
45   else
46       a0 := JTF_NUMBER_TABLE();
47       if t.count > 0 then
48         a0.extend(t.count);
49         ddindx := t.first;
50         indx := 1;
51         while true loop
52           a0(indx) := rosetta_g_miss_num_map(t(ddindx));
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_p2;
62 
63   procedure rosetta_table_copy_in_p3(t out nocopy ibe_tplcategory_grp.template_id_tbl_type, a0 JTF_NUMBER_TABLE) as
64     ddindx binary_integer; indx binary_integer;
65   begin
66   if a0 is not null and a0.count > 0 then
67       if a0.count > 0 then
68         indx := a0.first;
69         ddindx := 1;
70         while true loop
71           t(ddindx) := rosetta_g_miss_num_map(a0(indx));
72           ddindx := ddindx+1;
73           if a0.last =indx
74             then exit;
75           end if;
76           indx := a0.next(indx);
77         end loop;
78       end if;
79    end if;
80   end rosetta_table_copy_in_p3;
81   procedure rosetta_table_copy_out_p3(t ibe_tplcategory_grp.template_id_tbl_type, a0 out nocopy JTF_NUMBER_TABLE) as
82     ddindx binary_integer; indx binary_integer;
83   begin
84   if t is null or t.count = 0 then
85     a0 := JTF_NUMBER_TABLE();
86   else
87       a0 := JTF_NUMBER_TABLE();
88       if t.count > 0 then
89         a0.extend(t.count);
90         ddindx := t.first;
91         indx := 1;
92         while true loop
93           a0(indx) := rosetta_g_miss_num_map(t(ddindx));
94           indx := indx+1;
95           if t.last =ddindx
96             then exit;
97           end if;
98           ddindx := t.next(ddindx);
99         end loop;
100       end if;
101    end if;
102   end rosetta_table_copy_out_p3;
103 
104   procedure rosetta_table_copy_in_p4(t out nocopy ibe_tplcategory_grp.tpl_ctg_id_tbl_type, a0 JTF_NUMBER_TABLE) as
105     ddindx binary_integer; indx binary_integer;
106   begin
107   if a0 is not null and a0.count > 0 then
108       if a0.count > 0 then
109         indx := a0.first;
110         ddindx := 1;
111         while true loop
112           t(ddindx) := rosetta_g_miss_num_map(a0(indx));
113           ddindx := ddindx+1;
114           if a0.last =indx
115             then exit;
116           end if;
117           indx := a0.next(indx);
118         end loop;
119       end if;
120    end if;
121   end rosetta_table_copy_in_p4;
122   procedure rosetta_table_copy_out_p4(t ibe_tplcategory_grp.tpl_ctg_id_tbl_type, a0 out nocopy JTF_NUMBER_TABLE) as
123     ddindx binary_integer; indx binary_integer;
124   begin
125   if t is null or t.count = 0 then
126     a0 := JTF_NUMBER_TABLE();
127   else
128       a0 := JTF_NUMBER_TABLE();
129       if t.count > 0 then
130         a0.extend(t.count);
131         ddindx := t.first;
132         indx := 1;
133         while true loop
134           a0(indx) := rosetta_g_miss_num_map(t(ddindx));
135           indx := indx+1;
136           if t.last =ddindx
137             then exit;
138           end if;
139           ddindx := t.next(ddindx);
140         end loop;
141       end if;
142    end if;
143   end rosetta_table_copy_out_p4;
144 
145   procedure add_tpl_ctg(p_api_version  NUMBER
146     , p_init_msg_list  VARCHAR2
147     , p_commit  VARCHAR2
148     , x_return_status out nocopy  VARCHAR2
149     , x_msg_count out nocopy  NUMBER
150     , x_msg_data out nocopy  VARCHAR2
151     , p_template_id  NUMBER
152     , p_category_id_tbl JTF_NUMBER_TABLE
153   )
154 
155   as
156     ddp_category_id_tbl ibe_tplcategory_grp.category_id_tbl_type;
157     ddindx binary_integer; indx binary_integer;
158   begin
159 
160     -- copy data to the local IN or IN-OUT args, if any
161 
162 
163 
164 
165 
166 
167 
168     ibe_tplcategory_grp_w.rosetta_table_copy_in_p2(ddp_category_id_tbl, p_category_id_tbl);
169 
170     -- here's the delegated call to the old PL/SQL routine
171     ibe_tplcategory_grp.add_tpl_ctg(p_api_version,
172       p_init_msg_list,
173       p_commit,
174       x_return_status,
175       x_msg_count,
176       x_msg_data,
177       p_template_id,
178       ddp_category_id_tbl);
179 
180     -- copy data back from the local variables to OUT or IN-OUT args, if any
181 
182 
183 
184 
185 
186 
187 
188   end;
189 
190   procedure delete_tpl_ctg_relation(p_api_version  NUMBER
191     , p_init_msg_list  VARCHAR2
192     , p_commit  VARCHAR2
193     , x_return_status out nocopy  VARCHAR2
194     , x_msg_count out nocopy  NUMBER
195     , x_msg_data out nocopy  VARCHAR2
196     , p_tpl_ctg_id_tbl JTF_NUMBER_TABLE
197   )
198 
199   as
200     ddp_tpl_ctg_id_tbl ibe_tplcategory_grp.tpl_ctg_id_tbl_type;
201     ddindx binary_integer; indx binary_integer;
202   begin
203 
204     -- copy data to the local IN or IN-OUT args, if any
205 
206 
207 
208 
209 
210 
211     ibe_tplcategory_grp_w.rosetta_table_copy_in_p4(ddp_tpl_ctg_id_tbl, p_tpl_ctg_id_tbl);
212 
213     -- here's the delegated call to the old PL/SQL routine
214     ibe_tplcategory_grp.delete_tpl_ctg_relation(p_api_version,
215       p_init_msg_list,
216       p_commit,
217       x_return_status,
218       x_msg_count,
219       x_msg_data,
220       ddp_tpl_ctg_id_tbl);
221 
222     -- copy data back from the local variables to OUT or IN-OUT args, if any
223 
224 
225 
226 
227 
228 
229   end;
230 
231   procedure add_ctg_tpl(p_api_version  NUMBER
232     , p_init_msg_list  VARCHAR2
233     , p_commit  VARCHAR2
234     , x_return_status out nocopy  VARCHAR2
235     , x_msg_count out nocopy  NUMBER
236     , x_msg_data out nocopy  VARCHAR2
237     , p_category_id  NUMBER
238     , p_template_id_tbl JTF_NUMBER_TABLE
239   )
240 
241   as
242     ddp_template_id_tbl ibe_tplcategory_grp.template_id_tbl_type;
243     ddindx binary_integer; indx binary_integer;
244   begin
245 
246     -- copy data to the local IN or IN-OUT args, if any
247 
248 
249 
250 
251 
252 
253 
254     ibe_tplcategory_grp_w.rosetta_table_copy_in_p3(ddp_template_id_tbl, p_template_id_tbl);
255 
256     -- here's the delegated call to the old PL/SQL routine
257     ibe_tplcategory_grp.add_ctg_tpl(p_api_version,
258       p_init_msg_list,
259       p_commit,
260       x_return_status,
261       x_msg_count,
262       x_msg_data,
263       p_category_id,
264       ddp_template_id_tbl);
265 
266     -- copy data back from the local variables to OUT or IN-OUT args, if any
267 
268 
269 
270 
271 
272 
273 
274   end;
275 
276 end ibe_tplcategory_grp_w;