1 package body ibe_physicalmap_grp_w as
2 /* $Header: IBEGRPSB.pls 115.4 2002/12/18 07:09:16 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_p0(t out nocopy ibe_physicalmap_grp.language_code_tbl_type, a0 JTF_VARCHAR2_TABLE_100) as
23 ddindx binary_integer; indx binary_integer;
24 begin
25 if a0 is null then
26 t := null;
27 elsif a0.count = 0 then
28 t := ibe_physicalmap_grp.language_code_tbl_type();
29 else
30 if a0.count > 0 then
31 t := ibe_physicalmap_grp.language_code_tbl_type();
32 t.extend(a0.count);
33 indx := a0.first;
34 ddindx := 1;
35 while true loop
36 t(ddindx) := a0(indx);
37 ddindx := ddindx+1;
38 if a0.last =indx
39 then exit;
40 end if;
41 indx := a0.next(indx);
42 end loop;
43 end if;
44 end if;
45 end rosetta_table_copy_in_p0;
46 procedure rosetta_table_copy_out_p0(t ibe_physicalmap_grp.language_code_tbl_type, a0 out nocopy JTF_VARCHAR2_TABLE_100) as
47 ddindx binary_integer; indx binary_integer;
48 begin
49 if t is null then
50 a0 := null;
51 elsif t.count = 0 then
52 a0 := JTF_VARCHAR2_TABLE_100();
53 else
54 a0 := JTF_VARCHAR2_TABLE_100();
55 if t.count > 0 then
56 a0.extend(t.count);
57 ddindx := t.first;
58 indx := 1;
59 while true loop
60 a0(indx) := t(ddindx);
61 indx := indx+1;
62 if t.last =ddindx
63 then exit;
64 end if;
65 ddindx := t.next(ddindx);
66 end loop;
67 end if;
68 end if;
69 end rosetta_table_copy_out_p0;
70
71 procedure rosetta_table_copy_in_p2(t out nocopy ibe_physicalmap_grp.msite_lang_tbl_type, a0 JTF_NUMBER_TABLE
72 , a1 JTF_NUMBER_TABLE
73 ) as
74 ddindx binary_integer; indx binary_integer;
75 begin
76 if a0 is not null and a0.count > 0 then
77 if a0.count > 0 then
78 indx := a0.first;
79 ddindx := 1;
80 while true loop
81 t(ddindx).msite_id := rosetta_g_miss_num_map(a0(indx));
82 t(ddindx).lang_count := rosetta_g_miss_num_map(a1(indx));
83 ddindx := ddindx+1;
84 if a0.last =indx
85 then exit;
86 end if;
87 indx := a0.next(indx);
88 end loop;
89 end if;
90 end if;
91 end rosetta_table_copy_in_p2;
92 procedure rosetta_table_copy_out_p2(t ibe_physicalmap_grp.msite_lang_tbl_type, a0 out nocopy JTF_NUMBER_TABLE
93 , a1 out nocopy JTF_NUMBER_TABLE
94 ) as
95 ddindx binary_integer; indx binary_integer;
96 begin
97 if t is null or t.count = 0 then
98 a0 := JTF_NUMBER_TABLE();
99 a1 := JTF_NUMBER_TABLE();
100 else
101 a0 := JTF_NUMBER_TABLE();
102 a1 := JTF_NUMBER_TABLE();
103 if t.count > 0 then
104 a0.extend(t.count);
105 a1.extend(t.count);
106 ddindx := t.first;
107 indx := 1;
108 while true loop
109 a0(indx) := rosetta_g_miss_num_map(t(ddindx).msite_id);
110 a1(indx) := rosetta_g_miss_num_map(t(ddindx).lang_count);
111 indx := indx+1;
112 if t.last =ddindx
113 then exit;
114 end if;
115 ddindx := t.next(ddindx);
116 end loop;
117 end if;
118 end if;
119 end rosetta_table_copy_out_p2;
120
121 procedure rosetta_table_copy_in_p3(t out nocopy ibe_physicalmap_grp.lgl_phys_map_id_tbl_type, a0 JTF_NUMBER_TABLE) as
122 ddindx binary_integer; indx binary_integer;
123 begin
124 if a0 is not null and a0.count > 0 then
125 if a0.count > 0 then
126 indx := a0.first;
127 ddindx := 1;
128 while true loop
129 t(ddindx) := rosetta_g_miss_num_map(a0(indx));
130 ddindx := ddindx+1;
131 if a0.last =indx
132 then exit;
133 end if;
134 indx := a0.next(indx);
135 end loop;
136 end if;
137 end if;
138 end rosetta_table_copy_in_p3;
139 procedure rosetta_table_copy_out_p3(t ibe_physicalmap_grp.lgl_phys_map_id_tbl_type, a0 out nocopy JTF_NUMBER_TABLE) as
140 ddindx binary_integer; indx binary_integer;
141 begin
142 if t is null or t.count = 0 then
143 a0 := JTF_NUMBER_TABLE();
144 else
145 a0 := JTF_NUMBER_TABLE();
146 if t.count > 0 then
147 a0.extend(t.count);
148 ddindx := t.first;
149 indx := 1;
150 while true loop
151 a0(indx) := rosetta_g_miss_num_map(t(ddindx));
152 indx := indx+1;
153 if t.last =ddindx
154 then exit;
155 end if;
156 ddindx := t.next(ddindx);
157 end loop;
158 end if;
159 end if;
160 end rosetta_table_copy_out_p3;
161
162 procedure rosetta_table_copy_in_p4(t out nocopy ibe_physicalmap_grp.msite_id_tbl_type, a0 JTF_NUMBER_TABLE) as
163 ddindx binary_integer; indx binary_integer;
164 begin
165 if a0 is not null and a0.count > 0 then
166 if a0.count > 0 then
167 indx := a0.first;
168 ddindx := 1;
169 while true loop
170 t(ddindx) := rosetta_g_miss_num_map(a0(indx));
171 ddindx := ddindx+1;
172 if a0.last =indx
173 then exit;
174 end if;
175 indx := a0.next(indx);
176 end loop;
177 end if;
178 end if;
179 end rosetta_table_copy_in_p4;
180 procedure rosetta_table_copy_out_p4(t ibe_physicalmap_grp.msite_id_tbl_type, a0 out nocopy JTF_NUMBER_TABLE) as
181 ddindx binary_integer; indx binary_integer;
182 begin
183 if t is null or t.count = 0 then
184 a0 := JTF_NUMBER_TABLE();
185 else
186 a0 := JTF_NUMBER_TABLE();
187 if t.count > 0 then
188 a0.extend(t.count);
189 ddindx := t.first;
190 indx := 1;
191 while true loop
192 a0(indx) := rosetta_g_miss_num_map(t(ddindx));
193 indx := indx+1;
194 if t.last =ddindx
195 then exit;
196 end if;
197 ddindx := t.next(ddindx);
198 end loop;
199 end if;
200 end if;
201 end rosetta_table_copy_out_p4;
202
203 procedure save_physicalmap(p_api_version NUMBER
204 , p_init_msg_list VARCHAR2
205 , p_commit VARCHAR2
206 , x_return_status out nocopy VARCHAR2
207 , x_msg_count out nocopy NUMBER
208 , x_msg_data out nocopy VARCHAR2
209 , p_attachment_id NUMBER
210 , p_msite_id NUMBER
211 , p_language_code_tbl JTF_VARCHAR2_TABLE_100
212 )
213
214 as
215 ddp_language_code_tbl ibe_physicalmap_grp.language_code_tbl_type;
216 ddindx binary_integer; indx binary_integer;
217 begin
218
219 -- copy data to the local IN or IN-OUT args, if any
220
221
222
223
224
225
226
227
228 ibe_physicalmap_grp_w.rosetta_table_copy_in_p0(ddp_language_code_tbl, p_language_code_tbl);
229
230 -- here's the delegated call to the old PL/SQL routine
231 ibe_physicalmap_grp.save_physicalmap(p_api_version,
232 p_init_msg_list,
233 p_commit,
234 x_return_status,
235 x_msg_count,
236 x_msg_data,
237 p_attachment_id,
238 p_msite_id,
239 ddp_language_code_tbl);
240
241 -- copy data back from the local variables to OUT or IN-OUT args, if any
242
243
244
245
246
247
248
249
250 end;
251
252 procedure save_physicalmap(p_api_version NUMBER
253 , p_init_msg_list VARCHAR2
254 , p_commit VARCHAR2
255 , x_return_status out nocopy VARCHAR2
256 , x_msg_count out nocopy NUMBER
257 , x_msg_data out nocopy VARCHAR2
258 , p_attachment_id NUMBER
259 , p7_a0 JTF_NUMBER_TABLE
260 , p7_a1 JTF_NUMBER_TABLE
261 , p_language_code_tbl JTF_VARCHAR2_TABLE_100
262 )
263
264 as
265 ddp_msite_lang_tbl ibe_physicalmap_grp.msite_lang_tbl_type;
266 ddp_language_code_tbl ibe_physicalmap_grp.language_code_tbl_type;
267 ddindx binary_integer; indx binary_integer;
268 begin
269
270 -- copy data to the local IN or IN-OUT args, if any
271
272
273
274
275
276
277
278 ibe_physicalmap_grp_w.rosetta_table_copy_in_p2(ddp_msite_lang_tbl, p7_a0
279 , p7_a1
280 );
281
282 ibe_physicalmap_grp_w.rosetta_table_copy_in_p0(ddp_language_code_tbl, p_language_code_tbl);
283
284 -- here's the delegated call to the old PL/SQL routine
285 ibe_physicalmap_grp.save_physicalmap(p_api_version,
286 p_init_msg_list,
287 p_commit,
288 x_return_status,
289 x_msg_count,
290 x_msg_data,
291 p_attachment_id,
292 ddp_msite_lang_tbl,
293 ddp_language_code_tbl);
294
295 -- copy data back from the local variables to OUT or IN-OUT args, if any
296
297
298
299
300
301
302
303
304 end;
305
306 procedure delete_physicalmap(p_api_version NUMBER
307 , p_init_msg_list VARCHAR2
308 , p_commit VARCHAR2
309 , x_return_status out nocopy VARCHAR2
310 , x_msg_count out nocopy NUMBER
311 , x_msg_data out nocopy VARCHAR2
312 , p_lgl_phys_map_id_tbl JTF_NUMBER_TABLE
313 )
314
315 as
316 ddp_lgl_phys_map_id_tbl ibe_physicalmap_grp.lgl_phys_map_id_tbl_type;
317 ddindx binary_integer; indx binary_integer;
318 begin
319
320 -- copy data to the local IN or IN-OUT args, if any
321
322
323
324
325
326
327 ibe_physicalmap_grp_w.rosetta_table_copy_in_p3(ddp_lgl_phys_map_id_tbl, p_lgl_phys_map_id_tbl);
328
329 -- here's the delegated call to the old PL/SQL routine
330 ibe_physicalmap_grp.delete_physicalmap(p_api_version,
331 p_init_msg_list,
332 p_commit,
333 x_return_status,
334 x_msg_count,
335 x_msg_data,
336 ddp_lgl_phys_map_id_tbl);
337
338 -- copy data back from the local variables to OUT or IN-OUT args, if any
339
340
341
342
343
344
345 end;
346
347 procedure delete_attachment_msite(p_api_version NUMBER
348 , p_init_msg_list VARCHAR2
349 , p_commit VARCHAR2
350 , x_return_status out nocopy VARCHAR2
351 , x_msg_count out nocopy NUMBER
352 , x_msg_data out nocopy VARCHAR2
353 , p_attachment_id NUMBER
354 , p_msite_id_tbl JTF_NUMBER_TABLE
355 )
356
357 as
358 ddp_msite_id_tbl ibe_physicalmap_grp.msite_id_tbl_type;
359 ddindx binary_integer; indx binary_integer;
360 begin
361
362 -- copy data to the local IN or IN-OUT args, if any
363
364
365
366
367
368
369
370 ibe_physicalmap_grp_w.rosetta_table_copy_in_p4(ddp_msite_id_tbl, p_msite_id_tbl);
371
372 -- here's the delegated call to the old PL/SQL routine
373 ibe_physicalmap_grp.delete_attachment_msite(p_api_version,
374 p_init_msg_list,
375 p_commit,
376 x_return_status,
377 x_msg_count,
378 x_msg_data,
379 p_attachment_id,
380 ddp_msite_id_tbl);
381
382 -- copy data back from the local variables to OUT or IN-OUT args, if any
383
384
385
386
387
388
389
390 end;
391
392 procedure save_physicalmap(p_api_version NUMBER
393 , p_init_msg_list VARCHAR2
394 , p_commit VARCHAR2
395 , x_return_status out nocopy VARCHAR2
396 , x_msg_count out nocopy NUMBER
397 , x_msg_data out nocopy VARCHAR2
398 , p_deliverable_id NUMBER
399 , p_old_content_key VARCHAR2
400 , p_new_content_key VARCHAR2
401 , p9_a0 JTF_NUMBER_TABLE
402 , p9_a1 JTF_NUMBER_TABLE
403 , p_language_code_tbl JTF_VARCHAR2_TABLE_100
404 )
405
406 as
407 ddp_msite_lang_tbl ibe_physicalmap_grp.msite_lang_tbl_type;
408 ddp_language_code_tbl ibe_physicalmap_grp.language_code_tbl_type;
409 ddindx binary_integer; indx binary_integer;
410 begin
411
412 -- copy data to the local IN or IN-OUT args, if any
413
414
415
416
417
418
419
420
421
422 ibe_physicalmap_grp_w.rosetta_table_copy_in_p2(ddp_msite_lang_tbl, p9_a0
423 , p9_a1
424 );
425
426 ibe_physicalmap_grp_w.rosetta_table_copy_in_p0(ddp_language_code_tbl, p_language_code_tbl);
427
428 -- here's the delegated call to the old PL/SQL routine
429 ibe_physicalmap_grp.save_physicalmap(p_api_version,
430 p_init_msg_list,
431 p_commit,
432 x_return_status,
433 x_msg_count,
434 x_msg_data,
435 p_deliverable_id,
436 p_old_content_key,
437 p_new_content_key,
438 ddp_msite_lang_tbl,
439 ddp_language_code_tbl);
440
441 -- copy data back from the local variables to OUT or IN-OUT args, if any
442
443
444
445
446
447
448
449
450
451
452 end;
453
454 end ibe_physicalmap_grp_w;