DBA Data[Home] [Help]

PACKAGE BODY: APPS.HZ_GEO_STRUCT_MAP_PUB_W

Source


1 package body hz_geo_struct_map_pub_w as
2   /* $Header: ARHGNRJB.pls 120.3 2005/10/25 14:16:07 baianand noship $ */
3   procedure rosetta_table_copy_in_p2(t out nocopy hz_geo_struct_map_pub.geo_struct_map_dtl_tbl_type, a0 JTF_NUMBER_TABLE
4     , a1 JTF_VARCHAR2_TABLE_100
5     , a2 JTF_VARCHAR2_TABLE_100
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).loc_seq_num := a0(indx);
15           t(ddindx).loc_comp := a1(indx);
16           t(ddindx).geo_type := a2(indx);
17           ddindx := ddindx+1;
18           if a0.last =indx
19             then exit;
20           end if;
21           indx := a0.next(indx);
22         end loop;
23       end if;
24    end if;
25   end rosetta_table_copy_in_p2;
26   procedure rosetta_table_copy_out_p2(t hz_geo_struct_map_pub.geo_struct_map_dtl_tbl_type, a0 out nocopy JTF_NUMBER_TABLE
27     , a1 out nocopy JTF_VARCHAR2_TABLE_100
28     , a2 out nocopy JTF_VARCHAR2_TABLE_100
29     ) as
30     ddindx binary_integer; indx binary_integer;
31   begin
32   if t is null or t.count = 0 then
33     a0 := JTF_NUMBER_TABLE();
34     a1 := JTF_VARCHAR2_TABLE_100();
35     a2 := JTF_VARCHAR2_TABLE_100();
36   else
37       a0 := JTF_NUMBER_TABLE();
38       a1 := JTF_VARCHAR2_TABLE_100();
39       a2 := JTF_VARCHAR2_TABLE_100();
40       if t.count > 0 then
41         a0.extend(t.count);
42         a1.extend(t.count);
43         a2.extend(t.count);
44         ddindx := t.first;
45         indx := 1;
46         while true loop
47           a0(indx) := t(ddindx).loc_seq_num;
48           a1(indx) := t(ddindx).loc_comp;
49           a2(indx) := t(ddindx).geo_type;
50           indx := indx+1;
51           if t.last =ddindx
52             then exit;
53           end if;
54           ddindx := t.next(ddindx);
55         end loop;
56       end if;
57    end if;
58   end rosetta_table_copy_out_p2;
59 
60   procedure create_geo_struct_mapping(p0_a0  VARCHAR2
61     , p0_a1  VARCHAR2
62     , p0_a2  VARCHAR2
63     , p1_a0 JTF_NUMBER_TABLE
64     , p1_a1 JTF_VARCHAR2_TABLE_100
65     , p1_a2 JTF_VARCHAR2_TABLE_100
66     , p_init_msg_list  VARCHAR2
67     , x_map_id out nocopy  NUMBER
68     , x_return_status out nocopy  VARCHAR2
69     , x_msg_count out nocopy  NUMBER
70     , x_msg_data out nocopy  VARCHAR2
71   )
72 
73   as
74     ddp_geo_struct_map_rec hz_geo_struct_map_pub.geo_struct_map_rec_type;
75     ddp_geo_struct_map_dtl_tbl hz_geo_struct_map_pub.geo_struct_map_dtl_tbl_type;
76     ddindx binary_integer; indx binary_integer;
77   begin
78 
79     -- copy data to the local IN or IN-OUT args, if any
80     ddp_geo_struct_map_rec.country_code := p0_a0;
81     ddp_geo_struct_map_rec.loc_tbl_name := p0_a1;
82     ddp_geo_struct_map_rec.address_style := p0_a2;
83 
84     hz_geo_struct_map_pub_w.rosetta_table_copy_in_p2(ddp_geo_struct_map_dtl_tbl, p1_a0
85       , p1_a1
86       , p1_a2
87       );
88 
89 
90 
91 
92 
93 
94     -- here's the delegated call to the old PL/SQL routine
95     hz_geo_struct_map_pub.create_geo_struct_mapping(ddp_geo_struct_map_rec,
96       ddp_geo_struct_map_dtl_tbl,
97       p_init_msg_list,
98       x_map_id,
99       x_return_status,
100       x_msg_count,
101       x_msg_data);
102 
103     -- copy data back from the local variables to OUT or IN-OUT args, if any
104 
105 
106 
107 
108 
109 
110   end;
111 
112   procedure delete_geo_struct_mapping(p_map_id  NUMBER
113     , p_location_table_name  VARCHAR2
114     , p_country  VARCHAR2
115     , p_address_style  VARCHAR2
116     , p4_a0 JTF_NUMBER_TABLE
117     , p4_a1 JTF_VARCHAR2_TABLE_100
118     , p4_a2 JTF_VARCHAR2_TABLE_100
119     , p_init_msg_list  VARCHAR2
120     , x_return_status out nocopy  VARCHAR2
121     , x_msg_count out nocopy  NUMBER
122     , x_msg_data out nocopy  VARCHAR2
123   )
124 
125   as
126     ddp_geo_struct_map_dtl_tbl hz_geo_struct_map_pub.geo_struct_map_dtl_tbl_type;
127     ddindx binary_integer; indx binary_integer;
128   begin
129 
130     -- copy data to the local IN or IN-OUT args, if any
131 
132 
133 
134 
135     hz_geo_struct_map_pub_w.rosetta_table_copy_in_p2(ddp_geo_struct_map_dtl_tbl, p4_a0
136       , p4_a1
137       , p4_a2
138       );
139 
140 
141 
142 
143 
144     -- here's the delegated call to the old PL/SQL routine
145     hz_geo_struct_map_pub.delete_geo_struct_mapping(p_map_id,
146       p_location_table_name,
147       p_country,
148       p_address_style,
149       ddp_geo_struct_map_dtl_tbl,
150       p_init_msg_list,
151       x_return_status,
152       x_msg_count,
153       x_msg_data);
154 
155     -- copy data back from the local variables to OUT or IN-OUT args, if any
156 
157 
158 
159 
160 
161 
162 
163 
164   end;
165 
166   procedure create_geo_struct_map_dtls(p_map_id  NUMBER
167     , p1_a0 JTF_NUMBER_TABLE
168     , p1_a1 JTF_VARCHAR2_TABLE_100
169     , p1_a2 JTF_VARCHAR2_TABLE_100
170     , p_init_msg_list  VARCHAR2
171     , x_return_status out nocopy  VARCHAR2
172     , x_msg_count out nocopy  NUMBER
173     , x_msg_data out nocopy  VARCHAR2
174   )
175 
176   as
177     ddp_geo_struct_map_dtl_tbl hz_geo_struct_map_pub.geo_struct_map_dtl_tbl_type;
178     ddindx binary_integer; indx binary_integer;
179   begin
180 
181     -- copy data to the local IN or IN-OUT args, if any
182 
183     hz_geo_struct_map_pub_w.rosetta_table_copy_in_p2(ddp_geo_struct_map_dtl_tbl, p1_a0
184       , p1_a1
185       , p1_a2
186       );
187 
188 
189 
190 
191 
192     -- here's the delegated call to the old PL/SQL routine
193     hz_geo_struct_map_pub.create_geo_struct_map_dtls(p_map_id,
194       ddp_geo_struct_map_dtl_tbl,
195       p_init_msg_list,
196       x_return_status,
197       x_msg_count,
198       x_msg_data);
199 
200     -- copy data back from the local variables to OUT or IN-OUT args, if any
201 
202 
203 
204 
205 
206   end;
207 
208   procedure update_geo_struct_map_dtls(p_map_id  NUMBER
209     , p1_a0 JTF_NUMBER_TABLE
210     , p1_a1 JTF_VARCHAR2_TABLE_100
211     , p1_a2 JTF_VARCHAR2_TABLE_100
212     , p_init_msg_list  VARCHAR2
213     , x_return_status out nocopy  VARCHAR2
214     , x_msg_count out nocopy  NUMBER
215     , x_msg_data out nocopy  VARCHAR2
216   )
217 
218   as
219     ddp_geo_struct_map_dtl_tbl hz_geo_struct_map_pub.geo_struct_map_dtl_tbl_type;
220     ddindx binary_integer; indx binary_integer;
221   begin
222 
223     -- copy data to the local IN or IN-OUT args, if any
224 
225     hz_geo_struct_map_pub_w.rosetta_table_copy_in_p2(ddp_geo_struct_map_dtl_tbl, p1_a0
226       , p1_a1
227       , p1_a2
228       );
229 
230 
231 
232 
233 
234     -- here's the delegated call to the old PL/SQL routine
235     hz_geo_struct_map_pub.update_geo_struct_map_dtls(p_map_id,
236       ddp_geo_struct_map_dtl_tbl,
237       p_init_msg_list,
238       x_return_status,
239       x_msg_count,
240       x_msg_data);
241 
242     -- copy data back from the local variables to OUT or IN-OUT args, if any
243 
244 
245 
246 
247 
248   end;
249 
250 end hz_geo_struct_map_pub_w;