1 package body hz_mixnm_webui_utility_jw as
2 /* $Header: ARHXWUJB.pls 120.2 2005/06/18 04:28:31 jhuang 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_mixnm_webui_utility.idlist, a0 JTF_NUMBER_TABLE) 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_mixnm_webui_utility.idlist, a0 out nocopy JTF_NUMBER_TABLE) as
41 ddindx binary_integer; indx binary_integer;
42 begin
43 if t is null or t.count = 0 then
44 a0 := JTF_NUMBER_TABLE();
45 else
46 a0 := JTF_NUMBER_TABLE();
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 rosetta_table_copy_in_p1(t out nocopy hz_mixnm_webui_utility.varcharlist, a0 JTF_VARCHAR2_TABLE_100) as
64 ddindx binary_integer; indx binary_integer;
65 begin
66 if a0 is not null and a0.count > 0 then
67 if a0.count > 0 then
68 indx := a0.first;
69 ddindx := 1;
70 while true loop
71 t(ddindx) := a0(indx);
72 ddindx := ddindx+1;
73 if a0.last =indx
74 then exit;
75 end if;
76 indx := a0.next(indx);
77 end loop;
78 end if;
79 end if;
80 end rosetta_table_copy_in_p1;
81 procedure rosetta_table_copy_out_p1(t hz_mixnm_webui_utility.varcharlist, a0 out nocopy JTF_VARCHAR2_TABLE_100) as
82 ddindx binary_integer; indx binary_integer;
83 begin
84 if t is null or t.count = 0 then
85 a0 := JTF_VARCHAR2_TABLE_100();
86 else
87 a0 := JTF_VARCHAR2_TABLE_100();
88 if t.count > 0 then
89 a0.extend(t.count);
90 ddindx := t.first;
91 indx := 1;
92 while true loop
93 a0(indx) := t(ddindx);
94 indx := indx+1;
95 if t.last =ddindx
96 then exit;
97 end if;
98 ddindx := t.next(ddindx);
99 end loop;
100 end if;
101 end if;
102 end rosetta_table_copy_out_p1;
103
104 procedure create_rule_1(p_rule_type VARCHAR2
105 , p_rule_id in out nocopy NUMBER
106 , p_rule_name VARCHAR2
107 , p_entity_attr_id_tab JTF_NUMBER_TABLE
108 , p_attribute_group_name_tab JTF_VARCHAR2_TABLE_100
109 , p_flag_tab JTF_VARCHAR2_TABLE_100
110 , p_os_tab JTF_VARCHAR2_TABLE_100
111 )
112 as
113 ddp_entity_attr_id_tab hz_mixnm_webui_utility.idlist;
114 ddp_attribute_group_name_tab hz_mixnm_webui_utility.varcharlist;
115 ddp_flag_tab hz_mixnm_webui_utility.varcharlist;
116 ddp_os_tab hz_mixnm_webui_utility.varcharlist;
117 ddindx binary_integer; indx binary_integer;
118 begin
119
120 -- copy data to the local IN or IN-OUT args, if any
121
122
123
124 hz_mixnm_webui_utility_jw.rosetta_table_copy_in_p0(ddp_entity_attr_id_tab, p_entity_attr_id_tab);
125
126 hz_mixnm_webui_utility_jw.rosetta_table_copy_in_p1(ddp_attribute_group_name_tab, p_attribute_group_name_tab);
127
128 hz_mixnm_webui_utility_jw.rosetta_table_copy_in_p1(ddp_flag_tab, p_flag_tab);
129
130 hz_mixnm_webui_utility_jw.rosetta_table_copy_in_p1(ddp_os_tab, p_os_tab);
131
132 -- here's the delegated call to the old PL/SQL routine
133 hz_mixnm_webui_utility.create_rule(p_rule_type,
134 p_rule_id,
135 p_rule_name,
136 ddp_entity_attr_id_tab,
137 ddp_attribute_group_name_tab,
138 ddp_flag_tab,
139 ddp_os_tab);
140
141 -- copy data back from the local OUT or IN-OUT args, if any
142
143
144
145
146
147
148 end;
149
150 procedure update_rule_2(p_rule_type VARCHAR2
151 , p_rule_id NUMBER
152 , p_rule_name VARCHAR2
153 , p_entity_attr_id_tab JTF_NUMBER_TABLE
154 , p_attribute_group_name_tab JTF_VARCHAR2_TABLE_100
155 , p_flag_tab JTF_VARCHAR2_TABLE_100
156 , p_os_tab JTF_VARCHAR2_TABLE_100
157 )
158 as
159 ddp_entity_attr_id_tab hz_mixnm_webui_utility.idlist;
160 ddp_attribute_group_name_tab hz_mixnm_webui_utility.varcharlist;
161 ddp_flag_tab hz_mixnm_webui_utility.varcharlist;
162 ddp_os_tab hz_mixnm_webui_utility.varcharlist;
163 ddindx binary_integer; indx binary_integer;
164 begin
165
166 -- copy data to the local IN or IN-OUT args, if any
167
168
169
170 hz_mixnm_webui_utility_jw.rosetta_table_copy_in_p0(ddp_entity_attr_id_tab, p_entity_attr_id_tab);
171
172 hz_mixnm_webui_utility_jw.rosetta_table_copy_in_p1(ddp_attribute_group_name_tab, p_attribute_group_name_tab);
173
174 hz_mixnm_webui_utility_jw.rosetta_table_copy_in_p1(ddp_flag_tab, p_flag_tab);
175
176 hz_mixnm_webui_utility_jw.rosetta_table_copy_in_p1(ddp_os_tab, p_os_tab);
177
178 -- here's the delegated call to the old PL/SQL routine
179 hz_mixnm_webui_utility.update_rule(p_rule_type,
180 p_rule_id,
181 p_rule_name,
182 ddp_entity_attr_id_tab,
183 ddp_attribute_group_name_tab,
184 ddp_flag_tab,
185 ddp_os_tab);
186
187 -- copy data back from the local OUT or IN-OUT args, if any
188
189
190
191
192
193
194 end;
195
196 procedure update_thirdpartyrule_3(p_rule_exists VARCHAR2
197 , p_entity_attr_id_tab JTF_NUMBER_TABLE
198 , p_attribute_group_name_tab JTF_VARCHAR2_TABLE_100
199 , p_flag_tab JTF_VARCHAR2_TABLE_100
200 , p_os_tab JTF_VARCHAR2_TABLE_100
201 )
202 as
203 ddp_entity_attr_id_tab hz_mixnm_webui_utility.idlist;
204 ddp_attribute_group_name_tab hz_mixnm_webui_utility.varcharlist;
205 ddp_flag_tab hz_mixnm_webui_utility.varcharlist;
206 ddp_os_tab hz_mixnm_webui_utility.varcharlist;
207 ddindx binary_integer; indx binary_integer;
208 begin
209
210 -- copy data to the local IN or IN-OUT args, if any
211
212 hz_mixnm_webui_utility_jw.rosetta_table_copy_in_p0(ddp_entity_attr_id_tab, p_entity_attr_id_tab);
213
214 hz_mixnm_webui_utility_jw.rosetta_table_copy_in_p1(ddp_attribute_group_name_tab, p_attribute_group_name_tab);
215
216 hz_mixnm_webui_utility_jw.rosetta_table_copy_in_p1(ddp_flag_tab, p_flag_tab);
217
218 hz_mixnm_webui_utility_jw.rosetta_table_copy_in_p1(ddp_os_tab, p_os_tab);
219
220 -- here's the delegated call to the old PL/SQL routine
221 hz_mixnm_webui_utility.update_thirdpartyrule(p_rule_exists,
222 ddp_entity_attr_id_tab,
223 ddp_attribute_group_name_tab,
224 ddp_flag_tab,
225 ddp_os_tab);
226
227 -- copy data back from the local OUT or IN-OUT args, if any
228
229
230
231
232 end;
233
234 procedure set_datasources_4(p_entity_attr_id_tab JTF_NUMBER_TABLE
235 , p_attribute_group_name_tab JTF_VARCHAR2_TABLE_100
236 , p_range_tab JTF_NUMBER_TABLE
237 , p_data_sources_tab JTF_VARCHAR2_TABLE_100
238 , p_ranking_tab JTF_NUMBER_TABLE
239 )
240 as
241 ddp_entity_attr_id_tab hz_mixnm_webui_utility.idlist;
242 ddp_attribute_group_name_tab hz_mixnm_webui_utility.varcharlist;
243 ddp_range_tab hz_mixnm_webui_utility.idlist;
244 ddp_data_sources_tab hz_mixnm_webui_utility.varcharlist;
245 ddp_ranking_tab hz_mixnm_webui_utility.idlist;
246 ddindx binary_integer; indx binary_integer;
247 begin
248
249 -- copy data to the local IN or IN-OUT args, if any
250 hz_mixnm_webui_utility_jw.rosetta_table_copy_in_p0(ddp_entity_attr_id_tab, p_entity_attr_id_tab);
251
252 hz_mixnm_webui_utility_jw.rosetta_table_copy_in_p1(ddp_attribute_group_name_tab, p_attribute_group_name_tab);
253
254 hz_mixnm_webui_utility_jw.rosetta_table_copy_in_p0(ddp_range_tab, p_range_tab);
255
256 hz_mixnm_webui_utility_jw.rosetta_table_copy_in_p1(ddp_data_sources_tab, p_data_sources_tab);
257
258 hz_mixnm_webui_utility_jw.rosetta_table_copy_in_p0(ddp_ranking_tab, p_ranking_tab);
259
260 -- here's the delegated call to the old PL/SQL routine
261 hz_mixnm_webui_utility.set_datasources(ddp_entity_attr_id_tab,
262 ddp_attribute_group_name_tab,
263 ddp_range_tab,
264 ddp_data_sources_tab,
265 ddp_ranking_tab);
266
267 -- copy data back from the local OUT or IN-OUT args, if any
268
269
270
271
272 end;
273
274 procedure get_datasourcesforagroup_5(p_entity_type VARCHAR2
275 , p_entity_attr_id_tab JTF_NUMBER_TABLE
276 , x_has_same_setup out nocopy VARCHAR2
277 , x_data_sources_tab out nocopy JTF_VARCHAR2_TABLE_100
278 , x_meaning_tab out nocopy JTF_VARCHAR2_TABLE_100
279 , x_ranking_tab out nocopy JTF_NUMBER_TABLE
280 )
281 as
282 ddp_entity_attr_id_tab hz_mixnm_webui_utility.idlist;
283 ddx_data_sources_tab hz_mixnm_webui_utility.varcharlist;
284 ddx_meaning_tab hz_mixnm_webui_utility.varcharlist;
285 ddx_ranking_tab hz_mixnm_webui_utility.idlist;
286 ddindx binary_integer; indx binary_integer;
287 begin
288
289 -- copy data to the local IN or IN-OUT args, if any
290
291 hz_mixnm_webui_utility_jw.rosetta_table_copy_in_p0(ddp_entity_attr_id_tab, p_entity_attr_id_tab);
292
293
294
295
296
297 -- here's the delegated call to the old PL/SQL routine
298 hz_mixnm_webui_utility.get_datasourcesforagroup(p_entity_type,
299 ddp_entity_attr_id_tab,
300 x_has_same_setup,
301 ddx_data_sources_tab,
302 ddx_meaning_tab,
303 ddx_ranking_tab);
304
305 -- copy data back from the local OUT or IN-OUT args, if any
306
307
308
309 hz_mixnm_webui_utility_jw.rosetta_table_copy_out_p1(ddx_data_sources_tab, x_data_sources_tab);
310
311 hz_mixnm_webui_utility_jw.rosetta_table_copy_out_p1(ddx_meaning_tab, x_meaning_tab);
312
313 hz_mixnm_webui_utility_jw.rosetta_table_copy_out_p0(ddx_ranking_tab, x_ranking_tab);
314 end;
315
316 procedure set_datasourcesforagroup_6(p_entity_attr_id_tab JTF_NUMBER_TABLE
317 , p_attribute_group_name_tab JTF_VARCHAR2_TABLE_100
318 , p_data_sources_tab JTF_VARCHAR2_TABLE_100
319 , p_ranking_tab JTF_NUMBER_TABLE
320 )
321 as
322 ddp_entity_attr_id_tab hz_mixnm_webui_utility.idlist;
323 ddp_attribute_group_name_tab hz_mixnm_webui_utility.varcharlist;
324 ddp_data_sources_tab hz_mixnm_webui_utility.varcharlist;
325 ddp_ranking_tab hz_mixnm_webui_utility.idlist;
326 ddindx binary_integer; indx binary_integer;
327 begin
328
329 -- copy data to the local IN or IN-OUT args, if any
330 hz_mixnm_webui_utility_jw.rosetta_table_copy_in_p0(ddp_entity_attr_id_tab, p_entity_attr_id_tab);
331
332 hz_mixnm_webui_utility_jw.rosetta_table_copy_in_p1(ddp_attribute_group_name_tab, p_attribute_group_name_tab);
333
334 hz_mixnm_webui_utility_jw.rosetta_table_copy_in_p1(ddp_data_sources_tab, p_data_sources_tab);
335
336 hz_mixnm_webui_utility_jw.rosetta_table_copy_in_p0(ddp_ranking_tab, p_ranking_tab);
337
338 -- here's the delegated call to the old PL/SQL routine
339 hz_mixnm_webui_utility.set_datasourcesforagroup(ddp_entity_attr_id_tab,
340 ddp_attribute_group_name_tab,
341 ddp_data_sources_tab,
342 ddp_ranking_tab);
343
344 -- copy data back from the local OUT or IN-OUT args, if any
345
346
347
348 end;
349
350 end hz_mixnm_webui_utility_jw;