DBA Data[Home] [Help]

PACKAGE BODY: APPS.AMV_SEARCH_PVT_W

Source


1 package body amv_search_pvt_w as
2   /* $Header: amvwserb.pls 120.2 2005/06/30 08:43 appldev 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 amv_search_pvt.amv_char_varray_type, a0 JTF_VARCHAR2_TABLE_4000) 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 := amv_search_pvt.amv_char_varray_type();
29   else
30       if a0.count > 0 then
31       t := amv_search_pvt.amv_char_varray_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 amv_search_pvt.amv_char_varray_type, a0 out nocopy JTF_VARCHAR2_TABLE_4000) 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_4000();
53   else
54       a0 := JTF_VARCHAR2_TABLE_4000();
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_p1(t out nocopy amv_search_pvt.amv_number_varray_type, a0 JTF_NUMBER_TABLE) as
72     ddindx binary_integer; indx binary_integer;
73   begin
74   if a0 is null then
75     t := null;
76   elsif a0.count = 0 then
77     t := amv_search_pvt.amv_number_varray_type();
78   else
79       if a0.count > 0 then
80       t := amv_search_pvt.amv_number_varray_type();
81       t.extend(a0.count);
82         indx := a0.first;
83         ddindx := 1;
84         while true loop
85           t(ddindx) := rosetta_g_miss_num_map(a0(indx));
86           ddindx := ddindx+1;
87           if a0.last =indx
88             then exit;
89           end if;
90           indx := a0.next(indx);
91         end loop;
92       end if;
93    end if;
94   end rosetta_table_copy_in_p1;
95   procedure rosetta_table_copy_out_p1(t amv_search_pvt.amv_number_varray_type, a0 out nocopy JTF_NUMBER_TABLE) as
96     ddindx binary_integer; indx binary_integer;
97   begin
98   if t is null then
99     a0 := null;
100   elsif t.count = 0 then
101     a0 := JTF_NUMBER_TABLE();
102   else
103       a0 := JTF_NUMBER_TABLE();
104       if t.count > 0 then
105         a0.extend(t.count);
106         ddindx := t.first;
107         indx := 1;
108         while true loop
109           a0(indx) := rosetta_g_miss_num_map(t(ddindx));
110           indx := indx+1;
111           if t.last =ddindx
112             then exit;
113           end if;
114           ddindx := t.next(ddindx);
115         end loop;
116       end if;
117    end if;
118   end rosetta_table_copy_out_p1;
119 
120   procedure rosetta_table_copy_in_p5(t out nocopy amv_search_pvt.amv_area_varray_type, a0 JTF_NUMBER_TABLE
121     , a1 JTF_VARCHAR2_TABLE_100
122     ) as
123     ddindx binary_integer; indx binary_integer;
124   begin
125   if a0 is not null and a0.count=0 then
126     t := amv_search_pvt.amv_area_varray_type();
127   elsif a0 is not null and a0.count > 0 then
128       if a0.count > 0 then
129       t := amv_search_pvt.amv_area_varray_type();
130       t.extend(a0.count);
131         indx := a0.first;
132         ddindx := 1;
133         while true loop
134           t(ddindx).area_id := rosetta_g_miss_num_map(a0(indx));
135           t(ddindx).area_code := a1(indx);
136           ddindx := ddindx+1;
137           if a0.last =indx
138             then exit;
139           end if;
140           indx := a0.next(indx);
141         end loop;
142       end if;
143    end if;
144   end rosetta_table_copy_in_p5;
145   procedure rosetta_table_copy_out_p5(t amv_search_pvt.amv_area_varray_type, a0 out nocopy JTF_NUMBER_TABLE
146     , a1 out nocopy JTF_VARCHAR2_TABLE_100
147     ) as
148     ddindx binary_integer; indx binary_integer;
149   begin
150   if t is null then
151     a0 := null;
152     a1 := null;
153   elsif t.count = 0 then
154     a0 := JTF_NUMBER_TABLE();
155     a1 := JTF_VARCHAR2_TABLE_100();
156   else
157       a0 := JTF_NUMBER_TABLE();
158       a1 := JTF_VARCHAR2_TABLE_100();
159       if t.count > 0 then
160         a0.extend(t.count);
161         a1.extend(t.count);
162         ddindx := t.first;
163         indx := 1;
164         while true loop
165           a0(indx) := rosetta_g_miss_num_map(t(ddindx).area_id);
166           a1(indx) := t(ddindx).area_code;
167           indx := indx+1;
168           if t.last =ddindx
169             then exit;
170           end if;
171           ddindx := t.next(ddindx);
172         end loop;
173       end if;
174    end if;
175   end rosetta_table_copy_out_p5;
176 
177   procedure rosetta_table_copy_in_p7(t out nocopy amv_search_pvt.amv_searchrep_varray_type, a0 JTF_NUMBER_TABLE
178     , a1 JTF_VARCHAR2_TABLE_100
179     , a2 JTF_VARCHAR2_TABLE_100
180     , a3 JTF_VARCHAR2_TABLE_100
181     , a4 JTF_NUMBER_TABLE
182     ) as
183     ddindx binary_integer; indx binary_integer;
184   begin
185   if a0 is not null and a0.count=0 then
186     t := amv_search_pvt.amv_searchrep_varray_type();
187   elsif a0 is not null and a0.count > 0 then
188       if a0.count > 0 then
189       t := amv_search_pvt.amv_searchrep_varray_type();
190       t.extend(a0.count);
191         indx := a0.first;
192         ddindx := 1;
193         while true loop
194           t(ddindx).repository_id := rosetta_g_miss_num_map(a0(indx));
195           t(ddindx).repository_code := a1(indx);
196           t(ddindx).repository_name := a2(indx);
197           t(ddindx).status := a3(indx);
198           t(ddindx).object_version_number := rosetta_g_miss_num_map(a4(indx));
199           ddindx := ddindx+1;
200           if a0.last =indx
201             then exit;
202           end if;
203           indx := a0.next(indx);
204         end loop;
205       end if;
206    end if;
207   end rosetta_table_copy_in_p7;
208   procedure rosetta_table_copy_out_p7(t amv_search_pvt.amv_searchrep_varray_type, a0 out nocopy JTF_NUMBER_TABLE
209     , a1 out nocopy JTF_VARCHAR2_TABLE_100
210     , a2 out nocopy JTF_VARCHAR2_TABLE_100
211     , a3 out nocopy JTF_VARCHAR2_TABLE_100
212     , a4 out nocopy JTF_NUMBER_TABLE
213     ) as
214     ddindx binary_integer; indx binary_integer;
215   begin
216   if t is null then
217     a0 := null;
218     a1 := null;
219     a2 := null;
220     a3 := null;
221     a4 := null;
222   elsif t.count = 0 then
223     a0 := JTF_NUMBER_TABLE();
224     a1 := JTF_VARCHAR2_TABLE_100();
225     a2 := JTF_VARCHAR2_TABLE_100();
226     a3 := JTF_VARCHAR2_TABLE_100();
227     a4 := JTF_NUMBER_TABLE();
228   else
229       a0 := JTF_NUMBER_TABLE();
230       a1 := JTF_VARCHAR2_TABLE_100();
231       a2 := JTF_VARCHAR2_TABLE_100();
232       a3 := JTF_VARCHAR2_TABLE_100();
233       a4 := JTF_NUMBER_TABLE();
234       if t.count > 0 then
235         a0.extend(t.count);
236         a1.extend(t.count);
237         a2.extend(t.count);
238         a3.extend(t.count);
239         a4.extend(t.count);
240         ddindx := t.first;
241         indx := 1;
242         while true loop
243           a0(indx) := rosetta_g_miss_num_map(t(ddindx).repository_id);
244           a1(indx) := t(ddindx).repository_code;
245           a2(indx) := t(ddindx).repository_name;
246           a3(indx) := t(ddindx).status;
247           a4(indx) := rosetta_g_miss_num_map(t(ddindx).object_version_number);
248           indx := indx+1;
249           if t.last =ddindx
250             then exit;
251           end if;
252           ddindx := t.next(ddindx);
253         end loop;
254       end if;
255    end if;
256   end rosetta_table_copy_out_p7;
257 
258   procedure rosetta_table_copy_in_p9(t out nocopy amv_search_pvt.amv_searchara_varray_type, a0 JTF_NUMBER_TABLE
259     , a1 JTF_VARCHAR2_TABLE_100
260     , a2 JTF_VARCHAR2_TABLE_100
261     , a3 JTF_NUMBER_TABLE
262     , a4 JTF_VARCHAR2_TABLE_100
263     , a5 JTF_VARCHAR2_TABLE_100
264     , a6 JTF_VARCHAR2_TABLE_100
265     , a7 JTF_NUMBER_TABLE
266     ) as
267     ddindx binary_integer; indx binary_integer;
268   begin
269   if a0 is not null and a0.count=0 then
270     t := amv_search_pvt.amv_searchara_varray_type();
271   elsif a0 is not null and a0.count > 0 then
272       if a0.count > 0 then
273       t := amv_search_pvt.amv_searchara_varray_type();
274       t.extend(a0.count);
275         indx := a0.first;
276         ddindx := 1;
277         while true loop
278           t(ddindx).repository_id := rosetta_g_miss_num_map(a0(indx));
279           t(ddindx).repository_code := a1(indx);
280           t(ddindx).area_indicator := a2(indx);
281           t(ddindx).area_id := rosetta_g_miss_num_map(a3(indx));
282           t(ddindx).area_code := a4(indx);
283           t(ddindx).area_name := a5(indx);
284           t(ddindx).status := a6(indx);
285           t(ddindx).object_version_number := rosetta_g_miss_num_map(a7(indx));
286           ddindx := ddindx+1;
287           if a0.last =indx
288             then exit;
289           end if;
290           indx := a0.next(indx);
291         end loop;
292       end if;
293    end if;
294   end rosetta_table_copy_in_p9;
295   procedure rosetta_table_copy_out_p9(t amv_search_pvt.amv_searchara_varray_type, a0 out nocopy JTF_NUMBER_TABLE
296     , a1 out nocopy JTF_VARCHAR2_TABLE_100
297     , a2 out nocopy JTF_VARCHAR2_TABLE_100
298     , a3 out nocopy JTF_NUMBER_TABLE
299     , a4 out nocopy JTF_VARCHAR2_TABLE_100
300     , a5 out nocopy JTF_VARCHAR2_TABLE_100
301     , a6 out nocopy JTF_VARCHAR2_TABLE_100
302     , a7 out nocopy JTF_NUMBER_TABLE
303     ) as
304     ddindx binary_integer; indx binary_integer;
305   begin
306   if t is null then
307     a0 := null;
308     a1 := null;
309     a2 := null;
310     a3 := null;
311     a4 := null;
312     a5 := null;
313     a6 := null;
314     a7 := null;
315   elsif t.count = 0 then
316     a0 := JTF_NUMBER_TABLE();
317     a1 := JTF_VARCHAR2_TABLE_100();
318     a2 := JTF_VARCHAR2_TABLE_100();
319     a3 := JTF_NUMBER_TABLE();
320     a4 := JTF_VARCHAR2_TABLE_100();
321     a5 := JTF_VARCHAR2_TABLE_100();
322     a6 := JTF_VARCHAR2_TABLE_100();
323     a7 := JTF_NUMBER_TABLE();
324   else
325       a0 := JTF_NUMBER_TABLE();
326       a1 := JTF_VARCHAR2_TABLE_100();
327       a2 := JTF_VARCHAR2_TABLE_100();
328       a3 := JTF_NUMBER_TABLE();
329       a4 := JTF_VARCHAR2_TABLE_100();
330       a5 := JTF_VARCHAR2_TABLE_100();
331       a6 := JTF_VARCHAR2_TABLE_100();
332       a7 := JTF_NUMBER_TABLE();
333       if t.count > 0 then
334         a0.extend(t.count);
335         a1.extend(t.count);
336         a2.extend(t.count);
337         a3.extend(t.count);
338         a4.extend(t.count);
339         a5.extend(t.count);
340         a6.extend(t.count);
341         a7.extend(t.count);
342         ddindx := t.first;
343         indx := 1;
344         while true loop
345           a0(indx) := rosetta_g_miss_num_map(t(ddindx).repository_id);
346           a1(indx) := t(ddindx).repository_code;
347           a2(indx) := t(ddindx).area_indicator;
348           a3(indx) := rosetta_g_miss_num_map(t(ddindx).area_id);
349           a4(indx) := t(ddindx).area_code;
350           a5(indx) := t(ddindx).area_name;
351           a6(indx) := t(ddindx).status;
352           a7(indx) := rosetta_g_miss_num_map(t(ddindx).object_version_number);
353           indx := indx+1;
354           if t.last =ddindx
355             then exit;
356           end if;
357           ddindx := t.next(ddindx);
358         end loop;
359       end if;
360    end if;
361   end rosetta_table_copy_out_p9;
362 
363   procedure rosetta_table_copy_in_p11(t out nocopy amv_search_pvt.amv_searchpar_varray_type, a0 JTF_VARCHAR2_TABLE_100
364     , a1 JTF_VARCHAR2_TABLE_400
365     ) as
366     ddindx binary_integer; indx binary_integer;
367   begin
368   if a0 is not null and a0.count=0 then
369     t := amv_search_pvt.amv_searchpar_varray_type();
370   elsif a0 is not null and a0.count > 0 then
371       if a0.count > 0 then
372       t := amv_search_pvt.amv_searchpar_varray_type();
373       t.extend(a0.count);
374         indx := a0.first;
375         ddindx := 1;
376         while true loop
377           t(ddindx).operator := a0(indx);
378           t(ddindx).search_string := a1(indx);
379           ddindx := ddindx+1;
380           if a0.last =indx
381             then exit;
382           end if;
383           indx := a0.next(indx);
384         end loop;
385       end if;
386    end if;
387   end rosetta_table_copy_in_p11;
388   procedure rosetta_table_copy_out_p11(t amv_search_pvt.amv_searchpar_varray_type, a0 out nocopy JTF_VARCHAR2_TABLE_100
389     , a1 out nocopy JTF_VARCHAR2_TABLE_400
390     ) as
391     ddindx binary_integer; indx binary_integer;
392   begin
393   if t is null then
394     a0 := null;
395     a1 := null;
396   elsif t.count = 0 then
397     a0 := JTF_VARCHAR2_TABLE_100();
398     a1 := JTF_VARCHAR2_TABLE_400();
399   else
400       a0 := JTF_VARCHAR2_TABLE_100();
401       a1 := JTF_VARCHAR2_TABLE_400();
402       if t.count > 0 then
403         a0.extend(t.count);
404         a1.extend(t.count);
405         ddindx := t.first;
406         indx := 1;
407         while true loop
408           a0(indx) := t(ddindx).operator;
409           a1(indx) := t(ddindx).search_string;
410           indx := indx+1;
411           if t.last =ddindx
412             then exit;
413           end if;
414           ddindx := t.next(ddindx);
415         end loop;
416       end if;
417    end if;
418   end rosetta_table_copy_out_p11;
419 
420   procedure rosetta_table_copy_in_p13(t out nocopy amv_search_pvt.amv_searchres_varray_type, a0 JTF_VARCHAR2_TABLE_300
421     , a1 JTF_VARCHAR2_TABLE_2000
422     , a2 JTF_VARCHAR2_TABLE_4000
423     , a3 JTF_NUMBER_TABLE
424     , a4 JTF_NUMBER_TABLE
425     , a5 JTF_VARCHAR2_TABLE_100
426     , a6 JTF_VARCHAR2_TABLE_300
427     , a7 JTF_VARCHAR2_TABLE_300
428     , a8 JTF_VARCHAR2_TABLE_300
429     ) as
430     ddindx binary_integer; indx binary_integer;
431   begin
432   if a0 is not null and a0.count=0 then
433     t := amv_search_pvt.amv_searchres_varray_type();
434   elsif a0 is not null and a0.count > 0 then
435       if a0.count > 0 then
436       t := amv_search_pvt.amv_searchres_varray_type();
437       t.extend(a0.count);
438         indx := a0.first;
439         ddindx := 1;
443           t(ddindx).description := a2(indx);
440         while true loop
441           t(ddindx).title := a0(indx);
442           t(ddindx).url_string := a1(indx);
444           t(ddindx).score := rosetta_g_miss_num_map(a3(indx));
445           t(ddindx).area_id := rosetta_g_miss_num_map(a4(indx));
446           t(ddindx).area_code := a5(indx);
447           t(ddindx).user1 := a6(indx);
448           t(ddindx).user2 := a7(indx);
449           t(ddindx).user3 := a8(indx);
450           ddindx := ddindx+1;
451           if a0.last =indx
452             then exit;
453           end if;
454           indx := a0.next(indx);
455         end loop;
456       end if;
457    end if;
458   end rosetta_table_copy_in_p13;
459   procedure rosetta_table_copy_out_p13(t amv_search_pvt.amv_searchres_varray_type, a0 out nocopy JTF_VARCHAR2_TABLE_300
460     , a1 out nocopy JTF_VARCHAR2_TABLE_2000
461     , a2 out nocopy JTF_VARCHAR2_TABLE_4000
462     , a3 out nocopy JTF_NUMBER_TABLE
463     , a4 out nocopy JTF_NUMBER_TABLE
464     , a5 out nocopy JTF_VARCHAR2_TABLE_100
465     , a6 out nocopy JTF_VARCHAR2_TABLE_300
466     , a7 out nocopy JTF_VARCHAR2_TABLE_300
467     , a8 out nocopy JTF_VARCHAR2_TABLE_300
468     ) as
469     ddindx binary_integer; indx binary_integer;
470   begin
471   if t is null then
472     a0 := null;
473     a1 := null;
474     a2 := null;
475     a3 := null;
476     a4 := null;
477     a5 := null;
478     a6 := null;
479     a7 := null;
480     a8 := null;
481   elsif t.count = 0 then
482     a0 := JTF_VARCHAR2_TABLE_300();
483     a1 := JTF_VARCHAR2_TABLE_2000();
484     a2 := JTF_VARCHAR2_TABLE_4000();
485     a3 := JTF_NUMBER_TABLE();
486     a4 := JTF_NUMBER_TABLE();
487     a5 := JTF_VARCHAR2_TABLE_100();
488     a6 := JTF_VARCHAR2_TABLE_300();
489     a7 := JTF_VARCHAR2_TABLE_300();
490     a8 := JTF_VARCHAR2_TABLE_300();
491   else
492       a0 := JTF_VARCHAR2_TABLE_300();
493       a1 := JTF_VARCHAR2_TABLE_2000();
494       a2 := JTF_VARCHAR2_TABLE_4000();
495       a3 := JTF_NUMBER_TABLE();
496       a4 := JTF_NUMBER_TABLE();
497       a5 := JTF_VARCHAR2_TABLE_100();
498       a6 := JTF_VARCHAR2_TABLE_300();
499       a7 := JTF_VARCHAR2_TABLE_300();
500       a8 := JTF_VARCHAR2_TABLE_300();
501       if t.count > 0 then
502         a0.extend(t.count);
503         a1.extend(t.count);
504         a2.extend(t.count);
505         a3.extend(t.count);
506         a4.extend(t.count);
507         a5.extend(t.count);
508         a6.extend(t.count);
509         a7.extend(t.count);
510         a8.extend(t.count);
511         ddindx := t.first;
512         indx := 1;
513         while true loop
514           a0(indx) := t(ddindx).title;
515           a1(indx) := t(ddindx).url_string;
516           a2(indx) := t(ddindx).description;
517           a3(indx) := rosetta_g_miss_num_map(t(ddindx).score);
518           a4(indx) := rosetta_g_miss_num_map(t(ddindx).area_id);
519           a5(indx) := t(ddindx).area_code;
520           a6(indx) := t(ddindx).user1;
521           a7(indx) := t(ddindx).user2;
522           a8(indx) := t(ddindx).user3;
523           indx := indx+1;
524           if t.last =ddindx
525             then exit;
526           end if;
527           ddindx := t.next(ddindx);
528         end loop;
529       end if;
530    end if;
531   end rosetta_table_copy_out_p13;
532 
533   procedure find_repositories(p_api_version  NUMBER
534     , p_init_msg_list  VARCHAR2
535     , p_validation_level  NUMBER
536     , x_return_status out nocopy  VARCHAR2
537     , x_msg_count out nocopy  NUMBER
538     , x_msg_data out nocopy  VARCHAR2
539     , p_check_login_user  VARCHAR2
540     , p_object_version_number  NUMBER
541     , p_repository_id  NUMBER
542     , p_repository_code  VARCHAR2
543     , p_repository_name  VARCHAR2
544     , p_status  VARCHAR2
545     , p12_a0 out nocopy JTF_NUMBER_TABLE
546     , p12_a1 out nocopy JTF_VARCHAR2_TABLE_100
547     , p12_a2 out nocopy JTF_VARCHAR2_TABLE_100
548     , p12_a3 out nocopy JTF_VARCHAR2_TABLE_100
549     , p12_a4 out nocopy JTF_NUMBER_TABLE
550   )
551 
552   as
553     ddx_searchrep_array amv_search_pvt.amv_searchrep_varray_type;
554     ddindx binary_integer; indx binary_integer;
555   begin
556 
557     -- copy data to the local IN or IN-OUT args, if any
558 
559 
560 
561 
562 
563 
564 
565 
566 
567 
568 
569 
570 
571     -- here's the delegated call to the old PL/SQL routine
572     amv_search_pvt.find_repositories(p_api_version,
573       p_init_msg_list,
574       p_validation_level,
575       x_return_status,
576       x_msg_count,
577       x_msg_data,
578       p_check_login_user,
579       p_object_version_number,
580       p_repository_id,
581       p_repository_code,
582       p_repository_name,
583       p_status,
584       ddx_searchrep_array);
585 
586     -- copy data back from the local variables to OUT or IN-OUT args, if any
587 
588 
589 
590 
591 
592 
593 
594 
595 
596 
600       , p12_a1
597 
598 
599     amv_search_pvt_w.rosetta_table_copy_out_p7(ddx_searchrep_array, p12_a0
601       , p12_a2
602       , p12_a3
603       , p12_a4
604       );
605   end;
606 
607   procedure find_repository_areas(p_api_version  NUMBER
608     , p_init_msg_list  VARCHAR2
609     , p_validation_level  NUMBER
610     , x_return_status out nocopy  VARCHAR2
611     , x_msg_count out nocopy  NUMBER
612     , x_msg_data out nocopy  VARCHAR2
613     , p_check_login_user  VARCHAR2
614     , p8_a0 out nocopy JTF_NUMBER_TABLE
615     , p8_a1 out nocopy JTF_VARCHAR2_TABLE_100
616     , p8_a2 out nocopy JTF_VARCHAR2_TABLE_100
617     , p8_a3 out nocopy JTF_NUMBER_TABLE
618     , p8_a4 out nocopy JTF_VARCHAR2_TABLE_100
619     , p8_a5 out nocopy JTF_VARCHAR2_TABLE_100
620     , p8_a6 out nocopy JTF_VARCHAR2_TABLE_100
621     , p8_a7 out nocopy JTF_NUMBER_TABLE
622     , p7_a0  NUMBER := 0-1962.0724
623     , p7_a1  VARCHAR2 := fnd_api.g_miss_char
624     , p7_a2  VARCHAR2 := fnd_api.g_miss_char
625     , p7_a3  NUMBER := 0-1962.0724
626     , p7_a4  VARCHAR2 := fnd_api.g_miss_char
627     , p7_a5  VARCHAR2 := fnd_api.g_miss_char
628     , p7_a6  VARCHAR2 := fnd_api.g_miss_char
629     , p7_a7  NUMBER := 0-1962.0724
630   )
631 
632   as
633     ddp_searcharea_obj amv_search_pvt.amv_searchara_obj_type;
634     ddx_searcharea_array amv_search_pvt.amv_searchara_varray_type;
635     ddindx binary_integer; indx binary_integer;
636   begin
637 
638     -- copy data to the local IN or IN-OUT args, if any
639 
640 
641 
642 
643 
644 
645 
646     ddp_searcharea_obj.repository_id := rosetta_g_miss_num_map(p7_a0);
647     ddp_searcharea_obj.repository_code := p7_a1;
648     ddp_searcharea_obj.area_indicator := p7_a2;
649     ddp_searcharea_obj.area_id := rosetta_g_miss_num_map(p7_a3);
650     ddp_searcharea_obj.area_code := p7_a4;
651     ddp_searcharea_obj.area_name := p7_a5;
652     ddp_searcharea_obj.status := p7_a6;
653     ddp_searcharea_obj.object_version_number := rosetta_g_miss_num_map(p7_a7);
654 
655 
656     -- here's the delegated call to the old PL/SQL routine
657     amv_search_pvt.find_repository_areas(p_api_version,
658       p_init_msg_list,
659       p_validation_level,
660       x_return_status,
661       x_msg_count,
662       x_msg_data,
663       p_check_login_user,
664       ddp_searcharea_obj,
665       ddx_searcharea_array);
666 
667     -- copy data back from the local variables to OUT or IN-OUT args, if any
668 
669 
670 
671 
672 
673 
674 
675 
676     amv_search_pvt_w.rosetta_table_copy_out_p9(ddx_searcharea_array, p8_a0
677       , p8_a1
678       , p8_a2
679       , p8_a3
680       , p8_a4
681       , p8_a5
682       , p8_a6
683       , p8_a7
684       );
685   end;
686 
687   procedure content_search(p_api_version  NUMBER
688     , p_init_msg_list  VARCHAR2
689     , p_validation_level  NUMBER
690     , x_return_status out nocopy  VARCHAR2
691     , x_msg_count out nocopy  NUMBER
692     , x_msg_data out nocopy  VARCHAR2
693     , p_check_login_user  VARCHAR2
694     , p_application_id  NUMBER
695     , p_area_array JTF_VARCHAR2_TABLE_4000
696     , p_content_array JTF_VARCHAR2_TABLE_4000
697     , p10_a0 JTF_VARCHAR2_TABLE_100
698     , p10_a1 JTF_VARCHAR2_TABLE_400
699     , p_imt_string  VARCHAR2
700     , p_days  NUMBER
701     , p_user_id  NUMBER
702     , p_category_id JTF_NUMBER_TABLE
703     , p_include_subcats  VARCHAR2
704     , p_external_contents  VARCHAR2
705     , p18_a0 out nocopy  NUMBER
706     , p18_a1 out nocopy  NUMBER
707     , p18_a2 out nocopy  NUMBER
708     , p19_a0 out nocopy JTF_VARCHAR2_TABLE_300
709     , p19_a1 out nocopy JTF_VARCHAR2_TABLE_2000
710     , p19_a2 out nocopy JTF_VARCHAR2_TABLE_4000
711     , p19_a3 out nocopy JTF_NUMBER_TABLE
712     , p19_a4 out nocopy JTF_NUMBER_TABLE
713     , p19_a5 out nocopy JTF_VARCHAR2_TABLE_100
714     , p19_a6 out nocopy JTF_VARCHAR2_TABLE_300
715     , p19_a7 out nocopy JTF_VARCHAR2_TABLE_300
716     , p19_a8 out nocopy JTF_VARCHAR2_TABLE_300
717     , p17_a0  NUMBER := 0-1962.0724
718     , p17_a1  NUMBER := 0-1962.0724
719     , p17_a2  VARCHAR2 := fnd_api.g_miss_char
720   )
721 
722   as
723     ddp_area_array amv_search_pvt.amv_char_varray_type;
724     ddp_content_array amv_search_pvt.amv_char_varray_type;
725     ddp_param_array amv_search_pvt.amv_searchpar_varray_type;
726     ddp_category_id amv_search_pvt.amv_number_varray_type;
727     ddp_request_obj amv_search_pvt.amv_request_obj_type;
728     ddx_return_obj amv_search_pvt.amv_return_obj_type;
729     ddx_searchres_array amv_search_pvt.amv_searchres_varray_type;
730     ddindx binary_integer; indx binary_integer;
731   begin
732 
733     -- copy data to the local IN or IN-OUT args, if any
734 
735 
736 
737 
738 
739 
740 
741 
742     amv_search_pvt_w.rosetta_table_copy_in_p0(ddp_area_array, p_area_array);
743 
744     amv_search_pvt_w.rosetta_table_copy_in_p0(ddp_content_array, p_content_array);
745 
746     amv_search_pvt_w.rosetta_table_copy_in_p11(ddp_param_array, p10_a0
747       , p10_a1
748       );
749 
750 
751 
752 
753     amv_search_pvt_w.rosetta_table_copy_in_p1(ddp_category_id, p_category_id);
754 
755 
756 
757     ddp_request_obj.records_requested := rosetta_g_miss_num_map(p17_a0);
758     ddp_request_obj.start_record_position := rosetta_g_miss_num_map(p17_a1);
759     ddp_request_obj.return_total_count_flag := p17_a2;
760 
761 
762 
763     -- here's the delegated call to the old PL/SQL routine
764     amv_search_pvt.content_search(p_api_version,
765       p_init_msg_list,
766       p_validation_level,
767       x_return_status,
768       x_msg_count,
769       x_msg_data,
770       p_check_login_user,
771       p_application_id,
772       ddp_area_array,
773       ddp_content_array,
774       ddp_param_array,
775       p_imt_string,
776       p_days,
777       p_user_id,
778       ddp_category_id,
779       p_include_subcats,
780       p_external_contents,
781       ddp_request_obj,
782       ddx_return_obj,
783       ddx_searchres_array);
784 
785     -- copy data back from the local variables to OUT or IN-OUT args, if any
786 
787 
788 
789 
790 
791 
792 
793 
794 
795 
796 
797 
798 
799 
800 
801 
802 
803 
804     p18_a0 := rosetta_g_miss_num_map(ddx_return_obj.returned_record_count);
805     p18_a1 := rosetta_g_miss_num_map(ddx_return_obj.next_record_position);
806     p18_a2 := rosetta_g_miss_num_map(ddx_return_obj.total_record_count);
807 
808     amv_search_pvt_w.rosetta_table_copy_out_p13(ddx_searchres_array, p19_a0
809       , p19_a1
810       , p19_a2
811       , p19_a3
812       , p19_a4
813       , p19_a5
814       , p19_a6
815       , p19_a7
816       , p19_a8
817       );
818   end;
819 
820   procedure build_imt_string(p_optional_array JTF_VARCHAR2_TABLE_4000
821     , p_required_array JTF_VARCHAR2_TABLE_4000
822     , p_excluded_array JTF_VARCHAR2_TABLE_4000
823     , x_exc_flag out nocopy  VARCHAR2
824     , x_imt_string out nocopy  VARCHAR2
825   )
826 
827   as
828     ddp_optional_array amv_search_pvt.amv_char_varray_type;
829     ddp_required_array amv_search_pvt.amv_char_varray_type;
830     ddp_excluded_array amv_search_pvt.amv_char_varray_type;
831     ddindx binary_integer; indx binary_integer;
832   begin
833 
834     -- copy data to the local IN or IN-OUT args, if any
835     amv_search_pvt_w.rosetta_table_copy_in_p0(ddp_optional_array, p_optional_array);
836 
837     amv_search_pvt_w.rosetta_table_copy_in_p0(ddp_required_array, p_required_array);
838 
839     amv_search_pvt_w.rosetta_table_copy_in_p0(ddp_excluded_array, p_excluded_array);
840 
841 
842 
843     -- here's the delegated call to the old PL/SQL routine
844     amv_search_pvt.build_imt_string(ddp_optional_array,
845       ddp_required_array,
846       ddp_excluded_array,
847       x_exc_flag,
848       x_imt_string);
849 
850     -- copy data back from the local variables to OUT or IN-OUT args, if any
851 
852 
853 
854 
855   end;
856 
857 end amv_search_pvt_w;