[Home] [Help]
PACKAGE BODY: APPS.PER_PAT_UPD
Source
1 Package Body per_pat_upd as
2 /* $Header: pepatrhi.pkb 120.2 2005/10/27 07:56 lsilveir noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' per_pat_upd.'; -- Global package name
9 g_debug boolean := hr_utility.debug_enabled;
10 --
11 -- ----------------------------------------------------------------------------
12 -- |------------------------------< update_dml >------------------------------|
13 -- ----------------------------------------------------------------------------
14 -- {Start Of Comments}
15 --
16 -- Description:
17 -- This procedure controls the actual dml update logic. The processing of
18 -- this procedure is:
19 -- 1) Increment the object_version_number by 1 if the object_version_number
20 -- is defined as an attribute for this entity.
21 -- 2) To set and unset the g_api_dml status as required (as we are about to
22 -- perform dml).
23 -- 3) To update the specified row in the schema using the primary key in
24 -- the predicates.
25 -- 4) To trap any constraint violations that may have occurred.
26 -- 5) To raise any other errors.
27 --
28 -- Prerequisites:
29 -- This is an internal private procedure which must be called from the upd
30 -- procedure.
31 --
32 -- In Parameters:
33 -- A Pl/Sql record structre.
34 --
35 -- Post Success:
36 -- The specified row will be updated in the schema.
37 --
38 -- Post Failure:
39 -- On the update dml failure it is important to note that we always reset the
40 -- g_api_dml status to false.
41 -- If a check, unique or parent integrity constraint violation is raised the
42 -- constraint_error procedure will be called.
43 -- If any other error is reported, the error will be raised after the
44 -- g_api_dml status is reset.
45 --
46 -- Developer Implementation Notes:
47 -- The update 'set' attribute list should be modified if any of your
48 -- attributes are not updateable.
49 --
50 -- Access Status:
51 -- Internal Row Handler Use Only.
52 --
53 -- {End Of Comments}
54 -- ----------------------------------------------------------------------------
55 Procedure update_dml
56 (p_rec in out nocopy per_pat_shd.g_rec_type
57 ) is
58 --
59 l_proc varchar2(72) := g_package||'update_dml';
60 --
61 Begin
62 hr_utility.set_location('Entering:'||l_proc, 5);
63 --
64 -- Increment the object version
65 p_rec.object_version_number := p_rec.object_version_number + 1;
66 --
67 --
68 --
69 -- Update the per_allocated_tasks Row
70 --
71 update per_allocated_tasks
72 set
73 allocated_task_id = p_rec.allocated_task_id
74 ,allocated_checklist_id = p_rec.allocated_checklist_id
75 ,task_name = p_rec.task_name
76 ,description = p_rec.description
77 ,performer_orig_system = p_rec.performer_orig_system
78 ,performer_orig_sys_id = p_rec.performer_orig_sys_id
79 ,task_owner_person_id = p_rec.task_owner_person_id
80 ,task_sequence = p_rec.task_sequence
81 ,target_start_date = p_rec.target_start_date
82 ,target_end_date = p_rec.target_end_date
83 ,actual_start_date = p_rec.actual_start_date
84 ,actual_end_date = p_rec.actual_end_date
85 ,action_url = p_rec.action_url
86 ,mandatory_flag = p_rec.mandatory_flag
87 ,status = p_rec.status
88 ,object_version_number = p_rec.object_version_number
89 ,attribute_category = p_rec.attribute_category
90 ,attribute1 = p_rec.attribute1
91 ,attribute2 = p_rec.attribute2
92 ,attribute3 = p_rec.attribute3
93 ,attribute4 = p_rec.attribute4
94 ,attribute5 = p_rec.attribute5
95 ,attribute6 = p_rec.attribute6
96 ,attribute7 = p_rec.attribute7
97 ,attribute8 = p_rec.attribute8
98 ,attribute9 = p_rec.attribute9
99 ,attribute10 = p_rec.attribute10
100 ,attribute11 = p_rec.attribute11
101 ,attribute12 = p_rec.attribute12
102 ,attribute13 = p_rec.attribute13
103 ,attribute14 = p_rec.attribute14
104 ,attribute15 = p_rec.attribute15
105 ,attribute16 = p_rec.attribute16
106 ,attribute17 = p_rec.attribute17
107 ,attribute18 = p_rec.attribute18
108 ,attribute19 = p_rec.attribute19
109 ,attribute20 = p_rec.attribute20
110 ,information_category = p_rec.information_category
111 ,information1 = p_rec.information1
112 ,information2 = p_rec.information2
113 ,information3 = p_rec.information3
114 ,information4 = p_rec.information4
115 ,information5 = p_rec.information5
116 ,information6 = p_rec.information6
117 ,information7 = p_rec.information7
118 ,information8 = p_rec.information8
119 ,information9 = p_rec.information9
120 ,information10 = p_rec.information10
121 ,information11 = p_rec.information11
122 ,information12 = p_rec.information12
123 ,information13 = p_rec.information13
124 ,information14 = p_rec.information14
125 ,information15 = p_rec.information15
126 ,information16 = p_rec.information16
127 ,information17 = p_rec.information17
128 ,information18 = p_rec.information18
129 ,information19 = p_rec.information19
130 ,information20 = p_rec.information20
131 where allocated_task_id = p_rec.allocated_task_id;
132 --
133 --
134 --
135 hr_utility.set_location(' Leaving:'||l_proc, 10);
136 --
137 Exception
138 When hr_api.check_integrity_violated Then
139 -- A check constraint has been violated
140 --
141 per_pat_shd.constraint_error
142 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
143 When hr_api.parent_integrity_violated Then
144 -- Parent integrity has been violated
145 --
146 per_pat_shd.constraint_error
147 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
148 When hr_api.unique_integrity_violated Then
149 -- Unique integrity has been violated
150 --
151 per_pat_shd.constraint_error
152 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
153 When Others Then
154 --
155 Raise;
156 End update_dml;
157 --
158 -- ----------------------------------------------------------------------------
159 -- |------------------------------< pre_update >------------------------------|
160 -- ----------------------------------------------------------------------------
161 -- {Start Of Comments}
162 --
163 -- Description:
164 -- This private procedure contains any processing which is required before
165 -- the update dml.
166 --
167 -- Prerequisites:
168 -- This is an internal procedure which is called from the upd procedure.
169 --
170 -- In Parameters:
171 -- A Pl/Sql record structure.
172 --
173 -- Post Success:
174 -- Processing continues.
175 --
176 -- Post Failure:
177 -- If an error has occurred, an error message and exception wil be raised
178 -- but not handled.
179 --
180 -- Developer Implementation Notes:
181 -- Any pre-processing required before the update dml is issued should be
182 -- coded within this procedure. It is important to note that any 3rd party
183 -- maintenance should be reviewed before placing in this procedure.
184 --
185 -- Access Status:
186 -- Internal Row Handler Use Only.
187 --
188 -- {End Of Comments}
189 -- ----------------------------------------------------------------------------
190 Procedure pre_update
191 (p_rec in per_pat_shd.g_rec_type
192 ) is
193 --
194 l_proc varchar2(72) := g_package||'pre_update';
195 --
196 Begin
197 hr_utility.set_location('Entering:'||l_proc, 5);
198 --
199 hr_utility.set_location(' Leaving:'||l_proc, 10);
200 End pre_update;
201 --
202 -- ----------------------------------------------------------------------------
203 -- |-----------------------------< post_update >------------------------------|
204 -- ----------------------------------------------------------------------------
205 -- {Start Of Comments}
206 --
207 -- Description:
208 -- This private procedure contains any processing which is required after
209 -- the update dml.
210 --
211 -- Prerequisites:
212 -- This is an internal procedure which is called from the upd procedure.
213 --
214 -- In Parameters:
215 -- A Pl/Sql record structure.
216 --
217 -- Post Success:
218 -- Processing continues.
219 --
220 -- Post Failure:
221 -- If an error has occurred, an error message and exception will be raised
222 -- but not handled.
223 --
224 -- Developer Implementation Notes:
225 -- Any post-processing required after the update dml is issued should be
226 -- coded within this procedure. It is important to note that any 3rd party
227 -- maintenance should be reviewed before placing in this procedure.
228 --
229 -- Access Status:
230 -- Internal Row Handler Use Only.
231 --
232 -- {End Of Comments}
233 -- ----------------------------------------------------------------------------
234 Procedure post_update
235 (p_effective_date in date
236 ,p_rec in per_pat_shd.g_rec_type
237 ) is
238 --
239 l_proc varchar2(72) := g_package||'post_update';
240 --
241 Begin
242 hr_utility.set_location('Entering:'||l_proc, 5);
243 begin
244 --
245 per_pat_rku.after_update
246 (p_effective_date => p_effective_date
247 ,p_allocated_task_id
248 => p_rec.allocated_task_id
249 ,p_allocated_checklist_id
250 => p_rec.allocated_checklist_id
251 ,p_task_name
252 => p_rec.task_name
253 ,p_description
254 => p_rec.description
255 ,p_performer_orig_system
256 => p_rec.performer_orig_system
257 ,p_performer_orig_sys_id
258 => p_rec.performer_orig_sys_id
259 ,p_task_owner_person_id
260 => p_rec.task_owner_person_id
261 ,p_task_sequence
262 => p_rec.task_sequence
263 ,p_target_start_date
264 => p_rec.target_start_date
265 ,p_target_end_date
266 => p_rec.target_end_date
267 ,p_actual_start_date
268 => p_rec.actual_start_date
269 ,p_actual_end_date
270 => p_rec.actual_end_date
271 ,p_action_url
272 => p_rec.action_url
273 ,p_mandatory_flag
274 => p_rec.mandatory_flag
275 ,p_status
276 => p_rec.status
277 ,p_object_version_number
278 => p_rec.object_version_number
279 ,p_attribute_category
280 => p_rec.attribute_category
281 ,p_attribute1
282 => p_rec.attribute1
283 ,p_attribute2
284 => p_rec.attribute2
285 ,p_attribute3
286 => p_rec.attribute3
287 ,p_attribute4
288 => p_rec.attribute4
289 ,p_attribute5
290 => p_rec.attribute5
291 ,p_attribute6
292 => p_rec.attribute6
293 ,p_attribute7
294 => p_rec.attribute7
295 ,p_attribute8
296 => p_rec.attribute8
297 ,p_attribute9
298 => p_rec.attribute9
299 ,p_attribute10
300 => p_rec.attribute10
301 ,p_attribute11
302 => p_rec.attribute11
303 ,p_attribute12
304 => p_rec.attribute12
305 ,p_attribute13
306 => p_rec.attribute13
307 ,p_attribute14
308 => p_rec.attribute14
309 ,p_attribute15
310 => p_rec.attribute15
311 ,p_attribute16
312 => p_rec.attribute16
313 ,p_attribute17
314 => p_rec.attribute17
315 ,p_attribute18
316 => p_rec.attribute18
317 ,p_attribute19
318 => p_rec.attribute19
319 ,p_attribute20
320 => p_rec.attribute20
321 ,p_information_category
322 => p_rec.information_category
323 ,p_information1
324 => p_rec.information1
325 ,p_information2
326 => p_rec.information2
327 ,p_information3
328 => p_rec.information3
329 ,p_information4
330 => p_rec.information4
331 ,p_information5
332 => p_rec.information5
333 ,p_information6
334 => p_rec.information6
335 ,p_information7
336 => p_rec.information7
337 ,p_information8
338 => p_rec.information8
339 ,p_information9
340 => p_rec.information9
341 ,p_information10
342 => p_rec.information10
343 ,p_information11
344 => p_rec.information11
345 ,p_information12
346 => p_rec.information12
347 ,p_information13
348 => p_rec.information13
349 ,p_information14
350 => p_rec.information14
351 ,p_information15
352 => p_rec.information15
353 ,p_information16
354 => p_rec.information16
355 ,p_information17
356 => p_rec.information17
357 ,p_information18
358 => p_rec.information18
359 ,p_information19
360 => p_rec.information19
361 ,p_information20
362 => p_rec.information20
363 ,p_allocated_checklist_id_o
364 => per_pat_shd.g_old_rec.allocated_checklist_id
365 ,p_task_name_o
366 => per_pat_shd.g_old_rec.task_name
367 ,p_description_o
368 => per_pat_shd.g_old_rec.description
369 ,p_performer_orig_system_o
370 => per_pat_shd.g_old_rec.performer_orig_system
371 ,p_performer_orig_sys_id_o
372 => per_pat_shd.g_old_rec.performer_orig_sys_id
373 ,p_task_owner_person_id_o
374 => per_pat_shd.g_old_rec.task_owner_person_id
375 ,p_task_sequence_o
376 => per_pat_shd.g_old_rec.task_sequence
377 ,p_target_start_date_o
378 => per_pat_shd.g_old_rec.target_start_date
379 ,p_target_end_date_o
380 => per_pat_shd.g_old_rec.target_end_date
381 ,p_actual_start_date_o
382 => per_pat_shd.g_old_rec.actual_start_date
383 ,p_actual_end_date_o
384 => per_pat_shd.g_old_rec.actual_end_date
385 ,p_action_url_o
386 => per_pat_shd.g_old_rec.action_url
387 ,p_mandatory_flag_o
388 => per_pat_shd.g_old_rec.mandatory_flag
389 ,p_status_o
390 => per_pat_shd.g_old_rec.status
391 ,p_object_version_number_o
392 => per_pat_shd.g_old_rec.object_version_number
393 ,p_attribute_category_o
394 => per_pat_shd.g_old_rec.attribute_category
395 ,p_attribute1_o
396 => per_pat_shd.g_old_rec.attribute1
397 ,p_attribute2_o
398 => per_pat_shd.g_old_rec.attribute2
399 ,p_attribute3_o
400 => per_pat_shd.g_old_rec.attribute3
401 ,p_attribute4_o
402 => per_pat_shd.g_old_rec.attribute4
403 ,p_attribute5_o
404 => per_pat_shd.g_old_rec.attribute5
405 ,p_attribute6_o
406 => per_pat_shd.g_old_rec.attribute6
407 ,p_attribute7_o
408 => per_pat_shd.g_old_rec.attribute7
409 ,p_attribute8_o
410 => per_pat_shd.g_old_rec.attribute8
411 ,p_attribute9_o
412 => per_pat_shd.g_old_rec.attribute9
413 ,p_attribute10_o
414 => per_pat_shd.g_old_rec.attribute10
415 ,p_attribute11_o
416 => per_pat_shd.g_old_rec.attribute11
417 ,p_attribute12_o
418 => per_pat_shd.g_old_rec.attribute12
419 ,p_attribute13_o
420 => per_pat_shd.g_old_rec.attribute13
421 ,p_attribute14_o
422 => per_pat_shd.g_old_rec.attribute14
423 ,p_attribute15_o
424 => per_pat_shd.g_old_rec.attribute15
425 ,p_attribute16_o
426 => per_pat_shd.g_old_rec.attribute16
427 ,p_attribute17_o
428 => per_pat_shd.g_old_rec.attribute17
429 ,p_attribute18_o
430 => per_pat_shd.g_old_rec.attribute18
431 ,p_attribute19_o
432 => per_pat_shd.g_old_rec.attribute19
433 ,p_attribute20_o
434 => per_pat_shd.g_old_rec.attribute20
435 ,p_information_category_o
436 => per_pat_shd.g_old_rec.information_category
437 ,p_information1_o
438 => per_pat_shd.g_old_rec.information1
439 ,p_information2_o
440 => per_pat_shd.g_old_rec.information2
441 ,p_information3_o
442 => per_pat_shd.g_old_rec.information3
443 ,p_information4_o
444 => per_pat_shd.g_old_rec.information4
445 ,p_information5_o
446 => per_pat_shd.g_old_rec.information5
447 ,p_information6_o
448 => per_pat_shd.g_old_rec.information6
449 ,p_information7_o
450 => per_pat_shd.g_old_rec.information7
451 ,p_information8_o
452 => per_pat_shd.g_old_rec.information8
453 ,p_information9_o
454 => per_pat_shd.g_old_rec.information9
455 ,p_information10_o
456 => per_pat_shd.g_old_rec.information10
457 ,p_information11_o
458 => per_pat_shd.g_old_rec.information11
459 ,p_information12_o
460 => per_pat_shd.g_old_rec.information12
461 ,p_information13_o
462 => per_pat_shd.g_old_rec.information13
463 ,p_information14_o
464 => per_pat_shd.g_old_rec.information14
465 ,p_information15_o
466 => per_pat_shd.g_old_rec.information15
467 ,p_information16_o
468 => per_pat_shd.g_old_rec.information16
469 ,p_information17_o
470 => per_pat_shd.g_old_rec.information17
471 ,p_information18_o
472 => per_pat_shd.g_old_rec.information18
473 ,p_information19_o
474 => per_pat_shd.g_old_rec.information19
475 ,p_information20_o
476 => per_pat_shd.g_old_rec.information20
477 );
478 --
479 exception
480 --
481 when hr_api.cannot_find_prog_unit then
482 --
483 hr_api.cannot_find_prog_unit_error
484 (p_module_name => 'PER_ALLOCATED_TASKS'
485 ,p_hook_type => 'AU');
486 --
487 end;
488 --
489 hr_utility.set_location(' Leaving:'||l_proc, 10);
490 End post_update;
491 --
492 -- ----------------------------------------------------------------------------
493 -- |-----------------------------< convert_defs >-----------------------------|
494 -- ----------------------------------------------------------------------------
495 -- {Start Of Comments}
496 --
497 -- Description:
498 -- The Convert_Defs procedure has one very important function:
499 -- It must return the record structure for the row with all system defaulted
500 -- values converted into its corresponding parameter value for update. When
501 -- we attempt to update a row through the Upd process , certain
502 -- parameters can be defaulted which enables flexibility in the calling of
503 -- the upd process (e.g. only attributes which need to be updated need to be
504 -- specified). For the upd process to determine which attributes
505 -- have NOT been specified we need to check if the parameter has a reserved
506 -- system default value. Therefore, for all parameters which have a
507 -- corresponding reserved system default mechanism specified we need to
508 -- check if a system default is being used. If a system default is being
509 -- used then we convert the defaulted value into its corresponding attribute
510 -- value held in the g_old_rec data structure.
511 --
512 -- Prerequisites:
513 -- This private function can only be called from the upd process.
514 --
515 -- In Parameters:
516 -- A Pl/Sql record structure.
517 --
518 -- Post Success:
519 -- The record structure will be returned with all system defaulted parameter
520 -- values converted into its current row attribute value.
521 --
522 -- Post Failure:
523 -- No direct error handling is required within this function. Any possible
524 -- errors within this procedure will be a PL/SQL value error due to
525 -- conversion of datatypes or data lengths.
526 --
527 -- Developer Implementation Notes:
528 -- None.
529 --
530 -- Access Status:
531 -- Internal Row Handler Use Only.
532 --
533 -- {End Of Comments}
534 -- ----------------------------------------------------------------------------
535 Procedure convert_defs
536 (p_rec in out nocopy per_pat_shd.g_rec_type
537 ) is
538 --
539 Begin
540 --
541 -- We must now examine each argument value in the
542 -- p_rec plsql record structure
543 -- to see if a system default is being used. If a system default
544 -- is being used then we must set to the 'current' argument value.
545 --
546 If (p_rec.allocated_checklist_id = hr_api.g_number) then
547 p_rec.allocated_checklist_id :=
548 per_pat_shd.g_old_rec.allocated_checklist_id;
549 End If;
550 If (p_rec.task_name = hr_api.g_varchar2) then
551 p_rec.task_name :=
552 per_pat_shd.g_old_rec.task_name;
553 End If;
554 If (p_rec.description = hr_api.g_varchar2) then
555 p_rec.description :=
556 per_pat_shd.g_old_rec.description;
557 End If;
558 If (p_rec.performer_orig_system = hr_api.g_varchar2) then
559 p_rec.performer_orig_system :=
560 per_pat_shd.g_old_rec.performer_orig_system;
561 End If;
562 If (p_rec.performer_orig_sys_id = hr_api.g_number) then
563 p_rec.performer_orig_sys_id :=
564 per_pat_shd.g_old_rec.performer_orig_sys_id;
565 End If;
566 If (p_rec.task_owner_person_id = hr_api.g_number) then
567 p_rec.task_owner_person_id :=
568 per_pat_shd.g_old_rec.task_owner_person_id;
569 End If;
570 If (p_rec.task_sequence = hr_api.g_number) then
571 p_rec.task_sequence :=
572 per_pat_shd.g_old_rec.task_sequence;
573 End If;
574 If (p_rec.target_start_date = hr_api.g_date) then
575 p_rec.target_start_date :=
576 per_pat_shd.g_old_rec.target_start_date;
577 End If;
578 If (p_rec.target_end_date = hr_api.g_date) then
579 p_rec.target_end_date :=
580 per_pat_shd.g_old_rec.target_end_date;
581 End If;
582 If (p_rec.actual_start_date = hr_api.g_date) then
583 p_rec.actual_start_date :=
584 per_pat_shd.g_old_rec.actual_start_date;
585 End If;
586 If (p_rec.actual_end_date = hr_api.g_date) then
587 p_rec.actual_end_date :=
588 per_pat_shd.g_old_rec.actual_end_date;
589 End If;
590 If (p_rec.action_url = hr_api.g_varchar2) then
591 p_rec.action_url :=
592 per_pat_shd.g_old_rec.action_url;
593 End If;
594 If (p_rec.mandatory_flag = hr_api.g_varchar2) then
595 p_rec.mandatory_flag :=
596 per_pat_shd.g_old_rec.mandatory_flag;
597 End If;
598 If (p_rec.status = hr_api.g_varchar2) then
599 p_rec.status :=
600 per_pat_shd.g_old_rec.status;
601 End If;
602 If (p_rec.attribute_category = hr_api.g_varchar2) then
603 p_rec.attribute_category :=
604 per_pat_shd.g_old_rec.attribute_category;
605 End If;
606 If (p_rec.attribute1 = hr_api.g_varchar2) then
607 p_rec.attribute1 :=
608 per_pat_shd.g_old_rec.attribute1;
609 End If;
610 If (p_rec.attribute2 = hr_api.g_varchar2) then
611 p_rec.attribute2 :=
612 per_pat_shd.g_old_rec.attribute2;
613 End If;
614 If (p_rec.attribute3 = hr_api.g_varchar2) then
615 p_rec.attribute3 :=
616 per_pat_shd.g_old_rec.attribute3;
617 End If;
618 If (p_rec.attribute4 = hr_api.g_varchar2) then
619 p_rec.attribute4 :=
620 per_pat_shd.g_old_rec.attribute4;
621 End If;
622 If (p_rec.attribute5 = hr_api.g_varchar2) then
623 p_rec.attribute5 :=
624 per_pat_shd.g_old_rec.attribute5;
625 End If;
626 If (p_rec.attribute6 = hr_api.g_varchar2) then
627 p_rec.attribute6 :=
628 per_pat_shd.g_old_rec.attribute6;
629 End If;
630 If (p_rec.attribute7 = hr_api.g_varchar2) then
631 p_rec.attribute7 :=
632 per_pat_shd.g_old_rec.attribute7;
633 End If;
634 If (p_rec.attribute8 = hr_api.g_varchar2) then
635 p_rec.attribute8 :=
636 per_pat_shd.g_old_rec.attribute8;
637 End If;
638 If (p_rec.attribute9 = hr_api.g_varchar2) then
639 p_rec.attribute9 :=
640 per_pat_shd.g_old_rec.attribute9;
641 End If;
642 If (p_rec.attribute10 = hr_api.g_varchar2) then
643 p_rec.attribute10 :=
644 per_pat_shd.g_old_rec.attribute10;
645 End If;
646 If (p_rec.attribute11 = hr_api.g_varchar2) then
647 p_rec.attribute11 :=
648 per_pat_shd.g_old_rec.attribute11;
649 End If;
650 If (p_rec.attribute12 = hr_api.g_varchar2) then
651 p_rec.attribute12 :=
652 per_pat_shd.g_old_rec.attribute12;
653 End If;
654 If (p_rec.attribute13 = hr_api.g_varchar2) then
655 p_rec.attribute13 :=
656 per_pat_shd.g_old_rec.attribute13;
657 End If;
658 If (p_rec.attribute14 = hr_api.g_varchar2) then
659 p_rec.attribute14 :=
660 per_pat_shd.g_old_rec.attribute14;
661 End If;
662 If (p_rec.attribute15 = hr_api.g_varchar2) then
663 p_rec.attribute15 :=
664 per_pat_shd.g_old_rec.attribute15;
665 End If;
666 If (p_rec.attribute16 = hr_api.g_varchar2) then
667 p_rec.attribute16 :=
668 per_pat_shd.g_old_rec.attribute16;
669 End If;
670 If (p_rec.attribute17 = hr_api.g_varchar2) then
671 p_rec.attribute17 :=
672 per_pat_shd.g_old_rec.attribute17;
673 End If;
674 If (p_rec.attribute18 = hr_api.g_varchar2) then
675 p_rec.attribute18 :=
676 per_pat_shd.g_old_rec.attribute18;
677 End If;
678 If (p_rec.attribute19 = hr_api.g_varchar2) then
679 p_rec.attribute19 :=
680 per_pat_shd.g_old_rec.attribute19;
681 End If;
682 If (p_rec.attribute20 = hr_api.g_varchar2) then
683 p_rec.attribute20 :=
684 per_pat_shd.g_old_rec.attribute20;
685 End If;
686 If (p_rec.information_category = hr_api.g_varchar2) then
687 p_rec.information_category :=
688 per_pat_shd.g_old_rec.information_category;
689 End If;
690 If (p_rec.information1 = hr_api.g_varchar2) then
691 p_rec.information1 :=
692 per_pat_shd.g_old_rec.information1;
693 End If;
694 If (p_rec.information2 = hr_api.g_varchar2) then
695 p_rec.information2 :=
696 per_pat_shd.g_old_rec.information2;
697 End If;
698 If (p_rec.information3 = hr_api.g_varchar2) then
699 p_rec.information3 :=
700 per_pat_shd.g_old_rec.information3;
701 End If;
702 If (p_rec.information4 = hr_api.g_varchar2) then
703 p_rec.information4 :=
704 per_pat_shd.g_old_rec.information4;
705 End If;
706 If (p_rec.information5 = hr_api.g_varchar2) then
707 p_rec.information5 :=
708 per_pat_shd.g_old_rec.information5;
709 End If;
710 If (p_rec.information6 = hr_api.g_varchar2) then
711 p_rec.information6 :=
712 per_pat_shd.g_old_rec.information6;
713 End If;
714 If (p_rec.information7 = hr_api.g_varchar2) then
715 p_rec.information7 :=
716 per_pat_shd.g_old_rec.information7;
717 End If;
718 If (p_rec.information8 = hr_api.g_varchar2) then
719 p_rec.information8 :=
720 per_pat_shd.g_old_rec.information8;
721 End If;
722 If (p_rec.information9 = hr_api.g_varchar2) then
723 p_rec.information9 :=
724 per_pat_shd.g_old_rec.information9;
725 End If;
726 If (p_rec.information10 = hr_api.g_varchar2) then
727 p_rec.information10 :=
728 per_pat_shd.g_old_rec.information10;
729 End If;
730 If (p_rec.information11 = hr_api.g_varchar2) then
731 p_rec.information11 :=
732 per_pat_shd.g_old_rec.information11;
733 End If;
734 If (p_rec.information12 = hr_api.g_varchar2) then
735 p_rec.information12 :=
736 per_pat_shd.g_old_rec.information12;
737 End If;
738 If (p_rec.information13 = hr_api.g_varchar2) then
739 p_rec.information13 :=
740 per_pat_shd.g_old_rec.information13;
741 End If;
742 If (p_rec.information14 = hr_api.g_varchar2) then
743 p_rec.information14 :=
744 per_pat_shd.g_old_rec.information14;
745 End If;
746 If (p_rec.information15 = hr_api.g_varchar2) then
747 p_rec.information15 :=
748 per_pat_shd.g_old_rec.information15;
749 End If;
750 If (p_rec.information16 = hr_api.g_varchar2) then
751 p_rec.information16 :=
752 per_pat_shd.g_old_rec.information16;
753 End If;
754 If (p_rec.information17 = hr_api.g_varchar2) then
755 p_rec.information17 :=
756 per_pat_shd.g_old_rec.information17;
757 End If;
758 If (p_rec.information18 = hr_api.g_varchar2) then
759 p_rec.information18 :=
760 per_pat_shd.g_old_rec.information18;
761 End If;
762 If (p_rec.information19 = hr_api.g_varchar2) then
763 p_rec.information19 :=
764 per_pat_shd.g_old_rec.information19;
765 End If;
766 If (p_rec.information20 = hr_api.g_varchar2) then
767 p_rec.information20 :=
768 per_pat_shd.g_old_rec.information20;
769 End If;
770 --
771 End convert_defs;
772 --
773 -- ----------------------------------------------------------------------------
774 -- |---------------------------------< upd >----------------------------------|
775 -- ----------------------------------------------------------------------------
776 Procedure upd
777 (p_effective_date in date
778 ,p_rec in out nocopy per_pat_shd.g_rec_type
779 ) is
780 --
781 l_proc varchar2(72) := g_package||'upd';
782 --
783 Begin
784 hr_utility.set_location('Entering:'||l_proc, 5);
785 --
786 -- We must lock the row which we need to update.
787 --
788 per_pat_shd.lck
789 (p_rec.allocated_task_id
790 ,p_rec.object_version_number
791 );
792 --
793 -- 1. During an update system defaults are used to determine if
794 -- arguments have been defaulted or not. We must therefore
795 -- derive the full record structure values to be updated.
796 --
797 -- 2. Call the supporting update validate operations.
798 --
799 convert_defs(p_rec);
800 per_pat_bus.update_validate
801 (p_effective_date
802 ,p_rec
803 );
804 --
805 -- Call to raise any errors on multi-message list
806 hr_multi_message.end_validation_set;
807 --
808 -- Call the supporting pre-update operation
809 --
810 per_pat_upd.pre_update(p_rec);
811 --
812 -- Update the row.
813 --
814 per_pat_upd.update_dml(p_rec);
815 --
816 -- Call the supporting post-update operation
817 --
818 per_pat_upd.post_update
819 (p_effective_date
820 ,p_rec
821 );
822 --
823 -- Call to raise any errors on multi-message list
824 hr_multi_message.end_validation_set;
825 End upd;
826 --
827 -- ----------------------------------------------------------------------------
828 -- |---------------------------------< upd >----------------------------------|
829 -- ----------------------------------------------------------------------------
830 Procedure upd
831 (p_effective_date in date
832 ,p_allocated_task_id in number
833 ,p_object_version_number in out nocopy number
834 ,p_allocated_checklist_id in number default hr_api.g_number
835 ,p_task_name in varchar2 default hr_api.g_varchar2
836 ,p_description in varchar2 default hr_api.g_varchar2
837 ,p_performer_orig_system in varchar2 default hr_api.g_varchar2
838 ,p_performer_orig_sys_id in number default hr_api.g_number
839 ,p_task_owner_person_id in number default hr_api.g_number
840 ,p_task_sequence in number default hr_api.g_number
841 ,p_target_start_date in date default hr_api.g_date
842 ,p_target_end_date in date default hr_api.g_date
843 ,p_actual_start_date in date default hr_api.g_date
844 ,p_actual_end_date in date default hr_api.g_date
845 ,p_action_url in varchar2 default hr_api.g_varchar2
846 ,p_mandatory_flag in varchar2 default hr_api.g_varchar2
847 ,p_status in varchar2 default hr_api.g_varchar2
848 ,p_attribute_category in varchar2 default hr_api.g_varchar2
849 ,p_attribute1 in varchar2 default hr_api.g_varchar2
850 ,p_attribute2 in varchar2 default hr_api.g_varchar2
851 ,p_attribute3 in varchar2 default hr_api.g_varchar2
852 ,p_attribute4 in varchar2 default hr_api.g_varchar2
853 ,p_attribute5 in varchar2 default hr_api.g_varchar2
854 ,p_attribute6 in varchar2 default hr_api.g_varchar2
855 ,p_attribute7 in varchar2 default hr_api.g_varchar2
856 ,p_attribute8 in varchar2 default hr_api.g_varchar2
857 ,p_attribute9 in varchar2 default hr_api.g_varchar2
858 ,p_attribute10 in varchar2 default hr_api.g_varchar2
859 ,p_attribute11 in varchar2 default hr_api.g_varchar2
860 ,p_attribute12 in varchar2 default hr_api.g_varchar2
861 ,p_attribute13 in varchar2 default hr_api.g_varchar2
862 ,p_attribute14 in varchar2 default hr_api.g_varchar2
863 ,p_attribute15 in varchar2 default hr_api.g_varchar2
864 ,p_attribute16 in varchar2 default hr_api.g_varchar2
865 ,p_attribute17 in varchar2 default hr_api.g_varchar2
866 ,p_attribute18 in varchar2 default hr_api.g_varchar2
867 ,p_attribute19 in varchar2 default hr_api.g_varchar2
868 ,p_attribute20 in varchar2 default hr_api.g_varchar2
869 ,p_information_category in varchar2 default hr_api.g_varchar2
870 ,p_information1 in varchar2 default hr_api.g_varchar2
871 ,p_information2 in varchar2 default hr_api.g_varchar2
872 ,p_information3 in varchar2 default hr_api.g_varchar2
873 ,p_information4 in varchar2 default hr_api.g_varchar2
874 ,p_information5 in varchar2 default hr_api.g_varchar2
875 ,p_information6 in varchar2 default hr_api.g_varchar2
876 ,p_information7 in varchar2 default hr_api.g_varchar2
877 ,p_information8 in varchar2 default hr_api.g_varchar2
878 ,p_information9 in varchar2 default hr_api.g_varchar2
879 ,p_information10 in varchar2 default hr_api.g_varchar2
880 ,p_information11 in varchar2 default hr_api.g_varchar2
881 ,p_information12 in varchar2 default hr_api.g_varchar2
882 ,p_information13 in varchar2 default hr_api.g_varchar2
883 ,p_information14 in varchar2 default hr_api.g_varchar2
884 ,p_information15 in varchar2 default hr_api.g_varchar2
885 ,p_information16 in varchar2 default hr_api.g_varchar2
886 ,p_information17 in varchar2 default hr_api.g_varchar2
887 ,p_information18 in varchar2 default hr_api.g_varchar2
888 ,p_information19 in varchar2 default hr_api.g_varchar2
889 ,p_information20 in varchar2 default hr_api.g_varchar2
890 ) is
891 --
892 l_rec per_pat_shd.g_rec_type;
893 l_proc varchar2(72) := g_package||'upd';
894 --
895 Begin
896 hr_utility.set_location('Entering:'||l_proc, 5);
897 --
898 -- Call conversion function to turn arguments into the
899 -- l_rec structure.
900 --
901 l_rec :=
902 per_pat_shd.convert_args
903 (p_allocated_task_id
904 ,p_allocated_checklist_id
905 ,p_task_name
906 ,p_description
907 ,p_performer_orig_system
908 ,p_performer_orig_sys_id
909 ,p_task_owner_person_id
910 ,p_task_sequence
911 ,p_target_start_date
912 ,p_target_end_date
913 ,p_actual_start_date
914 ,p_actual_end_date
915 ,p_action_url
916 ,p_mandatory_flag
917 ,p_status
918 ,p_object_version_number
919 ,p_attribute_category
920 ,p_attribute1
921 ,p_attribute2
922 ,p_attribute3
923 ,p_attribute4
924 ,p_attribute5
925 ,p_attribute6
926 ,p_attribute7
927 ,p_attribute8
928 ,p_attribute9
929 ,p_attribute10
930 ,p_attribute11
931 ,p_attribute12
932 ,p_attribute13
933 ,p_attribute14
934 ,p_attribute15
935 ,p_attribute16
936 ,p_attribute17
937 ,p_attribute18
938 ,p_attribute19
939 ,p_attribute20
940 ,p_information_category
941 ,p_information1
942 ,p_information2
943 ,p_information3
944 ,p_information4
945 ,p_information5
946 ,p_information6
947 ,p_information7
948 ,p_information8
949 ,p_information9
950 ,p_information10
951 ,p_information11
952 ,p_information12
953 ,p_information13
954 ,p_information14
955 ,p_information15
956 ,p_information16
957 ,p_information17
958 ,p_information18
959 ,p_information19
960 ,p_information20
961 );
962 --
963 -- Having converted the arguments into the
964 -- plsql record structure we call the corresponding record
965 -- business process.
966 --
967 per_pat_upd.upd
968 (p_effective_date
969 ,l_rec
970 );
971 p_object_version_number := l_rec.object_version_number;
972 --
973 hr_utility.set_location(' Leaving:'||l_proc, 10);
974 End upd;
975 --
976 end per_pat_upd;