DBA Data[Home] [Help]

PACKAGE BODY: APPS.HZ_GEO_STRUCTURE_PUB_UIW_JW

Source


1 package body hz_geo_structure_pub_uiw_jw as
2   /* $Header: ARHGSTJB.pls 120.1 2005/08/26 15:22:37 dmmehta 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_p0(t out nocopy hz_geo_structure_pub_uiw.incl_geo_type_tbl_type, a0 JTF_VARCHAR2_TABLE_100) as
23     ddindx binary_integer; indx binary_integer;
24   begin
25   if a0 is not null and a0.count > 0 then
26       if a0.count > 0 then
27         indx := a0.first;
28         ddindx := 1;
29         while true loop
30           t(ddindx) := a0(indx);
31           ddindx := ddindx+1;
32           if a0.last =indx
33             then exit;
34           end if;
35           indx := a0.next(indx);
36         end loop;
37       end if;
38    end if;
39   end rosetta_table_copy_in_p0;
40   procedure rosetta_table_copy_out_p0(t hz_geo_structure_pub_uiw.incl_geo_type_tbl_type, a0 out nocopy JTF_VARCHAR2_TABLE_100) as
41     ddindx binary_integer; indx binary_integer;
42   begin
43   if t is null or t.count = 0 then
44     a0 := JTF_VARCHAR2_TABLE_100();
45   else
46       a0 := JTF_VARCHAR2_TABLE_100();
47       if t.count > 0 then
48         a0.extend(t.count);
49         ddindx := t.first;
50         indx := 1;
51         while true loop
52           a0(indx) := t(ddindx);
53           indx := indx+1;
54           if t.last =ddindx
55             then exit;
56           end if;
57           ddindx := t.next(ddindx);
58         end loop;
59       end if;
60    end if;
61   end rosetta_table_copy_out_p0;
62 
63   procedure create_geography_type(p_init_msg_list  VARCHAR2
64     , x_return_status out nocopy  VARCHAR2
65     , x_msg_count out nocopy  NUMBER
66     , x_msg_data out nocopy  VARCHAR2
67     , p1_a0  VARCHAR2 := null
68     , p1_a1  VARCHAR2 := null
69     , p1_a2  VARCHAR2 := null
70     , p1_a3  NUMBER := null
71   )
72   as
73     ddp_geography_type_rec hz_geo_structure_pub_uiw.geography_type_rec_type;
74     ddindx binary_integer; indx binary_integer;
75   begin
76 
77     -- copy data to the local IN or IN-OUT args, if any
78 
79     ddp_geography_type_rec.geography_type := p1_a0;
80     ddp_geography_type_rec.geography_type_name := p1_a1;
81     ddp_geography_type_rec.created_by_module := p1_a2;
82     ddp_geography_type_rec.application_id := rosetta_g_miss_num_map(p1_a3);
83 
84 
85 
86 
87     -- here's the delegated call to the old PL/SQL routine
88     hz_geo_structure_pub_uiw.create_geography_type(p_init_msg_list,
89       ddp_geography_type_rec,
90       x_return_status,
91       x_msg_count,
92       x_msg_data);
93 
94     -- copy data back from the local OUT or IN-OUT args, if any
95 
96 
97 
98 
99   end;
100 
101   procedure create_geo_structure(p_init_msg_list  VARCHAR2
102     , x_return_status out nocopy  VARCHAR2
103     , x_msg_count out nocopy  NUMBER
104     , x_msg_data out nocopy  VARCHAR2
105     , p1_a0  NUMBER := null
106     , p1_a1  VARCHAR2 := null
107     , p1_a2  VARCHAR2 := null
108     , p1_a3  VARCHAR2 := null
109     , p1_a4  NUMBER := null
110   )
111   as
112     ddp_geo_structure_rec hz_geo_structure_pub_uiw.geo_structure_rec_type;
113     ddindx binary_integer; indx binary_integer;
114   begin
115 
116     -- copy data to the local IN or IN-OUT args, if any
117 
118     ddp_geo_structure_rec.geography_id := rosetta_g_miss_num_map(p1_a0);
119     ddp_geo_structure_rec.geography_type := p1_a1;
120     ddp_geo_structure_rec.parent_geography_type := p1_a2;
121     ddp_geo_structure_rec.created_by_module := p1_a3;
122     ddp_geo_structure_rec.application_id := rosetta_g_miss_num_map(p1_a4);
123 
124 
125 
126 
127     -- here's the delegated call to the old PL/SQL routine
128     hz_geo_structure_pub_uiw.create_geo_structure(p_init_msg_list,
129       ddp_geo_structure_rec,
130       x_return_status,
131       x_msg_count,
132       x_msg_data);
133 
134     -- copy data back from the local OUT or IN-OUT args, if any
135 
136 
137 
138 
139   end;
140 
141   procedure create_geo_rel_type(p_init_msg_list  VARCHAR2
142     , x_relationship_type_id out nocopy  NUMBER
143     , x_return_status out nocopy  VARCHAR2
144     , x_msg_count out nocopy  NUMBER
145     , x_msg_data out nocopy  VARCHAR2
146     , p1_a0  VARCHAR2 := null
147     , p1_a1  VARCHAR2 := null
148     , p1_a2  VARCHAR2 := null
149     , p1_a3  VARCHAR2 := null
150     , p1_a4  NUMBER := null
151   )
152   as
153     ddp_geo_rel_type_rec hz_geo_structure_pub_uiw.geo_rel_type_rec_type;
154     ddindx binary_integer; indx binary_integer;
155   begin
156 
157     -- copy data to the local IN or IN-OUT args, if any
158 
159     ddp_geo_rel_type_rec.geography_type := p1_a0;
160     ddp_geo_rel_type_rec.parent_geography_type := p1_a1;
161     ddp_geo_rel_type_rec.status := p1_a2;
162     ddp_geo_rel_type_rec.created_by_module := p1_a3;
163     ddp_geo_rel_type_rec.application_id := rosetta_g_miss_num_map(p1_a4);
164 
165 
166 
167 
168 
169     -- here's the delegated call to the old PL/SQL routine
170     hz_geo_structure_pub_uiw.create_geo_rel_type(p_init_msg_list,
171       ddp_geo_rel_type_rec,
172       x_relationship_type_id,
173       x_return_status,
174       x_msg_count,
175       x_msg_data);
176 
177     -- copy data back from the local OUT or IN-OUT args, if any
178 
179 
180 
181 
182 
183   end;
184 
185   procedure create_zone_type(p_init_msg_list  VARCHAR2
186     , p_included_geography_type JTF_VARCHAR2_TABLE_100
187     , x_return_status out nocopy  VARCHAR2
188     , x_msg_count out nocopy  NUMBER
189     , x_msg_data out nocopy  VARCHAR2
190     , p1_a0  VARCHAR2 := null
191     , p1_a1  VARCHAR2 := null
192     , p1_a2  VARCHAR2 := null
193     , p1_a3  NUMBER := null
194     , p1_a4  VARCHAR2 := 'N'
195     , p1_a5  VARCHAR2 := null
196     , p1_a6  NUMBER := null
197   )
198   as
199     ddp_zone_type_rec hz_geo_structure_pub_uiw.zone_type_rec_type;
200     ddp_included_geography_type hz_geo_structure_pub_uiw.incl_geo_type_tbl_type;
201     ddindx binary_integer; indx binary_integer;
202   begin
203 
204     -- copy data to the local IN or IN-OUT args, if any
205 
206     ddp_zone_type_rec.geography_type := p1_a0;
207     ddp_zone_type_rec.geography_type_name := p1_a1;
208     ddp_zone_type_rec.geography_use := p1_a2;
209     ddp_zone_type_rec.limited_by_geography_id := rosetta_g_miss_num_map(p1_a3);
210     ddp_zone_type_rec.postal_code_range_flag := p1_a4;
211     ddp_zone_type_rec.created_by_module := p1_a5;
212     ddp_zone_type_rec.application_id := rosetta_g_miss_num_map(p1_a6);
213 
214     hz_geo_structure_pub_uiw_jw.rosetta_table_copy_in_p0(ddp_included_geography_type, p_included_geography_type);
215 
216 
217 
218 
219     -- here's the delegated call to the old PL/SQL routine
220     hz_geo_structure_pub_uiw.create_zone_type(p_init_msg_list,
221       ddp_zone_type_rec,
222       ddp_included_geography_type,
223       x_return_status,
224       x_msg_count,
225       x_msg_data);
226 
227     -- copy data back from the local OUT or IN-OUT args, if any
228 
229 
230 
231 
232 
233   end;
234 
235   procedure update_zone_type(p_init_msg_list  VARCHAR2
236     , p_included_geography_type JTF_VARCHAR2_TABLE_100
237     , p_object_version_number in out nocopy  NUMBER
238     , x_return_status out nocopy  VARCHAR2
239     , x_msg_count out nocopy  NUMBER
240     , x_msg_data out nocopy  VARCHAR2
241     , p1_a0  VARCHAR2 := null
242     , p1_a1  VARCHAR2 := null
243     , p1_a2  VARCHAR2 := null
244     , p1_a3  NUMBER := null
245     , p1_a4  VARCHAR2 := null
246     , p1_a5  VARCHAR2 := null
247     , p1_a6  NUMBER := null
248   )
249   as
250     ddp_zone_type_rec hz_geo_structure_pub_uiw.zone_type_rec_type;
251     ddp_included_geography_type hz_geo_structure_pub_uiw.incl_geo_type_tbl_type;
252     ddindx binary_integer; indx binary_integer;
253   begin
254 
255     -- copy data to the local IN or IN-OUT args, if any
256 
257     ddp_zone_type_rec.geography_type := p1_a0;
258     ddp_zone_type_rec.geography_type_name := p1_a1;
259     ddp_zone_type_rec.geography_use := p1_a2;
260     ddp_zone_type_rec.limited_by_geography_id := rosetta_g_miss_num_map(p1_a3);
261     ddp_zone_type_rec.postal_code_range_flag := p1_a4;
262     ddp_zone_type_rec.created_by_module := p1_a5;
263     ddp_zone_type_rec.application_id := rosetta_g_miss_num_map(p1_a6);
264 
265     hz_geo_structure_pub_uiw_jw.rosetta_table_copy_in_p0(ddp_included_geography_type, p_included_geography_type);
266 
267 
268 
269 
270 
271     -- here's the delegated call to the old PL/SQL routine
272     hz_geo_structure_pub_uiw.update_zone_type(p_init_msg_list,
273       ddp_zone_type_rec,
274       ddp_included_geography_type,
275       p_object_version_number,
276       x_return_status,
277       x_msg_count,
278       x_msg_data);
279 
280     -- copy data back from the local OUT or IN-OUT args, if any
281 
282 
283 
284 
285 
286 
287   end;
288 
289 end hz_geo_structure_pub_uiw_jw;