[Home] [Help]
PACKAGE BODY: APPS.CN_TRX_FACTOR_PVT_W
Source
1 package body cn_trx_factor_pvt_w as
2 /* $Header: cnwtxftb.pls 120.2 2005/09/14 04:30 rarajara ship $ */
3 procedure rosetta_table_copy_in_p1(t out nocopy cn_trx_factor_pvt.trx_factor_tbl_type, a0 JTF_NUMBER_TABLE
4 , a1 JTF_NUMBER_TABLE
5 , a2 JTF_NUMBER_TABLE
6 , a3 JTF_NUMBER_TABLE
7 , a4 JTF_NUMBER_TABLE
8 , a5 JTF_VARCHAR2_TABLE_100
9 , a6 JTF_NUMBER_TABLE
10 , a7 JTF_NUMBER_TABLE
11 ) as
12 ddindx binary_integer; indx binary_integer;
13 begin
14 if a0 is not null and a0.count > 0 then
15 if a0.count > 0 then
16 indx := a0.first;
17 ddindx := 1;
18 while true loop
19 t(ddindx).trx_factor_id := a0(indx);
20 t(ddindx).revenue_class_id := a1(indx);
21 t(ddindx).quota_id := a2(indx);
22 t(ddindx).quota_rule_id := a3(indx);
23 t(ddindx).event_factor := a4(indx);
24 t(ddindx).trx_type := a5(indx);
25 t(ddindx).object_version_number := a6(indx);
26 t(ddindx).org_id := a7(indx);
27 ddindx := ddindx+1;
28 if a0.last =indx
29 then exit;
30 end if;
31 indx := a0.next(indx);
32 end loop;
33 end if;
34 end if;
35 end rosetta_table_copy_in_p1;
36 procedure rosetta_table_copy_out_p1(t cn_trx_factor_pvt.trx_factor_tbl_type, a0 out nocopy JTF_NUMBER_TABLE
37 , a1 out nocopy JTF_NUMBER_TABLE
38 , a2 out nocopy JTF_NUMBER_TABLE
39 , a3 out nocopy JTF_NUMBER_TABLE
40 , a4 out nocopy JTF_NUMBER_TABLE
41 , a5 out nocopy JTF_VARCHAR2_TABLE_100
42 , a6 out nocopy JTF_NUMBER_TABLE
43 , a7 out nocopy JTF_NUMBER_TABLE
44 ) as
45 ddindx binary_integer; indx binary_integer;
46 begin
47 if t is null or t.count = 0 then
48 a0 := JTF_NUMBER_TABLE();
49 a1 := JTF_NUMBER_TABLE();
50 a2 := JTF_NUMBER_TABLE();
51 a3 := JTF_NUMBER_TABLE();
52 a4 := JTF_NUMBER_TABLE();
53 a5 := JTF_VARCHAR2_TABLE_100();
54 a6 := JTF_NUMBER_TABLE();
55 a7 := JTF_NUMBER_TABLE();
56 else
57 a0 := JTF_NUMBER_TABLE();
58 a1 := JTF_NUMBER_TABLE();
59 a2 := JTF_NUMBER_TABLE();
60 a3 := JTF_NUMBER_TABLE();
61 a4 := JTF_NUMBER_TABLE();
62 a5 := JTF_VARCHAR2_TABLE_100();
63 a6 := JTF_NUMBER_TABLE();
64 a7 := JTF_NUMBER_TABLE();
65 if t.count > 0 then
66 a0.extend(t.count);
67 a1.extend(t.count);
68 a2.extend(t.count);
69 a3.extend(t.count);
70 a4.extend(t.count);
71 a5.extend(t.count);
72 a6.extend(t.count);
73 a7.extend(t.count);
74 ddindx := t.first;
78 a1(indx) := t(ddindx).revenue_class_id;
75 indx := 1;
76 while true loop
77 a0(indx) := t(ddindx).trx_factor_id;
79 a2(indx) := t(ddindx).quota_id;
80 a3(indx) := t(ddindx).quota_rule_id;
81 a4(indx) := t(ddindx).event_factor;
82 a5(indx) := t(ddindx).trx_type;
83 a6(indx) := t(ddindx).object_version_number;
84 a7(indx) := t(ddindx).org_id;
85 indx := indx+1;
86 if t.last =ddindx
87 then exit;
88 end if;
89 ddindx := t.next(ddindx);
90 end loop;
91 end if;
92 end if;
93 end rosetta_table_copy_out_p1;
94
95 procedure validate_trx_factor(p_api_version NUMBER
96 , p_init_msg_list VARCHAR2
97 , p_commit VARCHAR2
98 , p_validation_level NUMBER
99 , p_action VARCHAR2
100 , p5_a0 in out nocopy NUMBER
101 , p5_a1 in out nocopy NUMBER
102 , p5_a2 in out nocopy NUMBER
103 , p5_a3 in out nocopy NUMBER
104 , p5_a4 in out nocopy NUMBER
105 , p5_a5 in out nocopy VARCHAR2
106 , p5_a6 in out nocopy NUMBER
107 , p5_a7 in out nocopy NUMBER
108 , p6_a0 NUMBER
109 , p6_a1 NUMBER
110 , p6_a2 NUMBER
111 , p6_a3 NUMBER
112 , p6_a4 NUMBER
113 , p6_a5 VARCHAR2
114 , p6_a6 NUMBER
115 , p6_a7 NUMBER
116 , x_return_status out nocopy VARCHAR2
117 , x_msg_count out nocopy NUMBER
118 , x_msg_data out nocopy VARCHAR2
119 )
120
121 as
122 ddp_trx_factor cn_trx_factor_pvt.trx_factor_rec_type;
123 ddp_old_trx_factor cn_trx_factor_pvt.trx_factor_rec_type;
124 ddindx binary_integer; indx binary_integer;
125 begin
126
127 -- copy data to the local IN or IN-OUT args, if any
128
129
130
131
132
133 ddp_trx_factor.trx_factor_id := p5_a0;
134 ddp_trx_factor.revenue_class_id := p5_a1;
135 ddp_trx_factor.quota_id := p5_a2;
136 ddp_trx_factor.quota_rule_id := p5_a3;
137 ddp_trx_factor.event_factor := p5_a4;
138 ddp_trx_factor.trx_type := p5_a5;
139 ddp_trx_factor.object_version_number := p5_a6;
140 ddp_trx_factor.org_id := p5_a7;
141
142 ddp_old_trx_factor.trx_factor_id := p6_a0;
143 ddp_old_trx_factor.revenue_class_id := p6_a1;
144 ddp_old_trx_factor.quota_id := p6_a2;
145 ddp_old_trx_factor.quota_rule_id := p6_a3;
146 ddp_old_trx_factor.event_factor := p6_a4;
147 ddp_old_trx_factor.trx_type := p6_a5;
148 ddp_old_trx_factor.object_version_number := p6_a6;
149 ddp_old_trx_factor.org_id := p6_a7;
150
151
152
153
154 -- here's the delegated call to the old PL/SQL routine
155 cn_trx_factor_pvt.validate_trx_factor(p_api_version,
156 p_init_msg_list,
157 p_commit,
158 p_validation_level,
159 p_action,
160 ddp_trx_factor,
161 ddp_old_trx_factor,
162 x_return_status,
163 x_msg_count,
164 x_msg_data);
165
166 -- copy data back from the local variables to OUT or IN-OUT args, if any
167
168
169
170
171
172 p5_a0 := ddp_trx_factor.trx_factor_id;
173 p5_a1 := ddp_trx_factor.revenue_class_id;
174 p5_a2 := ddp_trx_factor.quota_id;
175 p5_a3 := ddp_trx_factor.quota_rule_id;
176 p5_a4 := ddp_trx_factor.event_factor;
177 p5_a5 := ddp_trx_factor.trx_type;
178 p5_a6 := ddp_trx_factor.object_version_number;
179 p5_a7 := ddp_trx_factor.org_id;
180
181
182
183
184 end;
185
186 procedure create_trx_factor(p_api_version NUMBER
187 , p_init_msg_list VARCHAR2
188 , p_commit VARCHAR2
189 , p_validation_level NUMBER
190 , p4_a0 in out nocopy NUMBER
191 , p4_a1 in out nocopy NUMBER
192 , p4_a2 in out nocopy NUMBER
193 , p4_a3 in out nocopy NUMBER
194 , p4_a4 in out nocopy NUMBER
195 , p4_a5 in out nocopy VARCHAR2
196 , p4_a6 in out nocopy NUMBER
197 , p4_a7 in out nocopy NUMBER
198 , x_return_status out nocopy VARCHAR2
199 , x_msg_count out nocopy NUMBER
200 , x_msg_data out nocopy VARCHAR2
201 )
202
203 as
204 ddp_trx_factor cn_trx_factor_pvt.trx_factor_rec_type;
205 ddindx binary_integer; indx binary_integer;
206 begin
207
208 -- copy data to the local IN or IN-OUT args, if any
209
210
211
212
213 ddp_trx_factor.trx_factor_id := p4_a0;
214 ddp_trx_factor.revenue_class_id := p4_a1;
215 ddp_trx_factor.quota_id := p4_a2;
216 ddp_trx_factor.quota_rule_id := p4_a3;
217 ddp_trx_factor.event_factor := p4_a4;
218 ddp_trx_factor.trx_type := p4_a5;
219 ddp_trx_factor.object_version_number := p4_a6;
220 ddp_trx_factor.org_id := p4_a7;
221
222
223
224
225 -- here's the delegated call to the old PL/SQL routine
226 cn_trx_factor_pvt.create_trx_factor(p_api_version,
227 p_init_msg_list,
228 p_commit,
229 p_validation_level,
230 ddp_trx_factor,
231 x_return_status,
232 x_msg_count,
233 x_msg_data);
234
235 -- copy data back from the local variables to OUT or IN-OUT args, if any
236
237
238
239
240 p4_a0 := ddp_trx_factor.trx_factor_id;
241 p4_a1 := ddp_trx_factor.revenue_class_id;
242 p4_a2 := ddp_trx_factor.quota_id;
243 p4_a3 := ddp_trx_factor.quota_rule_id;
247 p4_a7 := ddp_trx_factor.org_id;
244 p4_a4 := ddp_trx_factor.event_factor;
245 p4_a5 := ddp_trx_factor.trx_type;
246 p4_a6 := ddp_trx_factor.object_version_number;
248
249
250
251 end;
252
253 procedure update_trx_factor(p_api_version NUMBER
254 , p_init_msg_list VARCHAR2
255 , p_commit VARCHAR2
256 , p_validation_level NUMBER
257 , p4_a0 in out nocopy NUMBER
258 , p4_a1 in out nocopy NUMBER
259 , p4_a2 in out nocopy NUMBER
260 , p4_a3 in out nocopy NUMBER
261 , p4_a4 in out nocopy NUMBER
262 , p4_a5 in out nocopy VARCHAR2
263 , p4_a6 in out nocopy NUMBER
264 , p4_a7 in out nocopy NUMBER
265 , x_return_status out nocopy VARCHAR2
266 , x_msg_count out nocopy NUMBER
267 , x_msg_data out nocopy VARCHAR2
268 )
269
270 as
271 ddp_trx_factor cn_trx_factor_pvt.trx_factor_rec_type;
272 ddindx binary_integer; indx binary_integer;
273 begin
274
275 -- copy data to the local IN or IN-OUT args, if any
276
277
278
279
280 ddp_trx_factor.trx_factor_id := p4_a0;
281 ddp_trx_factor.revenue_class_id := p4_a1;
282 ddp_trx_factor.quota_id := p4_a2;
283 ddp_trx_factor.quota_rule_id := p4_a3;
284 ddp_trx_factor.event_factor := p4_a4;
285 ddp_trx_factor.trx_type := p4_a5;
286 ddp_trx_factor.object_version_number := p4_a6;
287 ddp_trx_factor.org_id := p4_a7;
288
289
290
291
292 -- here's the delegated call to the old PL/SQL routine
293 cn_trx_factor_pvt.update_trx_factor(p_api_version,
294 p_init_msg_list,
295 p_commit,
296 p_validation_level,
297 ddp_trx_factor,
298 x_return_status,
299 x_msg_count,
300 x_msg_data);
301
302 -- copy data back from the local variables to OUT or IN-OUT args, if any
303
304
305
306
307 p4_a0 := ddp_trx_factor.trx_factor_id;
308 p4_a1 := ddp_trx_factor.revenue_class_id;
309 p4_a2 := ddp_trx_factor.quota_id;
310 p4_a3 := ddp_trx_factor.quota_rule_id;
311 p4_a4 := ddp_trx_factor.event_factor;
312 p4_a5 := ddp_trx_factor.trx_type;
313 p4_a6 := ddp_trx_factor.object_version_number;
314 p4_a7 := ddp_trx_factor.org_id;
315
316
317
318 end;
319
320 procedure delete_trx_factor(p_api_version NUMBER
321 , p_init_msg_list VARCHAR2
322 , p_commit VARCHAR2
323 , p_validation_level NUMBER
324 , p4_a0 in out nocopy NUMBER
325 , p4_a1 in out nocopy NUMBER
326 , p4_a2 in out nocopy NUMBER
327 , p4_a3 in out nocopy NUMBER
328 , p4_a4 in out nocopy NUMBER
329 , p4_a5 in out nocopy VARCHAR2
330 , p4_a6 in out nocopy NUMBER
331 , p4_a7 in out nocopy NUMBER
332 , x_return_status out nocopy VARCHAR2
333 , x_msg_count out nocopy NUMBER
334 , x_msg_data out nocopy VARCHAR2
335 )
336
337 as
338 ddp_trx_factor cn_trx_factor_pvt.trx_factor_rec_type;
339 ddindx binary_integer; indx binary_integer;
340 begin
341
342 -- copy data to the local IN or IN-OUT args, if any
343
344
345
346
347 ddp_trx_factor.trx_factor_id := p4_a0;
348 ddp_trx_factor.revenue_class_id := p4_a1;
349 ddp_trx_factor.quota_id := p4_a2;
350 ddp_trx_factor.quota_rule_id := p4_a3;
351 ddp_trx_factor.event_factor := p4_a4;
352 ddp_trx_factor.trx_type := p4_a5;
353 ddp_trx_factor.object_version_number := p4_a6;
354 ddp_trx_factor.org_id := p4_a7;
355
356
357
358
359 -- here's the delegated call to the old PL/SQL routine
360 cn_trx_factor_pvt.delete_trx_factor(p_api_version,
361 p_init_msg_list,
362 p_commit,
363 p_validation_level,
364 ddp_trx_factor,
365 x_return_status,
366 x_msg_count,
367 x_msg_data);
368
369 -- copy data back from the local variables to OUT or IN-OUT args, if any
370
371
372
373
374 p4_a0 := ddp_trx_factor.trx_factor_id;
375 p4_a1 := ddp_trx_factor.revenue_class_id;
376 p4_a2 := ddp_trx_factor.quota_id;
377 p4_a3 := ddp_trx_factor.quota_rule_id;
378 p4_a4 := ddp_trx_factor.event_factor;
379 p4_a5 := ddp_trx_factor.trx_type;
380 p4_a6 := ddp_trx_factor.object_version_number;
381 p4_a7 := ddp_trx_factor.org_id;
382
383
384
385 end;
386
387 procedure get_trx_factor(p_api_version NUMBER
388 , p_init_msg_list VARCHAR2
389 , p_commit VARCHAR2
390 , p_validation_level NUMBER
391 , p_quota_rule_id NUMBER
392 , p5_a0 out nocopy JTF_NUMBER_TABLE
393 , p5_a1 out nocopy JTF_NUMBER_TABLE
394 , p5_a2 out nocopy JTF_NUMBER_TABLE
395 , p5_a3 out nocopy JTF_NUMBER_TABLE
396 , p5_a4 out nocopy JTF_NUMBER_TABLE
397 , p5_a5 out nocopy JTF_VARCHAR2_TABLE_100
398 , p5_a6 out nocopy JTF_NUMBER_TABLE
399 , p5_a7 out nocopy JTF_NUMBER_TABLE
400 , x_return_status out nocopy VARCHAR2
401 , x_msg_count out nocopy NUMBER
402 , x_msg_data out nocopy VARCHAR2
403 )
404
405 as
406 ddx_trx_factor cn_trx_factor_pvt.trx_factor_tbl_type;
407 ddindx binary_integer; indx binary_integer;
408 begin
409
410 -- copy data to the local IN or IN-OUT args, if any
411
412
413
414
415
416
417
418
419
420 -- here's the delegated call to the old PL/SQL routine
421 cn_trx_factor_pvt.get_trx_factor(p_api_version,
422 p_init_msg_list,
423 p_commit,
424 p_validation_level,
425 p_quota_rule_id,
426 ddx_trx_factor,
427 x_return_status,
428 x_msg_count,
429 x_msg_data);
430
431 -- copy data back from the local variables to OUT or IN-OUT args, if any
432
433
434
435
436
437 cn_trx_factor_pvt_w.rosetta_table_copy_out_p1(ddx_trx_factor, p5_a0
438 , p5_a1
439 , p5_a2
440 , p5_a3
441 , p5_a4
442 , p5_a5
443 , p5_a6
444 , p5_a7
445 );
446
447
448
449 end;
450
451 end cn_trx_factor_pvt_w;