1 package body arw_search_customers_w as
2 /* $Header: ARWCUSWB.pls 120.0.12010000.2 2008/11/21 15:26:54 avepati noship $ */
3
4 procedure rosetta_table_copy_in_p1(t out nocopy arw_search_customers.custsite_tbl, a0 JTF_NUMBER_TABLE
5 , a1 JTF_NUMBER_TABLE
6 ) as
7 ddindx binary_integer; indx binary_integer;
8 begin
9 if a0 is not null and a0.count > 0 then
10 if a0.count > 0 then
11 indx := a0.first;
12 ddindx := 1;
13 while true loop
14 t(ddindx).customerid := a0(indx);
15 t(ddindx).siteuseid := a1(indx);
16 ddindx := ddindx+1;
17 if a0.last =indx
18 then exit;
19 end if;
20 indx := a0.next(indx);
21 end loop;
22 end if;
23 end if;
24 end rosetta_table_copy_in_p1;
25 procedure rosetta_table_copy_out_p1(t arw_search_customers.custsite_tbl, a0 out nocopy JTF_NUMBER_TABLE
26 , a1 out nocopy JTF_NUMBER_TABLE
27 ) as
28 ddindx binary_integer; indx binary_integer;
29 begin
30 if t is null or t.count = 0 then
31 a0 := JTF_NUMBER_TABLE();
32 a1 := JTF_NUMBER_TABLE();
33 else
34 a0 := JTF_NUMBER_TABLE();
35 a1 := JTF_NUMBER_TABLE();
36 if t.count > 0 then
37 a0.extend(t.count);
38 a1.extend(t.count);
39 ddindx := t.first;
40 indx := 1;
41 while true loop
42 a0(indx) := t(ddindx).customerid;
43 a1(indx) := t(ddindx).siteuseid;
44 indx := indx+1;
45 if t.last =ddindx
46 then exit;
47 end if;
48 ddindx := t.next(ddindx);
49 end loop;
50 end if;
51 end if;
52 end rosetta_table_copy_out_p1;
53
54 procedure initialize_account_sites(p0_a0 JTF_NUMBER_TABLE
55 , p0_a1 JTF_NUMBER_TABLE
56 , p_party_id NUMBER
57 , p_session_id NUMBER
58 , p_user_id NUMBER
59 , p_org_id NUMBER
60 , p_is_internal_user VARCHAR2
61 )
62
63 as
64 ddp_custsite_rec_tbl arw_search_customers.custsite_tbl;
65 ddindx binary_integer; indx binary_integer;
66 begin
67
68 -- copy data to the local IN or IN-OUT args, if any
69 arw_search_customers_w.rosetta_table_copy_in_p1(ddp_custsite_rec_tbl, p0_a0
70 , p0_a1
71 );
72
73 -- here's the delegated call to the old PL/SQL routine
74 arw_search_customers.initialize_account_sites(ddp_custsite_rec_tbl,
75 p_party_id,
76 p_session_id,
77 p_user_id,
78 p_org_id,
79 p_is_internal_user);
80
81 -- copy data back from the local variables to OUT or IN-OUT args, if any
82 end;
83 end arw_search_customers_w;