DBA Data[Home] [Help]

PACKAGE BODY: APPS.JTF_PHYSICALMAP_GRP_W

Source


1 package body jtf_physicalmap_grp_w as
2   /* $Header: JTFGRPSB.pls 115.6 2004/07/09 18:50:59 applrt 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   function rosetta_g_miss_num_map(n number) return number as
7     a number := fnd_api.g_miss_num;
8     b number := 0-1962.0724;
9   begin
10     if n=a then return b; end if;
11     if n=b then return a; end if;
12     return n;
13   end;
14 
15   -- this is to workaround the JDBC bug regarding IN DATE of value GMiss
16   function rosetta_g_miss_date_in_map(d date) return date as
17   begin
18     if d = rosetta_g_mistake_date then return fnd_api.g_miss_date; end if;
19     return d;
20   end;
21 
22   procedure rosetta_table_copy_in_p0(t out jtf_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 := jtf_physicalmap_grp.language_code_tbl_type();
29   else
30       if a0.count > 0 then
31       t := jtf_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 jtf_physicalmap_grp.language_code_tbl_type, a0 out 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 jtf_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 := a0(indx);
82           t(ddindx).lang_count := 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 jtf_physicalmap_grp.msite_lang_tbl_type, a0 out JTF_NUMBER_TABLE
93     , a1 out 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) := t(ddindx).msite_id;
110           a1(indx) := 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 jtf_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) := 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 jtf_physicalmap_grp.lgl_phys_map_id_tbl_type, a0 out 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) := 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 jtf_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) := 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 jtf_physicalmap_grp.msite_id_tbl_type, a0 out 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) := 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  VARCHAR2
207     , x_msg_count out  NUMBER
208     , x_msg_data out  VARCHAR2
209     , p_attachment_id  NUMBER
210     , p_msite_id  NUMBER
211     , p_language_code_tbl JTF_VARCHAR2_TABLE_100
212   )
213   as
214     ddp_language_code_tbl jtf_physicalmap_grp.language_code_tbl_type;
215     ddindx binary_integer; indx binary_integer;
216   begin
217 
218     -- copy data to the local IN or IN-OUT args, if any
219 
220 
221 
222 
223 
224 
225 
226 
227     jtf_physicalmap_grp_w.rosetta_table_copy_in_p0(ddp_language_code_tbl, p_language_code_tbl);
228 
229     -- here's the delegated call to the old PL/SQL routine
230     jtf_physicalmap_grp.save_physicalmap(p_api_version,
231       p_init_msg_list,
232       p_commit,
233       x_return_status,
234       x_msg_count,
235       x_msg_data,
236       p_attachment_id,
237       p_msite_id,
238       ddp_language_code_tbl);
239 
240     -- copy data back from the local OUT or IN-OUT args, if any
241 
242 
243 
244 
245 
246 
247 
248 
249   end;
250 
251   procedure save_physicalmap(p_api_version  NUMBER
252     , p_init_msg_list  VARCHAR2
253     , p_commit  VARCHAR2
254     , x_return_status out  VARCHAR2
255     , x_msg_count out  NUMBER
256     , x_msg_data out  VARCHAR2
257     , p_attachment_id  NUMBER
258     , p7_a0 JTF_NUMBER_TABLE
259     , p7_a1 JTF_NUMBER_TABLE
260     , p_language_code_tbl JTF_VARCHAR2_TABLE_100
261   )
262   as
263     ddp_msite_lang_tbl jtf_physicalmap_grp.msite_lang_tbl_type;
264     ddp_language_code_tbl jtf_physicalmap_grp.language_code_tbl_type;
265     ddindx binary_integer; indx binary_integer;
266   begin
267 
268     -- copy data to the local IN or IN-OUT args, if any
269 
270 
271 
272 
273 
274 
275 
276     jtf_physicalmap_grp_w.rosetta_table_copy_in_p2(ddp_msite_lang_tbl, p7_a0
277       , p7_a1
278       );
279 
280     jtf_physicalmap_grp_w.rosetta_table_copy_in_p0(ddp_language_code_tbl, p_language_code_tbl);
281 
282     -- here's the delegated call to the old PL/SQL routine
283     jtf_physicalmap_grp.save_physicalmap(p_api_version,
284       p_init_msg_list,
285       p_commit,
286       x_return_status,
287       x_msg_count,
288       x_msg_data,
289       p_attachment_id,
290       ddp_msite_lang_tbl,
291       ddp_language_code_tbl);
292 
293     -- copy data back from the local OUT or IN-OUT args, if any
294 
295 
296 
297 
298 
299 
300 
301 
302   end;
303 
304   procedure delete_physicalmap(p_api_version  NUMBER
305     , p_init_msg_list  VARCHAR2
306     , p_commit  VARCHAR2
307     , x_return_status out  VARCHAR2
308     , x_msg_count out  NUMBER
309     , x_msg_data out  VARCHAR2
310     , p_lgl_phys_map_id_tbl JTF_NUMBER_TABLE
311   )
312   as
313     ddp_lgl_phys_map_id_tbl jtf_physicalmap_grp.lgl_phys_map_id_tbl_type;
314     ddindx binary_integer; indx binary_integer;
315   begin
316 
317     -- copy data to the local IN or IN-OUT args, if any
318 
319 
320 
321 
322 
323 
324     jtf_physicalmap_grp_w.rosetta_table_copy_in_p3(ddp_lgl_phys_map_id_tbl, p_lgl_phys_map_id_tbl);
325 
326     -- here's the delegated call to the old PL/SQL routine
327     jtf_physicalmap_grp.delete_physicalmap(p_api_version,
328       p_init_msg_list,
329       p_commit,
330       x_return_status,
331       x_msg_count,
332       x_msg_data,
333       ddp_lgl_phys_map_id_tbl);
334 
335     -- copy data back from the local OUT or IN-OUT args, if any
336 
337 
338 
339 
340 
341 
342   end;
343 
344   procedure delete_attachment_msite(p_api_version  NUMBER
345     , p_init_msg_list  VARCHAR2
346     , p_commit  VARCHAR2
347     , x_return_status out  VARCHAR2
348     , x_msg_count out  NUMBER
349     , x_msg_data out  VARCHAR2
350     , p_attachment_id  NUMBER
351     , p_msite_id_tbl JTF_NUMBER_TABLE
352   )
353   as
354     ddp_msite_id_tbl jtf_physicalmap_grp.msite_id_tbl_type;
355     ddindx binary_integer; indx binary_integer;
356   begin
357 
358     -- copy data to the local IN or IN-OUT args, if any
359 
360 
361 
362 
363 
364 
365 
366     jtf_physicalmap_grp_w.rosetta_table_copy_in_p4(ddp_msite_id_tbl, p_msite_id_tbl);
367 
368     -- here's the delegated call to the old PL/SQL routine
369     jtf_physicalmap_grp.delete_attachment_msite(p_api_version,
370       p_init_msg_list,
371       p_commit,
372       x_return_status,
373       x_msg_count,
374       x_msg_data,
375       p_attachment_id,
376       ddp_msite_id_tbl);
377 
378     -- copy data back from the local OUT or IN-OUT args, if any
379 
380 
381 
382 
383 
384 
385 
386   end;
387 
388 end jtf_physicalmap_grp_w;