1 Package Body pqp_pcv_upd as
2 /* $Header: pqpcvrhi.pkb 120.0 2005/05/29 01:55:22 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' pqp_pcv_upd.'; -- Global package name
9 --
10 -- ----------------------------------------------------------------------------
11 -- |------------------------------< update_dml >------------------------------|
12 -- ----------------------------------------------------------------------------
13 -- {Start Of Comments}
14 --
15 -- Description:
16 -- This procedure controls the actual dml update logic. The processing of
17 -- this procedure is:
18 -- 1) Increment the object_version_number by 1 if the object_version_number
19 -- is defined as an attribute for this entity.
20 -- 2) To set and unset the g_api_dml status as required (as we are about to
21 -- perform dml).
22 -- 3) To update the specified row in the schema using the primary key in
23 -- the predicates.
24 -- 4) To trap any constraint violations that may have occurred.
25 -- 5) To raise any other errors.
26 --
27 -- Prerequisites:
28 -- This is an internal private procedure which must be called from the upd
29 -- procedure.
30 --
31 -- In Parameters:
32 -- A Pl/Sql record structre.
33 --
34 -- Post Success:
35 -- The specified row will be updated in the schema.
36 --
37 -- Post Failure:
38 -- On the update dml failure it is important to note that we always reset the
39 -- g_api_dml status to false.
40 -- If a check, unique or parent integrity constraint violation is raised the
41 -- constraint_error procedure will be called.
42 -- If any other error is reported, the error will be raised after the
43 -- g_api_dml status is reset.
44 --
45 -- Developer Implementation Notes:
46 -- The update 'set' attribute list should be modified if any of your
47 -- attributes are not updateable.
48 --
49 -- Access Status:
50 -- Internal Row Handler Use Only.
51 --
52 -- {End Of Comments}
53 -- ----------------------------------------------------------------------------
54 Procedure update_dml
55 (p_rec in out nocopy pqp_pcv_shd.g_rec_type
56 ) is
57 --
58 l_proc varchar2(72) := g_package||'update_dml';
59 --
60 Begin
61 hr_utility.set_location('Entering:'||l_proc, 5);
62 --
63 -- Increment the object version
64 p_rec.object_version_number := p_rec.object_version_number + 1;
65 --
66 --
67 --
68 -- Update the pqp_configuration_values Row
69 --
70 update pqp_configuration_values
71 set
72 configuration_value_id = p_rec.configuration_value_id
73 ,business_group_id = p_rec.business_group_id
74 ,legislation_code = p_rec.legislation_code
75 ,pcv_attribute_category = p_rec.pcv_attribute_category
76 ,pcv_attribute1 = p_rec.pcv_attribute1
77 ,pcv_attribute2 = p_rec.pcv_attribute2
78 ,pcv_attribute3 = p_rec.pcv_attribute3
79 ,pcv_attribute4 = p_rec.pcv_attribute4
80 ,pcv_attribute5 = p_rec.pcv_attribute5
81 ,pcv_attribute6 = p_rec.pcv_attribute6
82 ,pcv_attribute7 = p_rec.pcv_attribute7
83 ,pcv_attribute8 = p_rec.pcv_attribute8
84 ,pcv_attribute9 = p_rec.pcv_attribute9
85 ,pcv_attribute10 = p_rec.pcv_attribute10
86 ,pcv_attribute11 = p_rec.pcv_attribute11
87 ,pcv_attribute12 = p_rec.pcv_attribute12
88 ,pcv_attribute13 = p_rec.pcv_attribute13
89 ,pcv_attribute14 = p_rec.pcv_attribute14
90 ,pcv_attribute15 = p_rec.pcv_attribute15
91 ,pcv_attribute16 = p_rec.pcv_attribute16
92 ,pcv_attribute17 = p_rec.pcv_attribute17
93 ,pcv_attribute18 = p_rec.pcv_attribute18
94 ,pcv_attribute19 = p_rec.pcv_attribute19
95 ,pcv_attribute20 = p_rec.pcv_attribute20
96 ,pcv_information_category = p_rec.pcv_information_category
97 ,pcv_information1 = p_rec.pcv_information1
98 ,pcv_information2 = p_rec.pcv_information2
99 ,pcv_information3 = p_rec.pcv_information3
100 ,pcv_information4 = p_rec.pcv_information4
101 ,pcv_information5 = p_rec.pcv_information5
102 ,pcv_information6 = p_rec.pcv_information6
103 ,pcv_information7 = p_rec.pcv_information7
104 ,pcv_information8 = p_rec.pcv_information8
105 ,pcv_information9 = p_rec.pcv_information9
106 ,pcv_information10 = p_rec.pcv_information10
107 ,pcv_information11 = p_rec.pcv_information11
108 ,pcv_information12 = p_rec.pcv_information12
109 ,pcv_information13 = p_rec.pcv_information13
110 ,pcv_information14 = p_rec.pcv_information14
111 ,pcv_information15 = p_rec.pcv_information15
112 ,pcv_information16 = p_rec.pcv_information16
113 ,pcv_information17 = p_rec.pcv_information17
114 ,pcv_information18 = p_rec.pcv_information18
115 ,pcv_information19 = p_rec.pcv_information19
116 ,pcv_information20 = p_rec.pcv_information20
117 ,object_version_number = p_rec.object_version_number
118 ,configuration_name =p_rec.configuration_name
119 where configuration_value_id = p_rec.configuration_value_id;
120 --
121 --
122 --
123 hr_utility.set_location(' Leaving:'||l_proc, 10);
124 --
125 Exception
126 When hr_api.check_integrity_violated Then
127 -- A check constraint has been violated
128 --
129 pqp_pcv_shd.constraint_error
130 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
131 When hr_api.parent_integrity_violated Then
132 -- Parent integrity has been violated
133 --
134 pqp_pcv_shd.constraint_error
135 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
136 When hr_api.unique_integrity_violated Then
137 -- Unique integrity has been violated
138 --
139 pqp_pcv_shd.constraint_error
140 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
141 When Others Then
142 --
143 Raise;
144 End update_dml;
145 --
146 -- ----------------------------------------------------------------------------
147 -- |------------------------------< pre_update >------------------------------|
148 -- ----------------------------------------------------------------------------
149 -- {Start Of Comments}
150 --
151 -- Description:
152 -- This private procedure contains any processing which is required before
153 -- the update dml.
154 --
155 -- Prerequisites:
156 -- This is an internal procedure which is called from the upd procedure.
157 --
158 -- In Parameters:
159 -- A Pl/Sql record structure.
160 --
161 -- Post Success:
162 -- Processing continues.
163 --
164 -- Post Failure:
165 -- If an error has occurred, an error message and exception wil be raised
166 -- but not handled.
167 --
168 -- Developer Implementation Notes:
169 -- Any pre-processing required before the update dml is issued should be
170 -- coded within this procedure. It is important to note that any 3rd party
171 -- maintenance should be reviewed before placing in this procedure.
172 --
173 -- Access Status:
174 -- Internal Row Handler Use Only.
175 --
176 -- {End Of Comments}
177 -- ----------------------------------------------------------------------------
178 Procedure pre_update
179 (p_rec in pqp_pcv_shd.g_rec_type
180 ) is
181 --
182 l_proc varchar2(72) := g_package||'pre_update';
183 --
184 Begin
185 hr_utility.set_location('Entering:'||l_proc, 5);
186 --
187 hr_utility.set_location(' Leaving:'||l_proc, 10);
188 End pre_update;
189 --
190 -- ----------------------------------------------------------------------------
191 -- |-----------------------------< post_update >------------------------------|
192 -- ----------------------------------------------------------------------------
193 -- {Start Of Comments}
194 --
195 -- Description:
196 -- This private procedure contains any processing which is required after
197 -- the update dml.
198 --
199 -- Prerequisites:
200 -- This is an internal procedure which is called from the upd procedure.
201 --
202 -- In Parameters:
203 -- A Pl/Sql record structure.
204 --
205 -- Post Success:
206 -- Processing continues.
207 --
208 -- Post Failure:
209 -- If an error has occurred, an error message and exception will be raised
210 -- but not handled.
211 --
212 -- Developer Implementation Notes:
213 -- Any post-processing required after the update dml is issued should be
214 -- coded within this procedure. It is important to note that any 3rd party
215 -- maintenance should be reviewed before placing in this procedure.
216 --
217 -- Access Status:
218 -- Internal Row Handler Use Only.
219 --
220 -- {End Of Comments}
221 -- ----------------------------------------------------------------------------
222 Procedure post_update
223 (p_effective_date in date
224 ,p_rec in pqp_pcv_shd.g_rec_type
225 ) is
226 --
227 l_proc varchar2(72) := g_package||'post_update';
228 --
229 Begin
230 hr_utility.set_location('Entering:'||l_proc, 5);
231 begin
232 --
233 pqp_pcv_rku.after_update
234 (p_effective_date => p_effective_date
235 ,p_configuration_value_id
236 => p_rec.configuration_value_id
237 ,p_business_group_id
238 => p_rec.business_group_id
239 ,p_legislation_code
240 => p_rec.legislation_code
241 ,p_pcv_attribute_category
242 => p_rec.pcv_attribute_category
243 ,p_pcv_attribute1
244 => p_rec.pcv_attribute1
245 ,p_pcv_attribute2
246 => p_rec.pcv_attribute2
247 ,p_pcv_attribute3
248 => p_rec.pcv_attribute3
249 ,p_pcv_attribute4
250 => p_rec.pcv_attribute4
251 ,p_pcv_attribute5
252 => p_rec.pcv_attribute5
253 ,p_pcv_attribute6
254 => p_rec.pcv_attribute6
255 ,p_pcv_attribute7
256 => p_rec.pcv_attribute7
257 ,p_pcv_attribute8
258 => p_rec.pcv_attribute8
259 ,p_pcv_attribute9
260 => p_rec.pcv_attribute9
261 ,p_pcv_attribute10
262 => p_rec.pcv_attribute10
263 ,p_pcv_attribute11
264 => p_rec.pcv_attribute11
265 ,p_pcv_attribute12
266 => p_rec.pcv_attribute12
267 ,p_pcv_attribute13
268 => p_rec.pcv_attribute13
269 ,p_pcv_attribute14
270 => p_rec.pcv_attribute14
271 ,p_pcv_attribute15
272 => p_rec.pcv_attribute15
273 ,p_pcv_attribute16
274 => p_rec.pcv_attribute16
275 ,p_pcv_attribute17
276 => p_rec.pcv_attribute17
277 ,p_pcv_attribute18
278 => p_rec.pcv_attribute18
279 ,p_pcv_attribute19
280 => p_rec.pcv_attribute19
281 ,p_pcv_attribute20
282 => p_rec.pcv_attribute20
283 ,p_pcv_information_category
284 => p_rec.pcv_information_category
285 ,p_pcv_information1
286 => p_rec.pcv_information1
287 ,p_pcv_information2
288 => p_rec.pcv_information2
289 ,p_pcv_information3
290 => p_rec.pcv_information3
291 ,p_pcv_information4
292 => p_rec.pcv_information4
293 ,p_pcv_information5
294 => p_rec.pcv_information5
295 ,p_pcv_information6
296 => p_rec.pcv_information6
297 ,p_pcv_information7
298 => p_rec.pcv_information7
299 ,p_pcv_information8
300 => p_rec.pcv_information8
301 ,p_pcv_information9
302 => p_rec.pcv_information9
303 ,p_pcv_information10
304 => p_rec.pcv_information10
305 ,p_pcv_information11
306 => p_rec.pcv_information11
307 ,p_pcv_information12
308 => p_rec.pcv_information12
309 ,p_pcv_information13
310 => p_rec.pcv_information13
311 ,p_pcv_information14
312 => p_rec.pcv_information14
313 ,p_pcv_information15
314 => p_rec.pcv_information15
315 ,p_pcv_information16
316 => p_rec.pcv_information16
317 ,p_pcv_information17
318 => p_rec.pcv_information17
319 ,p_pcv_information18
320 => p_rec.pcv_information18
321 ,p_pcv_information19
322 => p_rec.pcv_information19
323 ,p_pcv_information20
324 => p_rec.pcv_information20
325 ,p_object_version_number
326 => p_rec.object_version_number
327 ,p_configuration_name
328 => p_rec.configuration_name
329 ,p_business_group_id_o
330 => pqp_pcv_shd.g_old_rec.business_group_id
331 ,p_legislation_code_o
332 => pqp_pcv_shd.g_old_rec.legislation_code
333 ,p_pcv_attribute_category_o
334 => pqp_pcv_shd.g_old_rec.pcv_attribute_category
335 ,p_pcv_attribute1_o
336 => pqp_pcv_shd.g_old_rec.pcv_attribute1
337 ,p_pcv_attribute2_o
338 => pqp_pcv_shd.g_old_rec.pcv_attribute2
339 ,p_pcv_attribute3_o
340 => pqp_pcv_shd.g_old_rec.pcv_attribute3
341 ,p_pcv_attribute4_o
342 => pqp_pcv_shd.g_old_rec.pcv_attribute4
343 ,p_pcv_attribute5_o
344 => pqp_pcv_shd.g_old_rec.pcv_attribute5
345 ,p_pcv_attribute6_o
346 => pqp_pcv_shd.g_old_rec.pcv_attribute6
347 ,p_pcv_attribute7_o
348 => pqp_pcv_shd.g_old_rec.pcv_attribute7
349 ,p_pcv_attribute8_o
350 => pqp_pcv_shd.g_old_rec.pcv_attribute8
351 ,p_pcv_attribute9_o
352 => pqp_pcv_shd.g_old_rec.pcv_attribute9
353 ,p_pcv_attribute10_o
354 => pqp_pcv_shd.g_old_rec.pcv_attribute10
355 ,p_pcv_attribute11_o
356 => pqp_pcv_shd.g_old_rec.pcv_attribute11
357 ,p_pcv_attribute12_o
358 => pqp_pcv_shd.g_old_rec.pcv_attribute12
359 ,p_pcv_attribute13_o
360 => pqp_pcv_shd.g_old_rec.pcv_attribute13
361 ,p_pcv_attribute14_o
362 => pqp_pcv_shd.g_old_rec.pcv_attribute14
363 ,p_pcv_attribute15_o
364 => pqp_pcv_shd.g_old_rec.pcv_attribute15
365 ,p_pcv_attribute16_o
366 => pqp_pcv_shd.g_old_rec.pcv_attribute16
367 ,p_pcv_attribute17_o
368 => pqp_pcv_shd.g_old_rec.pcv_attribute17
369 ,p_pcv_attribute18_o
370 => pqp_pcv_shd.g_old_rec.pcv_attribute18
371 ,p_pcv_attribute19_o
372 => pqp_pcv_shd.g_old_rec.pcv_attribute19
373 ,p_pcv_attribute20_o
374 => pqp_pcv_shd.g_old_rec.pcv_attribute20
375 ,p_pcv_information_category_o
376 => pqp_pcv_shd.g_old_rec.pcv_information_category
377 ,p_pcv_information1_o
378 => pqp_pcv_shd.g_old_rec.pcv_information1
379 ,p_pcv_information2_o
380 => pqp_pcv_shd.g_old_rec.pcv_information2
381 ,p_pcv_information3_o
382 => pqp_pcv_shd.g_old_rec.pcv_information3
383 ,p_pcv_information4_o
384 => pqp_pcv_shd.g_old_rec.pcv_information4
385 ,p_pcv_information5_o
386 => pqp_pcv_shd.g_old_rec.pcv_information5
387 ,p_pcv_information6_o
388 => pqp_pcv_shd.g_old_rec.pcv_information6
389 ,p_pcv_information7_o
390 => pqp_pcv_shd.g_old_rec.pcv_information7
391 ,p_pcv_information8_o
392 => pqp_pcv_shd.g_old_rec.pcv_information8
393 ,p_pcv_information9_o
394 => pqp_pcv_shd.g_old_rec.pcv_information9
395 ,p_pcv_information10_o
396 => pqp_pcv_shd.g_old_rec.pcv_information10
397 ,p_pcv_information11_o
398 => pqp_pcv_shd.g_old_rec.pcv_information11
399 ,p_pcv_information12_o
400 => pqp_pcv_shd.g_old_rec.pcv_information12
401 ,p_pcv_information13_o
402 => pqp_pcv_shd.g_old_rec.pcv_information13
403 ,p_pcv_information14_o
404 => pqp_pcv_shd.g_old_rec.pcv_information14
405 ,p_pcv_information15_o
406 => pqp_pcv_shd.g_old_rec.pcv_information15
407 ,p_pcv_information16_o
408 => pqp_pcv_shd.g_old_rec.pcv_information16
409 ,p_pcv_information17_o
410 => pqp_pcv_shd.g_old_rec.pcv_information17
411 ,p_pcv_information18_o
412 => pqp_pcv_shd.g_old_rec.pcv_information18
413 ,p_pcv_information19_o
414 => pqp_pcv_shd.g_old_rec.pcv_information19
415 ,p_pcv_information20_o
416 => pqp_pcv_shd.g_old_rec.pcv_information20
417 ,p_object_version_number_o
418 => pqp_pcv_shd.g_old_rec.object_version_number
419 ,p_configuration_name_o
420 => pqp_pcv_shd.g_old_rec.configuration_name
421 );
422 --
423 exception
424 --
425 when hr_api.cannot_find_prog_unit then
426 --
427 hr_api.cannot_find_prog_unit_error
428 (p_module_name => 'PQP_CONFIGURATION_VALUES'
429 ,p_hook_type => 'AU');
430 --
431 end;
432 --
433 hr_utility.set_location(' Leaving:'||l_proc, 10);
434 End post_update;
435 --
436 -- ----------------------------------------------------------------------------
437 -- |-----------------------------< convert_defs >-----------------------------|
438 -- ----------------------------------------------------------------------------
439 -- {Start Of Comments}
440 --
441 -- Description:
442 -- The Convert_Defs procedure has one very important function:
443 -- It must return the record structure for the row with all system defaulted
444 -- values converted into its corresponding parameter value for update. When
445 -- we attempt to update a row through the Upd process , certain
446 -- parameters can be defaulted which enables flexibility in the calling of
447 -- the upd process (e.g. only attributes which need to be updated need to be
448 -- specified). For the upd process to determine which attributes
449 -- have NOT been specified we need to check if the parameter has a reserved
450 -- system default value. Therefore, for all parameters which have a
451 -- corresponding reserved system default mechanism specified we need to
452 -- check if a system default is being used. If a system default is being
453 -- used then we convert the defaulted value into its corresponding attribute
454 -- value held in the g_old_rec data structure.
455 --
456 -- Prerequisites:
457 -- This private function can only be called from the upd process.
458 --
459 -- In Parameters:
460 -- A Pl/Sql record structure.
461 --
462 -- Post Success:
463 -- The record structure will be returned with all system defaulted parameter
464 -- values converted into its current row attribute value.
465 --
466 -- Post Failure:
467 -- No direct error handling is required within this function. Any possible
468 -- errors within this procedure will be a PL/SQL value error due to
469 -- conversion of datatypes or data lengths.
470 --
471 -- Developer Implementation Notes:
472 -- None.
473 --
474 -- Access Status:
475 -- Internal Row Handler Use Only.
476 --
477 -- {End Of Comments}
478 -- ----------------------------------------------------------------------------
479 Procedure convert_defs
480 (p_rec in out nocopy pqp_pcv_shd.g_rec_type
481 ) is
482 --
483 Begin
484 --
485 -- We must now examine each argument value in the
486 -- p_rec plsql record structure
487 -- to see if a system default is being used. If a system default
488 -- is being used then we must set to the 'current' argument value.
489 --
490 If (p_rec.business_group_id = hr_api.g_number) then
491 p_rec.business_group_id :=
492 pqp_pcv_shd.g_old_rec.business_group_id;
493 End If;
494 If (p_rec.legislation_code = hr_api.g_varchar2) then
495 p_rec.legislation_code :=
496 pqp_pcv_shd.g_old_rec.legislation_code;
497 End If;
498 If (p_rec.pcv_attribute_category = hr_api.g_varchar2) then
499 p_rec.pcv_attribute_category :=
500 pqp_pcv_shd.g_old_rec.pcv_attribute_category;
501 End If;
502 If (p_rec.pcv_attribute1 = hr_api.g_varchar2) then
503 p_rec.pcv_attribute1 :=
504 pqp_pcv_shd.g_old_rec.pcv_attribute1;
505 End If;
506 If (p_rec.pcv_attribute2 = hr_api.g_varchar2) then
507 p_rec.pcv_attribute2 :=
508 pqp_pcv_shd.g_old_rec.pcv_attribute2;
509 End If;
510 If (p_rec.pcv_attribute3 = hr_api.g_varchar2) then
511 p_rec.pcv_attribute3 :=
512 pqp_pcv_shd.g_old_rec.pcv_attribute3;
513 End If;
514 If (p_rec.pcv_attribute4 = hr_api.g_varchar2) then
515 p_rec.pcv_attribute4 :=
516 pqp_pcv_shd.g_old_rec.pcv_attribute4;
517 End If;
518 If (p_rec.pcv_attribute5 = hr_api.g_varchar2) then
519 p_rec.pcv_attribute5 :=
520 pqp_pcv_shd.g_old_rec.pcv_attribute5;
521 End If;
522 If (p_rec.pcv_attribute6 = hr_api.g_varchar2) then
523 p_rec.pcv_attribute6 :=
524 pqp_pcv_shd.g_old_rec.pcv_attribute6;
525 End If;
526 If (p_rec.pcv_attribute7 = hr_api.g_varchar2) then
527 p_rec.pcv_attribute7 :=
528 pqp_pcv_shd.g_old_rec.pcv_attribute7;
529 End If;
530 If (p_rec.pcv_attribute8 = hr_api.g_varchar2) then
531 p_rec.pcv_attribute8 :=
532 pqp_pcv_shd.g_old_rec.pcv_attribute8;
533 End If;
534 If (p_rec.pcv_attribute9 = hr_api.g_varchar2) then
535 p_rec.pcv_attribute9 :=
536 pqp_pcv_shd.g_old_rec.pcv_attribute9;
537 End If;
538 If (p_rec.pcv_attribute10 = hr_api.g_varchar2) then
539 p_rec.pcv_attribute10 :=
540 pqp_pcv_shd.g_old_rec.pcv_attribute10;
541 End If;
542 If (p_rec.pcv_attribute11 = hr_api.g_varchar2) then
543 p_rec.pcv_attribute11 :=
544 pqp_pcv_shd.g_old_rec.pcv_attribute11;
545 End If;
546 If (p_rec.pcv_attribute12 = hr_api.g_varchar2) then
547 p_rec.pcv_attribute12 :=
548 pqp_pcv_shd.g_old_rec.pcv_attribute12;
549 End If;
550 If (p_rec.pcv_attribute13 = hr_api.g_varchar2) then
551 p_rec.pcv_attribute13 :=
552 pqp_pcv_shd.g_old_rec.pcv_attribute13;
553 End If;
554 If (p_rec.pcv_attribute14 = hr_api.g_varchar2) then
555 p_rec.pcv_attribute14 :=
556 pqp_pcv_shd.g_old_rec.pcv_attribute14;
557 End If;
558 If (p_rec.pcv_attribute15 = hr_api.g_varchar2) then
559 p_rec.pcv_attribute15 :=
560 pqp_pcv_shd.g_old_rec.pcv_attribute15;
561 End If;
562 If (p_rec.pcv_attribute16 = hr_api.g_varchar2) then
563 p_rec.pcv_attribute16 :=
564 pqp_pcv_shd.g_old_rec.pcv_attribute16;
565 End If;
566 If (p_rec.pcv_attribute17 = hr_api.g_varchar2) then
567 p_rec.pcv_attribute17 :=
568 pqp_pcv_shd.g_old_rec.pcv_attribute17;
569 End If;
570 If (p_rec.pcv_attribute18 = hr_api.g_varchar2) then
571 p_rec.pcv_attribute18 :=
572 pqp_pcv_shd.g_old_rec.pcv_attribute18;
573 End If;
574 If (p_rec.pcv_attribute19 = hr_api.g_varchar2) then
575 p_rec.pcv_attribute19 :=
576 pqp_pcv_shd.g_old_rec.pcv_attribute19;
577 End If;
578 If (p_rec.pcv_attribute20 = hr_api.g_varchar2) then
579 p_rec.pcv_attribute20 :=
580 pqp_pcv_shd.g_old_rec.pcv_attribute20;
581 End If;
582 If (p_rec.pcv_information_category = hr_api.g_varchar2) then
583 p_rec.pcv_information_category :=
584 pqp_pcv_shd.g_old_rec.pcv_information_category;
585 End If;
586 If (p_rec.pcv_information1 = hr_api.g_varchar2) then
587 p_rec.pcv_information1 :=
588 pqp_pcv_shd.g_old_rec.pcv_information1;
589 End If;
590 If (p_rec.pcv_information2 = hr_api.g_varchar2) then
591 p_rec.pcv_information2 :=
592 pqp_pcv_shd.g_old_rec.pcv_information2;
593 End If;
594 If (p_rec.pcv_information3 = hr_api.g_varchar2) then
595 p_rec.pcv_information3 :=
596 pqp_pcv_shd.g_old_rec.pcv_information3;
597 End If;
598 If (p_rec.pcv_information4 = hr_api.g_varchar2) then
599 p_rec.pcv_information4 :=
600 pqp_pcv_shd.g_old_rec.pcv_information4;
601 End If;
602 If (p_rec.pcv_information5 = hr_api.g_varchar2) then
603 p_rec.pcv_information5 :=
604 pqp_pcv_shd.g_old_rec.pcv_information5;
605 End If;
606 If (p_rec.pcv_information6 = hr_api.g_varchar2) then
607 p_rec.pcv_information6 :=
608 pqp_pcv_shd.g_old_rec.pcv_information6;
609 End If;
610 If (p_rec.pcv_information7 = hr_api.g_varchar2) then
611 p_rec.pcv_information7 :=
612 pqp_pcv_shd.g_old_rec.pcv_information7;
613 End If;
614 If (p_rec.pcv_information8 = hr_api.g_varchar2) then
615 p_rec.pcv_information8 :=
616 pqp_pcv_shd.g_old_rec.pcv_information8;
617 End If;
618 If (p_rec.pcv_information9 = hr_api.g_varchar2) then
619 p_rec.pcv_information9 :=
620 pqp_pcv_shd.g_old_rec.pcv_information9;
621 End If;
622 If (p_rec.pcv_information10 = hr_api.g_varchar2) then
623 p_rec.pcv_information10 :=
624 pqp_pcv_shd.g_old_rec.pcv_information10;
625 End If;
626 If (p_rec.pcv_information11 = hr_api.g_varchar2) then
627 p_rec.pcv_information11 :=
628 pqp_pcv_shd.g_old_rec.pcv_information11;
629 End If;
630 If (p_rec.pcv_information12 = hr_api.g_varchar2) then
631 p_rec.pcv_information12 :=
632 pqp_pcv_shd.g_old_rec.pcv_information12;
633 End If;
634 If (p_rec.pcv_information13 = hr_api.g_varchar2) then
635 p_rec.pcv_information13 :=
636 pqp_pcv_shd.g_old_rec.pcv_information13;
637 End If;
638 If (p_rec.pcv_information14 = hr_api.g_varchar2) then
639 p_rec.pcv_information14 :=
640 pqp_pcv_shd.g_old_rec.pcv_information14;
641 End If;
642 If (p_rec.pcv_information15 = hr_api.g_varchar2) then
643 p_rec.pcv_information15 :=
644 pqp_pcv_shd.g_old_rec.pcv_information15;
645 End If;
646 If (p_rec.pcv_information16 = hr_api.g_varchar2) then
647 p_rec.pcv_information16 :=
648 pqp_pcv_shd.g_old_rec.pcv_information16;
649 End If;
650 If (p_rec.pcv_information17 = hr_api.g_varchar2) then
651 p_rec.pcv_information17 :=
652 pqp_pcv_shd.g_old_rec.pcv_information17;
653 End If;
654 If (p_rec.pcv_information18 = hr_api.g_varchar2) then
655 p_rec.pcv_information18 :=
656 pqp_pcv_shd.g_old_rec.pcv_information18;
657 End If;
658 If (p_rec.pcv_information19 = hr_api.g_varchar2) then
659 p_rec.pcv_information19 :=
660 pqp_pcv_shd.g_old_rec.pcv_information19;
661 End If;
662 If (p_rec.pcv_information20 = hr_api.g_varchar2) then
663 p_rec.pcv_information20 :=
664 pqp_pcv_shd.g_old_rec.pcv_information20;
665 End If;
666 If (p_rec.configuration_name = hr_api.g_varchar2) then
667 p_rec.configuration_name :=
668 pqp_pcv_shd.g_old_rec.configuration_name;
669 End If;
670 --
671 End convert_defs;
672 --
673 -- ----------------------------------------------------------------------------
674 -- |---------------------------------< upd >----------------------------------|
675 -- ----------------------------------------------------------------------------
676 Procedure upd
677 (p_effective_date in date
678 ,p_rec in out nocopy pqp_pcv_shd.g_rec_type
679 ) is
680 --
681 l_proc varchar2(72) := g_package||'upd';
682 --
683 Begin
684 hr_utility.set_location('Entering:'||l_proc, 5);
685 --
686 -- We must lock the row which we need to update.
687 --
688 pqp_pcv_shd.lck
689 (p_rec.configuration_value_id
690 ,p_rec.object_version_number
691 );
692 --
693 -- 1. During an update system defaults are used to determine if
694 -- arguments have been defaulted or not. We must therefore
695 -- derive the full record structure values to be updated.
696 --
697 -- 2. Call the supporting update validate operations.
698 --
699 convert_defs(p_rec);
700 pqp_pcv_bus.update_validate
701 (p_effective_date
702 ,p_rec
703 );
704 --
705 -- Call to raise any errors on multi-message list
706 hr_multi_message.end_validation_set;
707 --
708 -- Call the supporting pre-update operation
709 --
710 pqp_pcv_upd.pre_update(p_rec);
711 --
712 -- Update the row.
713 --
714 pqp_pcv_upd.update_dml(p_rec);
715 --
716 -- Call the supporting post-update operation
717 --
718 pqp_pcv_upd.post_update
719 (p_effective_date
720 ,p_rec
721 );
722 --
723 -- Call to raise any errors on multi-message list
724 hr_multi_message.end_validation_set;
725 End upd;
726 --
727 -- ----------------------------------------------------------------------------
728 -- |---------------------------------< upd >----------------------------------|
729 -- ----------------------------------------------------------------------------
730 Procedure upd
731 (p_effective_date in date
732 ,p_configuration_value_id in number
733 ,p_object_version_number in out nocopy number
734 ,p_business_group_id in number
735 ,p_legislation_code in varchar2
736 ,p_pcv_attribute_category in varchar2
737 ,p_pcv_attribute1 in varchar2
738 ,p_pcv_attribute2 in varchar2
739 ,p_pcv_attribute3 in varchar2
740 ,p_pcv_attribute4 in varchar2
741 ,p_pcv_attribute5 in varchar2
742 ,p_pcv_attribute6 in varchar2
743 ,p_pcv_attribute7 in varchar2
744 ,p_pcv_attribute8 in varchar2
745 ,p_pcv_attribute9 in varchar2
746 ,p_pcv_attribute10 in varchar2
747 ,p_pcv_attribute11 in varchar2
748 ,p_pcv_attribute12 in varchar2
749 ,p_pcv_attribute13 in varchar2
750 ,p_pcv_attribute14 in varchar2
751 ,p_pcv_attribute15 in varchar2
752 ,p_pcv_attribute16 in varchar2
753 ,p_pcv_attribute17 in varchar2
754 ,p_pcv_attribute18 in varchar2
755 ,p_pcv_attribute19 in varchar2
756 ,p_pcv_attribute20 in varchar2
757 ,p_pcv_information_category in varchar2
758 ,p_pcv_information1 in varchar2
759 ,p_pcv_information2 in varchar2
760 ,p_pcv_information3 in varchar2
761 ,p_pcv_information4 in varchar2
762 ,p_pcv_information5 in varchar2
763 ,p_pcv_information6 in varchar2
764 ,p_pcv_information7 in varchar2
765 ,p_pcv_information8 in varchar2
766 ,p_pcv_information9 in varchar2
767 ,p_pcv_information10 in varchar2
768 ,p_pcv_information11 in varchar2
769 ,p_pcv_information12 in varchar2
770 ,p_pcv_information13 in varchar2
771 ,p_pcv_information14 in varchar2
772 ,p_pcv_information15 in varchar2
773 ,p_pcv_information16 in varchar2
774 ,p_pcv_information17 in varchar2
775 ,p_pcv_information18 in varchar2
776 ,p_pcv_information19 in varchar2
777 ,p_pcv_information20 in varchar2
778 ,p_configuration_name in varchar2
779 ) is
780 --
781 l_rec pqp_pcv_shd.g_rec_type;
782 l_proc varchar2(72) := g_package||'upd';
783 --
784 Begin
785 hr_utility.set_location('Entering:'||l_proc, 5);
786 --
787 -- Call conversion function to turn arguments into the
788 -- l_rec structure.
789 --
790 l_rec :=
791 pqp_pcv_shd.convert_args
792 (p_configuration_value_id
793 ,p_business_group_id
794 ,p_legislation_code
795 ,p_pcv_attribute_category
796 ,p_pcv_attribute1
797 ,p_pcv_attribute2
798 ,p_pcv_attribute3
799 ,p_pcv_attribute4
800 ,p_pcv_attribute5
801 ,p_pcv_attribute6
802 ,p_pcv_attribute7
803 ,p_pcv_attribute8
804 ,p_pcv_attribute9
805 ,p_pcv_attribute10
806 ,p_pcv_attribute11
807 ,p_pcv_attribute12
808 ,p_pcv_attribute13
809 ,p_pcv_attribute14
810 ,p_pcv_attribute15
811 ,p_pcv_attribute16
812 ,p_pcv_attribute17
813 ,p_pcv_attribute18
814 ,p_pcv_attribute19
815 ,p_pcv_attribute20
816 ,p_pcv_information_category
817 ,p_pcv_information1
818 ,p_pcv_information2
819 ,p_pcv_information3
820 ,p_pcv_information4
821 ,p_pcv_information5
822 ,p_pcv_information6
823 ,p_pcv_information7
824 ,p_pcv_information8
825 ,p_pcv_information9
826 ,p_pcv_information10
827 ,p_pcv_information11
828 ,p_pcv_information12
829 ,p_pcv_information13
830 ,p_pcv_information14
831 ,p_pcv_information15
832 ,p_pcv_information16
833 ,p_pcv_information17
834 ,p_pcv_information18
835 ,p_pcv_information19
836 ,p_pcv_information20
837 ,p_object_version_number
838 ,p_configuration_name
839 );
840 --
841 -- Having converted the arguments into the
842 -- plsql record structure we call the corresponding record
843 -- business process.
844 --
845 pqp_pcv_upd.upd
846 (p_effective_date
847 ,l_rec
848 );
849 p_object_version_number := l_rec.object_version_number;
850 --
851 hr_utility.set_location(' Leaving:'||l_proc, 10);
852 End upd;
853 --
854 end pqp_pcv_upd;