DBA Data[Home] [Help]

PACKAGE BODY: APPS.AMS_IBA_PL_STYLESHEETS_PVT_W

Source


1 package body ams_iba_pl_stylesheets_pvt_w as
2   /* $Header: amswstyb.pls 120.0 2005/05/31 18:21:41 appldev 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   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_p3(t OUT NOCOPY ams_iba_pl_stylesheets_pvt.iba_pl_stylesheets_tbl_type, a0 JTF_NUMBER_TABLE
23     , a1 JTF_VARCHAR2_TABLE_100
24     , a2 JTF_VARCHAR2_TABLE_500
25     , a3 JTF_VARCHAR2_TABLE_100
26     , a4 JTF_NUMBER_TABLE
27     , a5 JTF_DATE_TABLE
28     , a6 JTF_NUMBER_TABLE
29     , a7 JTF_DATE_TABLE
30     , a8 JTF_NUMBER_TABLE
31     , a9 JTF_NUMBER_TABLE
32     , a10 JTF_VARCHAR2_TABLE_100
33     , a11 JTF_VARCHAR2_TABLE_300
34     ) as
35     ddindx binary_integer; indx binary_integer;
36   begin
37   if a0 is not null and a0.count > 0 then
38       if a0.count > 0 then
39         indx := a0.first;
40         ddindx := 1;
41         while true loop
42           t(ddindx).stylesheet_id := rosetta_g_miss_num_map(a0(indx));
43           t(ddindx).content_type := a1(indx);
44           t(ddindx).stylesheet_filename := a2(indx);
45           t(ddindx).status_code := a3(indx);
46           t(ddindx).created_by := rosetta_g_miss_num_map(a4(indx));
47           t(ddindx).creation_date := rosetta_g_miss_date_in_map(a5(indx));
48           t(ddindx).last_updated_by := rosetta_g_miss_num_map(a6(indx));
49           t(ddindx).last_update_date := rosetta_g_miss_date_in_map(a7(indx));
50           t(ddindx).last_update_login := rosetta_g_miss_num_map(a8(indx));
51           t(ddindx).object_version_number := rosetta_g_miss_num_map(a9(indx));
52           t(ddindx).name := a10(indx);
53           t(ddindx).description := a11(indx);
54           ddindx := ddindx+1;
55           if a0.last =indx
56             then exit;
57           end if;
58           indx := a0.next(indx);
59         end loop;
60       end if;
61    end if;
62   end rosetta_table_copy_in_p3;
63   procedure rosetta_table_copy_out_p3(t ams_iba_pl_stylesheets_pvt.iba_pl_stylesheets_tbl_type, a0 OUT NOCOPY JTF_NUMBER_TABLE
64     , a1 OUT NOCOPY JTF_VARCHAR2_TABLE_100
65     , a2 OUT NOCOPY JTF_VARCHAR2_TABLE_500
66     , a3 OUT NOCOPY JTF_VARCHAR2_TABLE_100
67     , a4 OUT NOCOPY JTF_NUMBER_TABLE
68     , a5 OUT NOCOPY JTF_DATE_TABLE
69     , a6 OUT NOCOPY JTF_NUMBER_TABLE
70     , a7 OUT NOCOPY JTF_DATE_TABLE
71     , a8 OUT NOCOPY JTF_NUMBER_TABLE
72     , a9 OUT NOCOPY JTF_NUMBER_TABLE
73     , a10 OUT NOCOPY JTF_VARCHAR2_TABLE_100
74     , a11 OUT NOCOPY JTF_VARCHAR2_TABLE_300
75     ) as
76     ddindx binary_integer; indx binary_integer;
77   begin
78   if t is null or t.count = 0 then
79     a0 := JTF_NUMBER_TABLE();
80     a1 := JTF_VARCHAR2_TABLE_100();
81     a2 := JTF_VARCHAR2_TABLE_500();
82     a3 := JTF_VARCHAR2_TABLE_100();
83     a4 := JTF_NUMBER_TABLE();
84     a5 := JTF_DATE_TABLE();
85     a6 := JTF_NUMBER_TABLE();
86     a7 := JTF_DATE_TABLE();
87     a8 := JTF_NUMBER_TABLE();
88     a9 := JTF_NUMBER_TABLE();
89     a10 := JTF_VARCHAR2_TABLE_100();
90     a11 := JTF_VARCHAR2_TABLE_300();
91   else
92       a0 := JTF_NUMBER_TABLE();
93       a1 := JTF_VARCHAR2_TABLE_100();
94       a2 := JTF_VARCHAR2_TABLE_500();
95       a3 := JTF_VARCHAR2_TABLE_100();
96       a4 := JTF_NUMBER_TABLE();
97       a5 := JTF_DATE_TABLE();
98       a6 := JTF_NUMBER_TABLE();
99       a7 := JTF_DATE_TABLE();
100       a8 := JTF_NUMBER_TABLE();
101       a9 := JTF_NUMBER_TABLE();
102       a10 := JTF_VARCHAR2_TABLE_100();
103       a11 := JTF_VARCHAR2_TABLE_300();
104       if t.count > 0 then
105         a0.extend(t.count);
106         a1.extend(t.count);
107         a2.extend(t.count);
108         a3.extend(t.count);
109         a4.extend(t.count);
110         a5.extend(t.count);
111         a6.extend(t.count);
112         a7.extend(t.count);
113         a8.extend(t.count);
114         a9.extend(t.count);
115         a10.extend(t.count);
116         a11.extend(t.count);
117         ddindx := t.first;
118         indx := 1;
119         while true loop
120           a0(indx) := rosetta_g_miss_num_map(t(ddindx).stylesheet_id);
121           a1(indx) := t(ddindx).content_type;
122           a2(indx) := t(ddindx).stylesheet_filename;
123           a3(indx) := t(ddindx).status_code;
124           a4(indx) := rosetta_g_miss_num_map(t(ddindx).created_by);
125           a5(indx) := t(ddindx).creation_date;
126           a6(indx) := rosetta_g_miss_num_map(t(ddindx).last_updated_by);
127           a7(indx) := t(ddindx).last_update_date;
128           a8(indx) := rosetta_g_miss_num_map(t(ddindx).last_update_login);
129           a9(indx) := rosetta_g_miss_num_map(t(ddindx).object_version_number);
130           a10(indx) := t(ddindx).name;
131           a11(indx) := t(ddindx).description;
132           indx := indx+1;
133           if t.last =ddindx
134             then exit;
135           end if;
136           ddindx := t.next(ddindx);
137         end loop;
138       end if;
139    end if;
140   end rosetta_table_copy_out_p3;
141 
142   procedure create_iba_pl_stylesheets(p_api_version_number  NUMBER
143     , p_init_msg_list  VARCHAR2
144     , p_commit  VARCHAR2
145     , p_validation_level  NUMBER
146     , x_return_status OUT NOCOPY  VARCHAR2
147     , x_msg_count OUT NOCOPY  NUMBER
148     , x_msg_data OUT NOCOPY  VARCHAR2
149     , x_stylesheet_id OUT NOCOPY  NUMBER
150     , p7_a0  NUMBER := 0-1962.0724
151     , p7_a1  VARCHAR2 := fnd_api.g_miss_char
152     , p7_a2  VARCHAR2 := fnd_api.g_miss_char
153     , p7_a3  VARCHAR2 := fnd_api.g_miss_char
154     , p7_a4  NUMBER := 0-1962.0724
155     , p7_a5  DATE := fnd_api.g_miss_date
156     , p7_a6  NUMBER := 0-1962.0724
157     , p7_a7  DATE := fnd_api.g_miss_date
158     , p7_a8  NUMBER := 0-1962.0724
159     , p7_a9  NUMBER := 0-1962.0724
160     , p7_a10  VARCHAR2 := fnd_api.g_miss_char
161     , p7_a11  VARCHAR2 := fnd_api.g_miss_char
162   )
163   as
164     ddp_iba_pl_stylesheets_rec ams_iba_pl_stylesheets_pvt.iba_pl_stylesheets_rec_type;
165     ddindx binary_integer; indx binary_integer;
166   begin
167 
168     -- copy data to the local IN or IN-OUT args, if any
169 
170 
171 
172 
173 
174 
175 
176     ddp_iba_pl_stylesheets_rec.stylesheet_id := rosetta_g_miss_num_map(p7_a0);
177     ddp_iba_pl_stylesheets_rec.content_type := p7_a1;
178     ddp_iba_pl_stylesheets_rec.stylesheet_filename := p7_a2;
179     ddp_iba_pl_stylesheets_rec.status_code := p7_a3;
180     ddp_iba_pl_stylesheets_rec.created_by := rosetta_g_miss_num_map(p7_a4);
181     ddp_iba_pl_stylesheets_rec.creation_date := rosetta_g_miss_date_in_map(p7_a5);
182     ddp_iba_pl_stylesheets_rec.last_updated_by := rosetta_g_miss_num_map(p7_a6);
183     ddp_iba_pl_stylesheets_rec.last_update_date := rosetta_g_miss_date_in_map(p7_a7);
184     ddp_iba_pl_stylesheets_rec.last_update_login := rosetta_g_miss_num_map(p7_a8);
185     ddp_iba_pl_stylesheets_rec.object_version_number := rosetta_g_miss_num_map(p7_a9);
186     ddp_iba_pl_stylesheets_rec.name := p7_a10;
187     ddp_iba_pl_stylesheets_rec.description := p7_a11;
188 
189 
190     -- here's the delegated call to the old PL/SQL routine
191     ams_iba_pl_stylesheets_pvt.create_iba_pl_stylesheets(p_api_version_number,
192       p_init_msg_list,
193       p_commit,
194       p_validation_level,
195       x_return_status,
196       x_msg_count,
197       x_msg_data,
198       ddp_iba_pl_stylesheets_rec,
199       x_stylesheet_id);
200 
201     -- copy data back from the local OUT or IN-OUT args, if any
202 
203 
204 
205 
206 
207 
208 
209 
210   end;
211 
212   procedure update_iba_pl_stylesheets(p_api_version_number  NUMBER
213     , p_init_msg_list  VARCHAR2
214     , p_commit  VARCHAR2
215     , p_validation_level  NUMBER
216     , x_return_status OUT NOCOPY  VARCHAR2
217     , x_msg_count OUT NOCOPY  NUMBER
218     , x_msg_data OUT NOCOPY  VARCHAR2
219     , x_object_version_number OUT NOCOPY  NUMBER
220     , p7_a0  NUMBER := 0-1962.0724
221     , p7_a1  VARCHAR2 := fnd_api.g_miss_char
222     , p7_a2  VARCHAR2 := fnd_api.g_miss_char
223     , p7_a3  VARCHAR2 := fnd_api.g_miss_char
224     , p7_a4  NUMBER := 0-1962.0724
225     , p7_a5  DATE := fnd_api.g_miss_date
226     , p7_a6  NUMBER := 0-1962.0724
227     , p7_a7  DATE := fnd_api.g_miss_date
228     , p7_a8  NUMBER := 0-1962.0724
229     , p7_a9  NUMBER := 0-1962.0724
230     , p7_a10  VARCHAR2 := fnd_api.g_miss_char
231     , p7_a11  VARCHAR2 := fnd_api.g_miss_char
232   )
233   as
234     ddp_iba_pl_stylesheets_rec ams_iba_pl_stylesheets_pvt.iba_pl_stylesheets_rec_type;
235     ddindx binary_integer; indx binary_integer;
236   begin
237 
238     -- copy data to the local IN or IN-OUT args, if any
239 
240 
241 
242 
243 
244 
245 
246     ddp_iba_pl_stylesheets_rec.stylesheet_id := rosetta_g_miss_num_map(p7_a0);
247     ddp_iba_pl_stylesheets_rec.content_type := p7_a1;
248     ddp_iba_pl_stylesheets_rec.stylesheet_filename := p7_a2;
249     ddp_iba_pl_stylesheets_rec.status_code := p7_a3;
250     ddp_iba_pl_stylesheets_rec.created_by := rosetta_g_miss_num_map(p7_a4);
251     ddp_iba_pl_stylesheets_rec.creation_date := rosetta_g_miss_date_in_map(p7_a5);
252     ddp_iba_pl_stylesheets_rec.last_updated_by := rosetta_g_miss_num_map(p7_a6);
253     ddp_iba_pl_stylesheets_rec.last_update_date := rosetta_g_miss_date_in_map(p7_a7);
254     ddp_iba_pl_stylesheets_rec.last_update_login := rosetta_g_miss_num_map(p7_a8);
255     ddp_iba_pl_stylesheets_rec.object_version_number := rosetta_g_miss_num_map(p7_a9);
256     ddp_iba_pl_stylesheets_rec.name := p7_a10;
257     ddp_iba_pl_stylesheets_rec.description := p7_a11;
258 
259 
260     -- here's the delegated call to the old PL/SQL routine
261     ams_iba_pl_stylesheets_pvt.update_iba_pl_stylesheets(p_api_version_number,
262       p_init_msg_list,
263       p_commit,
264       p_validation_level,
265       x_return_status,
266       x_msg_count,
267       x_msg_data,
268       ddp_iba_pl_stylesheets_rec,
269       x_object_version_number);
270 
271     -- copy data back from the local OUT or IN-OUT args, if any
272 
273 
274 
275 
276 
277 
278 
279 
280   end;
281 
282   procedure validate_iba_pl_stylesheets(p_api_version_number  NUMBER
283     , p_init_msg_list  VARCHAR2
284     , p_validation_level  NUMBER
285     , x_return_status OUT NOCOPY  VARCHAR2
286     , x_msg_count OUT NOCOPY  NUMBER
287     , x_msg_data OUT NOCOPY  VARCHAR2
288     , p_validation_mode  VARCHAR2
289     , p3_a0  NUMBER := 0-1962.0724
290     , p3_a1  VARCHAR2 := fnd_api.g_miss_char
291     , p3_a2  VARCHAR2 := fnd_api.g_miss_char
292     , p3_a3  VARCHAR2 := fnd_api.g_miss_char
293     , p3_a4  NUMBER := 0-1962.0724
294     , p3_a5  DATE := fnd_api.g_miss_date
295     , p3_a6  NUMBER := 0-1962.0724
296     , p3_a7  DATE := fnd_api.g_miss_date
297     , p3_a8  NUMBER := 0-1962.0724
298     , p3_a9  NUMBER := 0-1962.0724
299     , p3_a10  VARCHAR2 := fnd_api.g_miss_char
300     , p3_a11  VARCHAR2 := fnd_api.g_miss_char
301   )
302   as
303     ddp_iba_pl_stylesheets_rec ams_iba_pl_stylesheets_pvt.iba_pl_stylesheets_rec_type;
304     ddindx binary_integer; indx binary_integer;
305   begin
306 
307     -- copy data to the local IN or IN-OUT args, if any
308 
309 
310 
311     ddp_iba_pl_stylesheets_rec.stylesheet_id := rosetta_g_miss_num_map(p3_a0);
312     ddp_iba_pl_stylesheets_rec.content_type := p3_a1;
313     ddp_iba_pl_stylesheets_rec.stylesheet_filename := p3_a2;
314     ddp_iba_pl_stylesheets_rec.status_code := p3_a3;
315     ddp_iba_pl_stylesheets_rec.created_by := rosetta_g_miss_num_map(p3_a4);
316     ddp_iba_pl_stylesheets_rec.creation_date := rosetta_g_miss_date_in_map(p3_a5);
317     ddp_iba_pl_stylesheets_rec.last_updated_by := rosetta_g_miss_num_map(p3_a6);
318     ddp_iba_pl_stylesheets_rec.last_update_date := rosetta_g_miss_date_in_map(p3_a7);
319     ddp_iba_pl_stylesheets_rec.last_update_login := rosetta_g_miss_num_map(p3_a8);
320     ddp_iba_pl_stylesheets_rec.object_version_number := rosetta_g_miss_num_map(p3_a9);
321     ddp_iba_pl_stylesheets_rec.name := p3_a10;
322     ddp_iba_pl_stylesheets_rec.description := p3_a11;
323 
324 
325 
326 
327 
328     -- here's the delegated call to the old PL/SQL routine
329     ams_iba_pl_stylesheets_pvt.validate_iba_pl_stylesheets(p_api_version_number,
330       p_init_msg_list,
331       p_validation_level,
332       ddp_iba_pl_stylesheets_rec,
333       x_return_status,
334       x_msg_count,
335       x_msg_data,
336       p_validation_mode);
337 
338     -- copy data back from the local OUT or IN-OUT args, if any
339 
340 
341 
342 
343 
344 
345 
346   end;
347 
348   procedure check_iba_pl_style_items(p_validation_mode  VARCHAR2
349     , x_return_status OUT NOCOPY  VARCHAR2
350     , p0_a0  NUMBER := 0-1962.0724
351     , p0_a1  VARCHAR2 := fnd_api.g_miss_char
352     , p0_a2  VARCHAR2 := fnd_api.g_miss_char
353     , p0_a3  VARCHAR2 := fnd_api.g_miss_char
354     , p0_a4  NUMBER := 0-1962.0724
355     , p0_a5  DATE := fnd_api.g_miss_date
356     , p0_a6  NUMBER := 0-1962.0724
357     , p0_a7  DATE := fnd_api.g_miss_date
358     , p0_a8  NUMBER := 0-1962.0724
359     , p0_a9  NUMBER := 0-1962.0724
360     , p0_a10  VARCHAR2 := fnd_api.g_miss_char
361     , p0_a11  VARCHAR2 := fnd_api.g_miss_char
362   )
363   as
364     ddp_iba_pl_stylesheets_rec ams_iba_pl_stylesheets_pvt.iba_pl_stylesheets_rec_type;
365     ddindx binary_integer; indx binary_integer;
366   begin
367 
368     -- copy data to the local IN or IN-OUT args, if any
369     ddp_iba_pl_stylesheets_rec.stylesheet_id := rosetta_g_miss_num_map(p0_a0);
370     ddp_iba_pl_stylesheets_rec.content_type := p0_a1;
371     ddp_iba_pl_stylesheets_rec.stylesheet_filename := p0_a2;
372     ddp_iba_pl_stylesheets_rec.status_code := p0_a3;
373     ddp_iba_pl_stylesheets_rec.created_by := rosetta_g_miss_num_map(p0_a4);
374     ddp_iba_pl_stylesheets_rec.creation_date := rosetta_g_miss_date_in_map(p0_a5);
375     ddp_iba_pl_stylesheets_rec.last_updated_by := rosetta_g_miss_num_map(p0_a6);
376     ddp_iba_pl_stylesheets_rec.last_update_date := rosetta_g_miss_date_in_map(p0_a7);
377     ddp_iba_pl_stylesheets_rec.last_update_login := rosetta_g_miss_num_map(p0_a8);
378     ddp_iba_pl_stylesheets_rec.object_version_number := rosetta_g_miss_num_map(p0_a9);
379     ddp_iba_pl_stylesheets_rec.name := p0_a10;
380     ddp_iba_pl_stylesheets_rec.description := p0_a11;
381 
382 
383 
384     -- here's the delegated call to the old PL/SQL routine
385     ams_iba_pl_stylesheets_pvt.check_iba_pl_style_items(ddp_iba_pl_stylesheets_rec,
386       p_validation_mode,
387       x_return_status);
388 
389     -- copy data back from the local OUT or IN-OUT args, if any
390 
391 
392   end;
393 
394   procedure validate_iba_pl_style_rec(p_api_version_number  NUMBER
395     , p_init_msg_list  VARCHAR2
396     , x_return_status OUT NOCOPY  VARCHAR2
397     , x_msg_count OUT NOCOPY  NUMBER
398     , x_msg_data OUT NOCOPY  VARCHAR2
399     , p5_a0  NUMBER := 0-1962.0724
400     , p5_a1  VARCHAR2 := fnd_api.g_miss_char
401     , p5_a2  VARCHAR2 := fnd_api.g_miss_char
402     , p5_a3  VARCHAR2 := fnd_api.g_miss_char
406     , p5_a7  DATE := fnd_api.g_miss_date
403     , p5_a4  NUMBER := 0-1962.0724
404     , p5_a5  DATE := fnd_api.g_miss_date
405     , p5_a6  NUMBER := 0-1962.0724
407     , p5_a8  NUMBER := 0-1962.0724
408     , p5_a9  NUMBER := 0-1962.0724
409     , p5_a10  VARCHAR2 := fnd_api.g_miss_char
410     , p5_a11  VARCHAR2 := fnd_api.g_miss_char
411   )
412   as
413     ddp_iba_pl_stylesheets_rec ams_iba_pl_stylesheets_pvt.iba_pl_stylesheets_rec_type;
414     ddindx binary_integer; indx binary_integer;
415   begin
416 
417     -- copy data to the local IN or IN-OUT args, if any
418 
419 
420 
421 
422 
423     ddp_iba_pl_stylesheets_rec.stylesheet_id := rosetta_g_miss_num_map(p5_a0);
424     ddp_iba_pl_stylesheets_rec.content_type := p5_a1;
425     ddp_iba_pl_stylesheets_rec.stylesheet_filename := p5_a2;
426     ddp_iba_pl_stylesheets_rec.status_code := p5_a3;
427     ddp_iba_pl_stylesheets_rec.created_by := rosetta_g_miss_num_map(p5_a4);
428     ddp_iba_pl_stylesheets_rec.creation_date := rosetta_g_miss_date_in_map(p5_a5);
429     ddp_iba_pl_stylesheets_rec.last_updated_by := rosetta_g_miss_num_map(p5_a6);
430     ddp_iba_pl_stylesheets_rec.last_update_date := rosetta_g_miss_date_in_map(p5_a7);
431     ddp_iba_pl_stylesheets_rec.last_update_login := rosetta_g_miss_num_map(p5_a8);
432     ddp_iba_pl_stylesheets_rec.object_version_number := rosetta_g_miss_num_map(p5_a9);
433     ddp_iba_pl_stylesheets_rec.name := p5_a10;
434     ddp_iba_pl_stylesheets_rec.description := p5_a11;
435 
436     -- here's the delegated call to the old PL/SQL routine
437     ams_iba_pl_stylesheets_pvt.validate_iba_pl_style_rec(p_api_version_number,
438       p_init_msg_list,
439       x_return_status,
440       x_msg_count,
441       x_msg_data,
442       ddp_iba_pl_stylesheets_rec);
443 
444     -- copy data back from the local OUT or IN-OUT args, if any
445 
446 
447 
448 
449 
450   end;
451 
452 end ams_iba_pl_stylesheets_pvt_w;