1 Package Body pqh_psu_upd as
2 /* $Header: pqpsurhi.pkb 120.0 2005/05/29 02:19 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' pqh_psu_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 pqh_psu_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 pqh_fr_emp_stat_situations Row
69 --
70 update pqh_fr_emp_stat_situations
71 set
72 emp_stat_situation_id = p_rec.emp_stat_situation_id
73 ,statutory_situation_id = p_rec.statutory_situation_id
74 ,person_id = p_rec.person_id
75 ,provisional_start_date = p_rec.provisional_start_date
76 ,provisional_end_date = p_rec.provisional_end_date
77 ,actual_start_date = p_rec.actual_start_date
78 ,actual_end_date = p_rec.actual_end_date
79 ,approval_flag = p_rec.approval_flag
80 ,comments = p_rec.comments
81 ,contact_person_id = p_rec.contact_person_id
82 ,contact_relationship = p_rec.contact_relationship
83 ,external_organization_id = p_rec.external_organization_id
84 ,renewal_flag = p_rec.renewal_flag
85 ,renew_stat_situation_id = p_rec.renew_stat_situation_id
86 ,seconded_career_id = p_rec.seconded_career_id
87 ,attribute_category = p_rec.attribute_category
88 ,attribute1 = p_rec.attribute1
89 ,attribute2 = p_rec.attribute2
90 ,attribute3 = p_rec.attribute3
91 ,attribute4 = p_rec.attribute4
92 ,attribute5 = p_rec.attribute5
93 ,attribute6 = p_rec.attribute6
94 ,attribute7 = p_rec.attribute7
95 ,attribute8 = p_rec.attribute8
96 ,attribute9 = p_rec.attribute9
97 ,attribute10 = p_rec.attribute10
98 ,attribute11 = p_rec.attribute11
99 ,attribute12 = p_rec.attribute12
100 ,attribute13 = p_rec.attribute13
101 ,attribute14 = p_rec.attribute14
102 ,attribute15 = p_rec.attribute15
103 ,attribute16 = p_rec.attribute16
104 ,attribute17 = p_rec.attribute17
105 ,attribute18 = p_rec.attribute18
106 ,attribute19 = p_rec.attribute19
107 ,attribute20 = p_rec.attribute20
108 ,attribute21 = p_rec.attribute21
109 ,attribute22 = p_rec.attribute22
110 ,attribute23 = p_rec.attribute23
111 ,attribute24 = p_rec.attribute24
112 ,attribute25 = p_rec.attribute25
113 ,attribute26 = p_rec.attribute26
114 ,attribute27 = p_rec.attribute27
115 ,attribute28 = p_rec.attribute28
116 ,attribute29 = p_rec.attribute29
117 ,attribute30 = p_rec.attribute30
118 ,object_version_number = p_rec.object_version_number
119 where emp_stat_situation_id = p_rec.emp_stat_situation_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 pqh_psu_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 pqh_psu_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 pqh_psu_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 pqh_psu_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 pqh_psu_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 pqh_psu_rku.after_update
234 (p_effective_date => p_effective_date
235 ,p_emp_stat_situation_id
236 => p_rec.emp_stat_situation_id
237 ,p_statutory_situation_id
238 => p_rec.statutory_situation_id
239 ,p_person_id
240 => p_rec.person_id
241 ,p_provisional_start_date
242 => p_rec.provisional_start_date
243 ,p_provisional_end_date
244 => p_rec.provisional_end_date
245 ,p_actual_start_date
246 => p_rec.actual_start_date
247 ,p_actual_end_date
248 => p_rec.actual_end_date
249 ,p_approval_flag
250 => p_rec.approval_flag
251 ,p_comments
252 => p_rec.comments
253 ,p_contact_person_id
254 => p_rec.contact_person_id
255 ,p_contact_relationship
256 => p_rec.contact_relationship
257 ,p_external_organization_id
258 => p_rec.external_organization_id
259 ,p_renewal_flag
260 => p_rec.renewal_flag
261 ,p_renew_stat_situation_id
262 => p_rec.renew_stat_situation_id
263 ,p_seconded_career_id
264 => p_rec.seconded_career_id
265 ,p_attribute_category
266 => p_rec.attribute_category
267 ,p_attribute1
268 => p_rec.attribute1
269 ,p_attribute2
270 => p_rec.attribute2
271 ,p_attribute3
272 => p_rec.attribute3
273 ,p_attribute4
274 => p_rec.attribute4
275 ,p_attribute5
276 => p_rec.attribute5
277 ,p_attribute6
278 => p_rec.attribute6
279 ,p_attribute7
280 => p_rec.attribute7
281 ,p_attribute8
282 => p_rec.attribute8
283 ,p_attribute9
284 => p_rec.attribute9
285 ,p_attribute10
286 => p_rec.attribute10
287 ,p_attribute11
288 => p_rec.attribute11
289 ,p_attribute12
290 => p_rec.attribute12
291 ,p_attribute13
292 => p_rec.attribute13
293 ,p_attribute14
294 => p_rec.attribute14
295 ,p_attribute15
296 => p_rec.attribute15
297 ,p_attribute16
298 => p_rec.attribute16
299 ,p_attribute17
300 => p_rec.attribute17
301 ,p_attribute18
302 => p_rec.attribute18
303 ,p_attribute19
304 => p_rec.attribute19
305 ,p_attribute20
306 => p_rec.attribute20
307 ,p_attribute21
308 => p_rec.attribute21
309 ,p_attribute22
310 => p_rec.attribute22
311 ,p_attribute23
312 => p_rec.attribute23
313 ,p_attribute24
314 => p_rec.attribute24
315 ,p_attribute25
316 => p_rec.attribute25
317 ,p_attribute26
318 => p_rec.attribute26
319 ,p_attribute27
320 => p_rec.attribute27
321 ,p_attribute28
322 => p_rec.attribute28
323 ,p_attribute29
324 => p_rec.attribute29
325 ,p_attribute30
326 => p_rec.attribute30
327 ,p_object_version_number
328 => p_rec.object_version_number
329 ,p_statutory_situation_id_o
330 => pqh_psu_shd.g_old_rec.statutory_situation_id
331 ,p_person_id_o
332 => pqh_psu_shd.g_old_rec.person_id
333 ,p_provisional_start_date_o
334 => pqh_psu_shd.g_old_rec.provisional_start_date
335 ,p_provisional_end_date_o
336 => pqh_psu_shd.g_old_rec.provisional_end_date
337 ,p_actual_start_date_o
338 => pqh_psu_shd.g_old_rec.actual_start_date
339 ,p_actual_end_date_o
340 => pqh_psu_shd.g_old_rec.actual_end_date
341 ,p_approval_flag_o
342 => pqh_psu_shd.g_old_rec.approval_flag
343 ,p_comments_o
344 => pqh_psu_shd.g_old_rec.comments
345 ,p_contact_person_id_o
346 => pqh_psu_shd.g_old_rec.contact_person_id
347 ,p_contact_relationship_o
348 => pqh_psu_shd.g_old_rec.contact_relationship
349 ,p_external_organization_id_o
350 => pqh_psu_shd.g_old_rec.external_organization_id
351 ,p_renewal_flag_o
352 => pqh_psu_shd.g_old_rec.renewal_flag
353 ,p_renew_stat_situation_id_o
354 => pqh_psu_shd.g_old_rec.renew_stat_situation_id
355 ,p_seconded_career_id_o
356 => pqh_psu_shd.g_old_rec.seconded_career_id
357 ,p_attribute_category_o
358 => pqh_psu_shd.g_old_rec.attribute_category
359 ,p_attribute1_o
360 => pqh_psu_shd.g_old_rec.attribute1
361 ,p_attribute2_o
362 => pqh_psu_shd.g_old_rec.attribute2
363 ,p_attribute3_o
364 => pqh_psu_shd.g_old_rec.attribute3
365 ,p_attribute4_o
366 => pqh_psu_shd.g_old_rec.attribute4
367 ,p_attribute5_o
368 => pqh_psu_shd.g_old_rec.attribute5
369 ,p_attribute6_o
370 => pqh_psu_shd.g_old_rec.attribute6
371 ,p_attribute7_o
372 => pqh_psu_shd.g_old_rec.attribute7
373 ,p_attribute8_o
374 => pqh_psu_shd.g_old_rec.attribute8
375 ,p_attribute9_o
376 => pqh_psu_shd.g_old_rec.attribute9
377 ,p_attribute10_o
378 => pqh_psu_shd.g_old_rec.attribute10
379 ,p_attribute11_o
380 => pqh_psu_shd.g_old_rec.attribute11
381 ,p_attribute12_o
382 => pqh_psu_shd.g_old_rec.attribute12
383 ,p_attribute13_o
384 => pqh_psu_shd.g_old_rec.attribute13
385 ,p_attribute14_o
386 => pqh_psu_shd.g_old_rec.attribute14
387 ,p_attribute15_o
388 => pqh_psu_shd.g_old_rec.attribute15
389 ,p_attribute16_o
390 => pqh_psu_shd.g_old_rec.attribute16
391 ,p_attribute17_o
392 => pqh_psu_shd.g_old_rec.attribute17
393 ,p_attribute18_o
394 => pqh_psu_shd.g_old_rec.attribute18
395 ,p_attribute19_o
396 => pqh_psu_shd.g_old_rec.attribute19
397 ,p_attribute20_o
398 => pqh_psu_shd.g_old_rec.attribute20
399 ,p_attribute21_o
400 => pqh_psu_shd.g_old_rec.attribute21
401 ,p_attribute22_o
402 => pqh_psu_shd.g_old_rec.attribute22
403 ,p_attribute23_o
404 => pqh_psu_shd.g_old_rec.attribute23
405 ,p_attribute24_o
406 => pqh_psu_shd.g_old_rec.attribute24
407 ,p_attribute25_o
408 => pqh_psu_shd.g_old_rec.attribute25
409 ,p_attribute26_o
410 => pqh_psu_shd.g_old_rec.attribute26
411 ,p_attribute27_o
412 => pqh_psu_shd.g_old_rec.attribute27
413 ,p_attribute28_o
414 => pqh_psu_shd.g_old_rec.attribute28
415 ,p_attribute29_o
416 => pqh_psu_shd.g_old_rec.attribute29
417 ,p_attribute30_o
418 => pqh_psu_shd.g_old_rec.attribute30
419 ,p_object_version_number_o
420 => pqh_psu_shd.g_old_rec.object_version_number
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 => 'PQH_FR_EMP_STAT_SITUATIONS'
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 pqh_psu_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.statutory_situation_id = hr_api.g_number) then
491 p_rec.statutory_situation_id :=
492 pqh_psu_shd.g_old_rec.statutory_situation_id;
493 End If;
494 If (p_rec.person_id = hr_api.g_number) then
495 p_rec.person_id :=
496 pqh_psu_shd.g_old_rec.person_id;
497 End If;
498 If (p_rec.provisional_start_date = hr_api.g_date) then
499 p_rec.provisional_start_date :=
500 pqh_psu_shd.g_old_rec.provisional_start_date;
501 End If;
502 If (p_rec.provisional_end_date = hr_api.g_date) then
503 p_rec.provisional_end_date :=
504 pqh_psu_shd.g_old_rec.provisional_end_date;
505 End If;
506 If (p_rec.actual_start_date = hr_api.g_date) then
507 p_rec.actual_start_date :=
508 pqh_psu_shd.g_old_rec.actual_start_date;
509 End If;
510 If (p_rec.actual_end_date = hr_api.g_date) then
511 p_rec.actual_end_date :=
512 pqh_psu_shd.g_old_rec.actual_end_date;
513 End If;
514 If (p_rec.approval_flag = hr_api.g_varchar2) then
515 p_rec.approval_flag :=
516 pqh_psu_shd.g_old_rec.approval_flag;
517 End If;
518 If (p_rec.comments = hr_api.g_varchar2) then
519 p_rec.comments :=
520 pqh_psu_shd.g_old_rec.comments;
521 End If;
522 If (p_rec.contact_person_id = hr_api.g_number) then
523 p_rec.contact_person_id :=
524 pqh_psu_shd.g_old_rec.contact_person_id;
525 End If;
526 If (p_rec.contact_relationship = hr_api.g_varchar2) then
527 p_rec.contact_relationship :=
528 pqh_psu_shd.g_old_rec.contact_relationship;
529 End If;
530 If (p_rec.external_organization_id = hr_api.g_number) then
531 p_rec.external_organization_id :=
532 pqh_psu_shd.g_old_rec.external_organization_id;
533 End If;
534 If (p_rec.renewal_flag = hr_api.g_varchar2) then
535 p_rec.renewal_flag :=
536 pqh_psu_shd.g_old_rec.renewal_flag;
537 End If;
538 If (p_rec.renew_stat_situation_id = hr_api.g_number) then
539 p_rec.renew_stat_situation_id :=
540 pqh_psu_shd.g_old_rec.renew_stat_situation_id;
541 End If;
542 If (p_rec.seconded_career_id = hr_api.g_number) then
543 p_rec.seconded_career_id :=
544 pqh_psu_shd.g_old_rec.seconded_career_id;
545 End If;
546 If (p_rec.attribute_category = hr_api.g_varchar2) then
547 p_rec.attribute_category :=
548 pqh_psu_shd.g_old_rec.attribute_category;
549 End If;
550 If (p_rec.attribute1 = hr_api.g_varchar2) then
551 p_rec.attribute1 :=
552 pqh_psu_shd.g_old_rec.attribute1;
553 End If;
554 If (p_rec.attribute2 = hr_api.g_varchar2) then
555 p_rec.attribute2 :=
556 pqh_psu_shd.g_old_rec.attribute2;
557 End If;
558 If (p_rec.attribute3 = hr_api.g_varchar2) then
559 p_rec.attribute3 :=
560 pqh_psu_shd.g_old_rec.attribute3;
561 End If;
562 If (p_rec.attribute4 = hr_api.g_varchar2) then
563 p_rec.attribute4 :=
564 pqh_psu_shd.g_old_rec.attribute4;
565 End If;
566 If (p_rec.attribute5 = hr_api.g_varchar2) then
567 p_rec.attribute5 :=
568 pqh_psu_shd.g_old_rec.attribute5;
569 End If;
570 If (p_rec.attribute6 = hr_api.g_varchar2) then
571 p_rec.attribute6 :=
572 pqh_psu_shd.g_old_rec.attribute6;
573 End If;
574 If (p_rec.attribute7 = hr_api.g_varchar2) then
575 p_rec.attribute7 :=
576 pqh_psu_shd.g_old_rec.attribute7;
577 End If;
578 If (p_rec.attribute8 = hr_api.g_varchar2) then
579 p_rec.attribute8 :=
580 pqh_psu_shd.g_old_rec.attribute8;
581 End If;
582 If (p_rec.attribute9 = hr_api.g_varchar2) then
583 p_rec.attribute9 :=
584 pqh_psu_shd.g_old_rec.attribute9;
585 End If;
586 If (p_rec.attribute10 = hr_api.g_varchar2) then
587 p_rec.attribute10 :=
588 pqh_psu_shd.g_old_rec.attribute10;
589 End If;
590 If (p_rec.attribute11 = hr_api.g_varchar2) then
591 p_rec.attribute11 :=
592 pqh_psu_shd.g_old_rec.attribute11;
593 End If;
594 If (p_rec.attribute12 = hr_api.g_varchar2) then
595 p_rec.attribute12 :=
596 pqh_psu_shd.g_old_rec.attribute12;
597 End If;
598 If (p_rec.attribute13 = hr_api.g_varchar2) then
599 p_rec.attribute13 :=
600 pqh_psu_shd.g_old_rec.attribute13;
601 End If;
602 If (p_rec.attribute14 = hr_api.g_varchar2) then
603 p_rec.attribute14 :=
604 pqh_psu_shd.g_old_rec.attribute14;
605 End If;
606 If (p_rec.attribute15 = hr_api.g_varchar2) then
607 p_rec.attribute15 :=
608 pqh_psu_shd.g_old_rec.attribute15;
609 End If;
610 If (p_rec.attribute16 = hr_api.g_varchar2) then
611 p_rec.attribute16 :=
612 pqh_psu_shd.g_old_rec.attribute16;
613 End If;
614 If (p_rec.attribute17 = hr_api.g_varchar2) then
615 p_rec.attribute17 :=
616 pqh_psu_shd.g_old_rec.attribute17;
617 End If;
618 If (p_rec.attribute18 = hr_api.g_varchar2) then
619 p_rec.attribute18 :=
620 pqh_psu_shd.g_old_rec.attribute18;
621 End If;
622 If (p_rec.attribute19 = hr_api.g_varchar2) then
623 p_rec.attribute19 :=
624 pqh_psu_shd.g_old_rec.attribute19;
625 End If;
626 If (p_rec.attribute20 = hr_api.g_varchar2) then
627 p_rec.attribute20 :=
628 pqh_psu_shd.g_old_rec.attribute20;
629 End If;
630 If (p_rec.attribute21 = hr_api.g_varchar2) then
631 p_rec.attribute21 :=
632 pqh_psu_shd.g_old_rec.attribute21;
633 End If;
634 If (p_rec.attribute22 = hr_api.g_varchar2) then
635 p_rec.attribute22 :=
636 pqh_psu_shd.g_old_rec.attribute22;
637 End If;
638 If (p_rec.attribute23 = hr_api.g_varchar2) then
639 p_rec.attribute23 :=
640 pqh_psu_shd.g_old_rec.attribute23;
641 End If;
642 If (p_rec.attribute24 = hr_api.g_varchar2) then
643 p_rec.attribute24 :=
644 pqh_psu_shd.g_old_rec.attribute24;
645 End If;
646 If (p_rec.attribute25 = hr_api.g_varchar2) then
647 p_rec.attribute25 :=
648 pqh_psu_shd.g_old_rec.attribute25;
649 End If;
650 If (p_rec.attribute26 = hr_api.g_varchar2) then
651 p_rec.attribute26 :=
652 pqh_psu_shd.g_old_rec.attribute26;
653 End If;
654 If (p_rec.attribute27 = hr_api.g_varchar2) then
655 p_rec.attribute27 :=
656 pqh_psu_shd.g_old_rec.attribute27;
657 End If;
658 If (p_rec.attribute28 = hr_api.g_varchar2) then
659 p_rec.attribute28 :=
660 pqh_psu_shd.g_old_rec.attribute28;
661 End If;
662 If (p_rec.attribute29 = hr_api.g_varchar2) then
663 p_rec.attribute29 :=
664 pqh_psu_shd.g_old_rec.attribute29;
665 End If;
666 If (p_rec.attribute30 = hr_api.g_varchar2) then
667 p_rec.attribute30 :=
668 pqh_psu_shd.g_old_rec.attribute30;
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 pqh_psu_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 pqh_psu_shd.lck
689 (p_rec.emp_stat_situation_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 pqh_psu_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 pqh_psu_upd.pre_update(p_rec);
711 --
712 -- Update the row.
713 --
714 pqh_psu_upd.update_dml(p_rec);
715 --
716 -- Call the supporting post-update operation
717 --
718 pqh_psu_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_emp_stat_situation_id in number
733 ,p_object_version_number in out nocopy number
734 ,p_statutory_situation_id in number default hr_api.g_number
735 ,p_person_id in number default hr_api.g_number
736 ,p_provisional_start_date in date default hr_api.g_date
737 ,p_provisional_end_date in date default hr_api.g_date
738 ,p_actual_start_date in date default hr_api.g_date
739 ,p_actual_end_date in date default hr_api.g_date
740 ,p_approval_flag in varchar2 default hr_api.g_varchar2
741 ,p_comments in varchar2 default hr_api.g_varchar2
742 ,p_contact_person_id in number default hr_api.g_number
743 ,p_contact_relationship in varchar2 default hr_api.g_varchar2
744 ,p_external_organization_id in number default hr_api.g_number
745 ,p_renewal_flag in varchar2 default hr_api.g_varchar2
746 ,p_renew_stat_situation_id in number default hr_api.g_number
747 ,p_seconded_career_id in number default hr_api.g_number
748 ,p_attribute_category in varchar2 default hr_api.g_varchar2
749 ,p_attribute1 in varchar2 default hr_api.g_varchar2
750 ,p_attribute2 in varchar2 default hr_api.g_varchar2
751 ,p_attribute3 in varchar2 default hr_api.g_varchar2
752 ,p_attribute4 in varchar2 default hr_api.g_varchar2
753 ,p_attribute5 in varchar2 default hr_api.g_varchar2
754 ,p_attribute6 in varchar2 default hr_api.g_varchar2
755 ,p_attribute7 in varchar2 default hr_api.g_varchar2
756 ,p_attribute8 in varchar2 default hr_api.g_varchar2
757 ,p_attribute9 in varchar2 default hr_api.g_varchar2
758 ,p_attribute10 in varchar2 default hr_api.g_varchar2
759 ,p_attribute11 in varchar2 default hr_api.g_varchar2
760 ,p_attribute12 in varchar2 default hr_api.g_varchar2
761 ,p_attribute13 in varchar2 default hr_api.g_varchar2
762 ,p_attribute14 in varchar2 default hr_api.g_varchar2
763 ,p_attribute15 in varchar2 default hr_api.g_varchar2
764 ,p_attribute16 in varchar2 default hr_api.g_varchar2
765 ,p_attribute17 in varchar2 default hr_api.g_varchar2
766 ,p_attribute18 in varchar2 default hr_api.g_varchar2
767 ,p_attribute19 in varchar2 default hr_api.g_varchar2
768 ,p_attribute20 in varchar2 default hr_api.g_varchar2
769 ,p_attribute21 in varchar2 default hr_api.g_varchar2
770 ,p_attribute22 in varchar2 default hr_api.g_varchar2
771 ,p_attribute23 in varchar2 default hr_api.g_varchar2
772 ,p_attribute24 in varchar2 default hr_api.g_varchar2
773 ,p_attribute25 in varchar2 default hr_api.g_varchar2
774 ,p_attribute26 in varchar2 default hr_api.g_varchar2
775 ,p_attribute27 in varchar2 default hr_api.g_varchar2
776 ,p_attribute28 in varchar2 default hr_api.g_varchar2
777 ,p_attribute29 in varchar2 default hr_api.g_varchar2
778 ,p_attribute30 in varchar2 default hr_api.g_varchar2
779 ) is
780 --
781 l_rec pqh_psu_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 pqh_psu_shd.convert_args
792 (p_emp_stat_situation_id
793 ,p_statutory_situation_id
794 ,p_person_id
795 ,p_provisional_start_date
796 ,p_provisional_end_date
797 ,p_actual_start_date
798 ,p_actual_end_date
799 ,p_approval_flag
800 ,p_comments
801 ,p_contact_person_id
802 ,p_contact_relationship
803 ,p_external_organization_id
804 ,p_renewal_flag
805 ,p_renew_stat_situation_id
806 ,p_seconded_career_id
807 ,p_attribute_category
808 ,p_attribute1
809 ,p_attribute2
810 ,p_attribute3
811 ,p_attribute4
812 ,p_attribute5
813 ,p_attribute6
814 ,p_attribute7
815 ,p_attribute8
816 ,p_attribute9
817 ,p_attribute10
818 ,p_attribute11
819 ,p_attribute12
820 ,p_attribute13
821 ,p_attribute14
822 ,p_attribute15
823 ,p_attribute16
824 ,p_attribute17
825 ,p_attribute18
826 ,p_attribute19
827 ,p_attribute20
828 ,p_attribute21
829 ,p_attribute22
830 ,p_attribute23
831 ,p_attribute24
832 ,p_attribute25
833 ,p_attribute26
834 ,p_attribute27
835 ,p_attribute28
836 ,p_attribute29
837 ,p_attribute30
838 ,p_object_version_number
839 );
840 --
841 -- Having converted the arguments into the
842 -- plsql record structure we call the corresponding record
843 -- business process.
844 --
845 pqh_psu_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 pqh_psu_upd;