1 Package Body per_evt_upd as
2 /* $Header: peevtrhi.pkb 120.2 2008/04/30 11:32:10 uuddavol ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' per_evt_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 per_evt_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, 10);
62 --
63 -- Increment the object version
64 p_rec.object_version_number := p_rec.object_version_number + 1;
65 --
66
67 per_evt_shd.g_api_dml := true; -- Set the api dml status
68 --
69 -- Update the per_events Row
70 --
71 update per_events
72 set
73 event_id = p_rec.event_id
74 ,business_group_id = p_rec.business_group_id
75 ,location_id = p_rec.location_id
76 ,internal_contact_person_id = p_rec.internal_contact_person_id
77 ,organization_run_by_id = p_rec.organization_run_by_id
78 ,assignment_id = p_rec.assignment_id
79 ,date_start = p_rec.date_start
80 ,type = p_rec.type
81 ,comments = p_rec.comments
82 ,contact_telephone_number = p_rec.contact_telephone_number
83 ,date_end = p_rec.date_end
84 ,emp_or_apl = p_rec.emp_or_apl
85 ,event_or_interview = p_rec.event_or_interview
86 ,external_contact = p_rec.external_contact
87 ,time_end = p_rec.time_end
88 ,time_start = p_rec.time_start
89 ,request_id = p_rec.request_id
90 ,program_application_id = p_rec.program_application_id
91 ,program_id = p_rec.program_id
92 ,program_update_date = p_rec.program_update_date
93 ,attribute_category = p_rec.attribute_category
94 ,attribute1 = p_rec.attribute1
95 ,attribute2 = p_rec.attribute2
96 ,attribute3 = p_rec.attribute3
97 ,attribute4 = p_rec.attribute4
98 ,attribute5 = p_rec.attribute5
99 ,attribute6 = p_rec.attribute6
100 ,attribute7 = p_rec.attribute7
101 ,attribute8 = p_rec.attribute8
102 ,attribute9 = p_rec.attribute9
103 ,attribute10 = p_rec.attribute10
104 ,attribute11 = p_rec.attribute11
105 ,attribute12 = p_rec.attribute12
106 ,attribute13 = p_rec.attribute13
107 ,attribute14 = p_rec.attribute14
108 ,attribute15 = p_rec.attribute15
109 ,attribute16 = p_rec.attribute16
110 ,attribute17 = p_rec.attribute17
111 ,attribute18 = p_rec.attribute18
112 ,attribute19 = p_rec.attribute19
113 ,attribute20 = p_rec.attribute20
114 ,party_id = p_rec.party_id
115 ,object_version_number = p_rec.object_version_number
116 where event_id = p_rec.event_id;
117 --
118 per_evt_shd.g_api_dml := false; -- Unset the api dml status
119 --
120 hr_utility.set_location(' Leaving:'||l_proc, 20);
121 --
122 Exception
123 When hr_api.check_integrity_violated Then
124 -- A check constraint has been violated
125 per_evt_shd.g_api_dml := false; -- Unset the api dml status
126 per_evt_shd.constraint_error
127 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
128 When hr_api.parent_integrity_violated Then
129 -- Parent integrity has been violated
130 per_evt_shd.g_api_dml := false; -- Unset the api dml status
131 per_evt_shd.constraint_error
132 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
133 When hr_api.unique_integrity_violated Then
134 -- Unique integrity has been violated
135 per_evt_shd.g_api_dml := false; -- Unset the api dml status
136 per_evt_shd.constraint_error
137 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
138 When Others Then
139 per_evt_shd.g_api_dml := false; -- Unset the api dml status
140 Raise;
141 End update_dml;
142 --
143 -- ----------------------------------------------------------------------------
144 -- |------------------------------< pre_update >------------------------------|
145 -- ----------------------------------------------------------------------------
146 -- {Start Of Comments}
147 --
148 -- Description:
149 -- This private procedure contains any processing which is required before
150 -- the update dml.
151 --
152 -- Prerequisites:
153 -- This is an internal procedure which is called from the upd procedure.
154 --
155 -- In Parameters:
156 -- A Pl/Sql record structure.
157 --
158 -- Post Success:
159 -- Processing continues.
160 --
161 -- Post Failure:
162 -- If an error has occurred, an error message and exception wil be raised
163 -- but not handled.
164 --
165 -- Developer Implementation Notes:
166 -- Any pre-processing required before the update dml is issued should be
167 -- coded within this procedure. It is important to note that any 3rd party
168 -- maintenance should be reviewed before placing in this procedure.
169 --
170 -- Access Status:
171 -- Internal Row Handler Use Only.
172 --
173 -- {End Of Comments}
174 -- ----------------------------------------------------------------------------
175 Procedure pre_update
176 (p_rec in per_evt_shd.g_rec_type
177 ) is
178 --
179 l_proc varchar2(72) := g_package||'pre_update';
180 --
181 Begin
182 hr_utility.set_location('Entering:'||l_proc, 10);
183 --
184 hr_utility.set_location(' Leaving:'||l_proc, 20);
185 End pre_update;
186 --
187 -- ----------------------------------------------------------------------------
188 -- |-----------------------------< post_update >------------------------------|
189 -- ----------------------------------------------------------------------------
190 -- {Start Of Comments}
191 --
192 -- Description:
193 -- This private procedure contains any processing which is required after
194 -- the update dml.
195 --
196 -- Prerequisites:
197 -- This is an internal procedure which is called from the upd procedure.
198 --
199 -- In Parameters:
200 -- A Pl/Sql record structure.
201 --
202 -- Post Success:
203 -- Processing continues.
204 --
205 -- Post Failure:
206 -- If an error has occurred, an error message and exception will be raised
207 -- but not handled.
208 --
209 -- Developer Implementation Notes:
210 -- Any post-processing required after the update dml is issued should be
211 -- coded within this procedure. It is important to note that any 3rd party
212 -- maintenance should be reviewed before placing in this procedure.
213 --
214 -- Access Status:
215 -- Internal Row Handler Use Only.
216 --
217 -- {End Of Comments}
218 -- ----------------------------------------------------------------------------
219 Procedure post_update
220 (p_rec in per_evt_shd.g_rec_type
221 ) is
222 --
223 l_proc varchar2(72) := g_package||'post_update';
224 --
225 Begin
226 hr_utility.set_location('Entering:'||l_proc, 10);
227 begin
228 --
229 per_evt_rku.after_update
230 (p_event_id
231 => p_rec.event_id
232 ,p_location_id
233 => p_rec.location_id
234 ,p_internal_contact_person_id
235 => p_rec.internal_contact_person_id
236 ,p_organization_run_by_id
237 => p_rec.organization_run_by_id
238 ,p_assignment_id
239 => p_rec.assignment_id
240 ,p_date_start
241 => p_rec.date_start
242 ,p_type
243 => p_rec.type
244 ,p_comments
245 => p_rec.comments
246 ,p_contact_telephone_number
247 => p_rec.contact_telephone_number
248 ,p_date_end
249 => p_rec.date_end
250 ,p_emp_or_apl
251 => p_rec.emp_or_apl
252 ,p_event_or_interview
253 => p_rec.event_or_interview
254 ,p_external_contact
255 => p_rec.external_contact
256 ,p_time_end
257 => p_rec.time_end
258 ,p_time_start
259 => p_rec.time_start
260 ,p_request_id
261 => p_rec.request_id
262 ,p_program_application_id
263 => p_rec.program_application_id
264 ,p_program_id
265 => p_rec.program_id
266 ,p_program_update_date
267 => p_rec.program_update_date
268 ,p_attribute_category
269 => p_rec.attribute_category
270 ,p_attribute1
271 => p_rec.attribute1
272 ,p_attribute2
273 => p_rec.attribute2
274 ,p_attribute3
275 => p_rec.attribute3
276 ,p_attribute4
277 => p_rec.attribute4
278 ,p_attribute5
279 => p_rec.attribute5
280 ,p_attribute6
281 => p_rec.attribute6
282 ,p_attribute7
283 => p_rec.attribute7
284 ,p_attribute8
285 => p_rec.attribute8
286 ,p_attribute9
287 => p_rec.attribute9
288 ,p_attribute10
289 => p_rec.attribute10
290 ,p_attribute11
291 => p_rec.attribute11
292 ,p_attribute12
293 => p_rec.attribute12
294 ,p_attribute13
295 => p_rec.attribute13
296 ,p_attribute14
297 => p_rec.attribute14
298 ,p_attribute15
299 => p_rec.attribute15
300 ,p_attribute16
301 => p_rec.attribute16
302 ,p_attribute17
303 => p_rec.attribute17
304 ,p_attribute18
305 => p_rec.attribute18
306 ,p_attribute19
307 => p_rec.attribute19
308 ,p_attribute20
309 => p_rec.attribute20
310 ,p_party_id
311 => p_rec.party_id
312 ,p_object_version_number
313 => p_rec.object_version_number
314 ,p_location_id_o
315 => per_evt_shd.g_old_rec.location_id
316 ,p_internal_contact_person_id_o
317 => per_evt_shd.g_old_rec.internal_contact_person_id
318 ,p_organization_run_by_id_o
319 => per_evt_shd.g_old_rec.organization_run_by_id
320 ,p_assignment_id_o
321 => per_evt_shd.g_old_rec.assignment_id
322 ,p_date_start_o
323 => per_evt_shd.g_old_rec.date_start
324 ,p_type_o
325 => per_evt_shd.g_old_rec.type
326 ,p_comments_o
327 => per_evt_shd.g_old_rec.comments
328 ,p_contact_telephone_number_o
329 => per_evt_shd.g_old_rec.contact_telephone_number
330 ,p_date_end_o
331 => per_evt_shd.g_old_rec.date_end
332 ,p_emp_or_apl_o
333 => per_evt_shd.g_old_rec.emp_or_apl
334 ,p_event_or_interview_o
335 => per_evt_shd.g_old_rec.event_or_interview
336 ,p_external_contact_o
337 => per_evt_shd.g_old_rec.external_contact
338 ,p_time_end_o
339 => per_evt_shd.g_old_rec.time_end
340 ,p_time_start_o
341 => per_evt_shd.g_old_rec.time_start
342 ,p_request_id_o
343 => per_evt_shd.g_old_rec.request_id
344 ,p_program_application_id_o
345 => per_evt_shd.g_old_rec.program_application_id
346 ,p_program_id_o
347 => per_evt_shd.g_old_rec.program_id
348 ,p_program_update_date_o
349 => per_evt_shd.g_old_rec.program_update_date
350 ,p_attribute_category_o
351 => per_evt_shd.g_old_rec.attribute_category
352 ,p_attribute1_o
353 => per_evt_shd.g_old_rec.attribute1
354 ,p_attribute2_o
355 => per_evt_shd.g_old_rec.attribute2
356 ,p_attribute3_o
357 => per_evt_shd.g_old_rec.attribute3
358 ,p_attribute4_o
359 => per_evt_shd.g_old_rec.attribute4
360 ,p_attribute5_o
361 => per_evt_shd.g_old_rec.attribute5
362 ,p_attribute6_o
363 => per_evt_shd.g_old_rec.attribute6
364 ,p_attribute7_o
365 => per_evt_shd.g_old_rec.attribute7
366 ,p_attribute8_o
367 => per_evt_shd.g_old_rec.attribute8
368 ,p_attribute9_o
369 => per_evt_shd.g_old_rec.attribute9
370 ,p_attribute10_o
371 => per_evt_shd.g_old_rec.attribute10
372 ,p_attribute11_o
373 => per_evt_shd.g_old_rec.attribute11
374 ,p_attribute12_o
375 => per_evt_shd.g_old_rec.attribute12
376 ,p_attribute13_o
377 => per_evt_shd.g_old_rec.attribute13
378 ,p_attribute14_o
379 => per_evt_shd.g_old_rec.attribute14
380 ,p_attribute15_o
381 => per_evt_shd.g_old_rec.attribute15
382 ,p_attribute16_o
383 => per_evt_shd.g_old_rec.attribute16
384 ,p_attribute17_o
385 => per_evt_shd.g_old_rec.attribute17
386 ,p_attribute18_o
387 => per_evt_shd.g_old_rec.attribute18
388 ,p_attribute19_o
389 => per_evt_shd.g_old_rec.attribute19
390 ,p_attribute20_o
391 => per_evt_shd.g_old_rec.attribute20
392 ,p_party_id_o
393 => per_evt_shd.g_old_rec.party_id
394 ,p_object_version_number_o
395 => per_evt_shd.g_old_rec.object_version_number
396 );
397 --
398 exception
399 --
400 when hr_api.cannot_find_prog_unit then
401 --
402 hr_api.cannot_find_prog_unit_error
403 (p_module_name => 'PER_EVENTS'
404 ,p_hook_type => 'AU');
405 --
406 end;
407 --
408 hr_utility.set_location(' Leaving:'||l_proc, 20);
409 End post_update;
410 --
411 -- ----------------------------------------------------------------------------
412 -- |-----------------------------< convert_defs >-----------------------------|
413 -- ----------------------------------------------------------------------------
414 -- {Start Of Comments}
415 --
416 -- Description:
417 -- The Convert_Defs procedure has one very important function:
418 -- It must return the record structure for the row with all system defaulted
419 -- values converted into its corresponding parameter value for update. When
420 -- we attempt to update a row through the Upd process , certain
421 -- parameters can be defaulted which enables flexibility in the calling of
422 -- the upd process (e.g. only attributes which need to be updated need to be
423 -- specified). For the upd process to determine which attributes
424 -- have NOT been specified we need to check if the parameter has a reserved
425 -- system default value. Therefore, for all parameters which have a
426 -- corresponding reserved system default mechanism specified we need to
427 -- check if a system default is being used. If a system default is being
428 -- used then we convert the defaulted value into its corresponding attribute
429 -- value held in the g_old_rec data structure.
430 --
431 -- Prerequisites:
432 -- This private function can only be called from the upd process.
433 --
434 -- In Parameters:
435 -- A Pl/Sql record structure.
436 --
437 -- Post Success:
438 -- The record structure will be returned with all system defaulted parameter
439 -- values converted into its current row attribute value.
440 --
441 -- Post Failure:
442 -- No direct error handling is required within this function. Any possible
443 -- errors within this procedure will be a PL/SQL value error due to
444 -- conversion of datatypes or data lengths.
445 --
446 -- Developer Implementation Notes:
447 -- None.
448 --
449 -- Access Status:
450 -- Internal Row Handler Use Only.
451 --
452 -- {End Of Comments}
453 -- ----------------------------------------------------------------------------
454 Procedure convert_defs
455 (p_rec in out nocopy per_evt_shd.g_rec_type
456 ) is
457 --
458 Begin
459 --
460 -- We must now examine each argument value in the
461 -- p_rec plsql record structure
462 -- to see if a system default is being used. If a system default
463 -- is being used then we must set to the 'current' argument value.
464 --
465 If (p_rec.business_group_id = hr_api.g_number) then
466 p_rec.business_group_id :=
467 per_evt_shd.g_old_rec.business_group_id;
468 End If;
469 If (p_rec.location_id = hr_api.g_number) then
470 p_rec.location_id :=
471 per_evt_shd.g_old_rec.location_id;
472 End If;
473 If (p_rec.internal_contact_person_id = hr_api.g_number) then
474 p_rec.internal_contact_person_id :=
475 per_evt_shd.g_old_rec.internal_contact_person_id;
476 End If;
477 If (p_rec.organization_run_by_id = hr_api.g_number) then
478 p_rec.organization_run_by_id :=
479 per_evt_shd.g_old_rec.organization_run_by_id;
480 End If;
481 If (p_rec.assignment_id = hr_api.g_number) then
482 p_rec.assignment_id :=
483 per_evt_shd.g_old_rec.assignment_id;
484 End If;
485 If (p_rec.date_start = hr_api.g_date) then
486 p_rec.date_start :=
487 per_evt_shd.g_old_rec.date_start;
488 End If;
489 If (p_rec.type = hr_api.g_varchar2) then
490 p_rec.type :=
491 per_evt_shd.g_old_rec.type;
492 End If;
493 If (p_rec.comments = hr_api.g_varchar2) then
494 p_rec.comments :=
495 per_evt_shd.g_old_rec.comments;
496 End If;
497 If (p_rec.contact_telephone_number = hr_api.g_varchar2) then
498 p_rec.contact_telephone_number :=
499 per_evt_shd.g_old_rec.contact_telephone_number;
500 End If;
501 If (p_rec.date_end = hr_api.g_date) then
502 p_rec.date_end :=
503 per_evt_shd.g_old_rec.date_end;
504 End If;
505 If (p_rec.emp_or_apl = hr_api.g_varchar2) then
506 p_rec.emp_or_apl :=
507 per_evt_shd.g_old_rec.emp_or_apl;
508 End If;
509 If (p_rec.event_or_interview = hr_api.g_varchar2) then
510 p_rec.event_or_interview :=
511 per_evt_shd.g_old_rec.event_or_interview;
512 End If;
513 If (p_rec.external_contact = hr_api.g_varchar2) then
514 p_rec.external_contact :=
515 per_evt_shd.g_old_rec.external_contact;
516 End If;
517 If (p_rec.time_end = hr_api.g_varchar2) then
518 p_rec.time_end :=
519 per_evt_shd.g_old_rec.time_end;
520 End If;
521 If (p_rec.time_start = hr_api.g_varchar2) then
522 p_rec.time_start :=
523 per_evt_shd.g_old_rec.time_start;
524 End If;
525 If (p_rec.request_id = hr_api.g_number) then
526 p_rec.request_id :=
527 per_evt_shd.g_old_rec.request_id;
528 End If;
529 If (p_rec.program_application_id = hr_api.g_number) then
530 p_rec.program_application_id :=
531 per_evt_shd.g_old_rec.program_application_id;
532 End If;
533 If (p_rec.program_id = hr_api.g_number) then
534 p_rec.program_id :=
535 per_evt_shd.g_old_rec.program_id;
536 End If;
537 If (p_rec.program_update_date = hr_api.g_date) then
538 p_rec.program_update_date :=
539 per_evt_shd.g_old_rec.program_update_date;
540 End If;
541 If (p_rec.attribute_category = hr_api.g_varchar2) then
542 p_rec.attribute_category :=
543 per_evt_shd.g_old_rec.attribute_category;
544 End If;
545 If (p_rec.attribute1 = hr_api.g_varchar2) then
546 p_rec.attribute1 :=
547 per_evt_shd.g_old_rec.attribute1;
548 End If;
549 If (p_rec.attribute2 = hr_api.g_varchar2) then
550 p_rec.attribute2 :=
551 per_evt_shd.g_old_rec.attribute2;
552 End If;
553 If (p_rec.attribute3 = hr_api.g_varchar2) then
554 p_rec.attribute3 :=
555 per_evt_shd.g_old_rec.attribute3;
556 End If;
557 If (p_rec.attribute4 = hr_api.g_varchar2) then
558 p_rec.attribute4 :=
559 per_evt_shd.g_old_rec.attribute4;
560 End If;
561 If (p_rec.attribute5 = hr_api.g_varchar2) then
562 p_rec.attribute5 :=
563 per_evt_shd.g_old_rec.attribute5;
564 End If;
565 If (p_rec.attribute6 = hr_api.g_varchar2) then
566 p_rec.attribute6 :=
567 per_evt_shd.g_old_rec.attribute6;
568 End If;
569 If (p_rec.attribute7 = hr_api.g_varchar2) then
570 p_rec.attribute7 :=
571 per_evt_shd.g_old_rec.attribute7;
572 End If;
573 If (p_rec.attribute8 = hr_api.g_varchar2) then
574 p_rec.attribute8 :=
575 per_evt_shd.g_old_rec.attribute8;
576 End If;
577 If (p_rec.attribute9 = hr_api.g_varchar2) then
578 p_rec.attribute9 :=
579 per_evt_shd.g_old_rec.attribute9;
580 End If;
581 If (p_rec.attribute10 = hr_api.g_varchar2) then
582 p_rec.attribute10 :=
583 per_evt_shd.g_old_rec.attribute10;
584 End If;
585 If (p_rec.attribute11 = hr_api.g_varchar2) then
586 p_rec.attribute11 :=
587 per_evt_shd.g_old_rec.attribute11;
588 End If;
589 If (p_rec.attribute12 = hr_api.g_varchar2) then
590 p_rec.attribute12 :=
591 per_evt_shd.g_old_rec.attribute12;
592 End If;
593 If (p_rec.attribute13 = hr_api.g_varchar2) then
594 p_rec.attribute13 :=
595 per_evt_shd.g_old_rec.attribute13;
596 End If;
597 If (p_rec.attribute14 = hr_api.g_varchar2) then
598 p_rec.attribute14 :=
599 per_evt_shd.g_old_rec.attribute14;
600 End If;
601 If (p_rec.attribute15 = hr_api.g_varchar2) then
602 p_rec.attribute15 :=
603 per_evt_shd.g_old_rec.attribute15;
604 End If;
605 If (p_rec.attribute16 = hr_api.g_varchar2) then
606 p_rec.attribute16 :=
607 per_evt_shd.g_old_rec.attribute16;
608 End If;
609 If (p_rec.attribute17 = hr_api.g_varchar2) then
610 p_rec.attribute17 :=
611 per_evt_shd.g_old_rec.attribute17;
612 End If;
613 If (p_rec.attribute18 = hr_api.g_varchar2) then
614 p_rec.attribute18 :=
615 per_evt_shd.g_old_rec.attribute18;
616 End If;
617 If (p_rec.attribute19 = hr_api.g_varchar2) then
618 p_rec.attribute19 :=
619 per_evt_shd.g_old_rec.attribute19;
620 End If;
621 If (p_rec.attribute20 = hr_api.g_varchar2) then
622 p_rec.attribute20 :=
623 per_evt_shd.g_old_rec.attribute20;
624 End If;
625 If (p_rec.party_id = hr_api.g_number) then
626 p_rec.party_id :=
627 per_evt_shd.g_old_rec.party_id;
628 End If;
629 --
630 End convert_defs;
631 --
632 -- ----------------------------------------------------------------------------
633 -- |---------------------------------< upd >----------------------------------|
634 -- ----------------------------------------------------------------------------
635 Procedure upd
636 (p_rec in out nocopy per_evt_shd.g_rec_type
637 ) is
638 --
639 l_proc varchar2(72) := g_package||'upd';
640 --
641 Begin
642 hr_utility.set_location('Entering:'||l_proc, 10);
643 --
644 -- We must lock the row which we need to update.
645 --
646 per_evt_shd.lck
647 (p_rec.event_id
648 ,p_rec.object_version_number
649 );
650 --
651 -- 1. During an update system defaults are used to determine if
652 -- arguments have been defaulted or not. We must therefore
653 -- derive the full record structure values to be updated.
654 --
655 -- 2. Call the supporting update validate operations.
656 --
657 convert_defs(p_rec);
658 per_evt_bus.update_validate
659 (p_rec
660 );
661 --
662 -- Call the supporting pre-update operation
663 --
664 per_evt_upd.pre_update(p_rec);
665 --
666 -- Update the row.
667 --
668 per_evt_upd.update_dml(p_rec);
669
670 --
671 -- Call the supporting post-update operation
672 --
673 per_evt_upd.post_update
674 (p_rec
675 );
676 End upd;
677 --
678 -- ----------------------------------------------------------------------------
679 -- |---------------------------------< upd >----------------------------------|
680 -- ----------------------------------------------------------------------------
681 Procedure upd
682 (p_event_id in number
683 ,p_object_version_number in out nocopy number
684 ,p_date_start in date default hr_api.g_date
685 ,p_type in varchar2 default hr_api.g_varchar2
686 ,p_business_group_id in number default hr_api.g_number
687 ,p_location_id in number default hr_api.g_number
688 ,p_internal_contact_person_id in number default hr_api.g_number
689 ,p_organization_run_by_id in number default hr_api.g_number
690 ,p_assignment_id in number default hr_api.g_number
691 ,p_comments in varchar2 default hr_api.g_varchar2
692 ,p_contact_telephone_number in varchar2 default hr_api.g_varchar2
693 ,p_date_end in date default hr_api.g_date
694 ,p_emp_or_apl in varchar2 default hr_api.g_varchar2
695 ,p_event_or_interview in varchar2 default hr_api.g_varchar2
696 ,p_external_contact in varchar2 default hr_api.g_varchar2
697 ,p_time_end in varchar2 default hr_api.g_varchar2
698 ,p_time_start in varchar2 default hr_api.g_varchar2
699 ,p_request_id in number default hr_api.g_number
700 ,p_program_application_id in number default hr_api.g_number
701 ,p_program_id in number default hr_api.g_number
702 ,p_program_update_date in date default hr_api.g_date
703 ,p_attribute_category in varchar2 default hr_api.g_varchar2
704 ,p_attribute1 in varchar2 default hr_api.g_varchar2
705 ,p_attribute2 in varchar2 default hr_api.g_varchar2
706 ,p_attribute3 in varchar2 default hr_api.g_varchar2
707 ,p_attribute4 in varchar2 default hr_api.g_varchar2
708 ,p_attribute5 in varchar2 default hr_api.g_varchar2
709 ,p_attribute6 in varchar2 default hr_api.g_varchar2
710 ,p_attribute7 in varchar2 default hr_api.g_varchar2
711 ,p_attribute8 in varchar2 default hr_api.g_varchar2
712 ,p_attribute9 in varchar2 default hr_api.g_varchar2
713 ,p_attribute10 in varchar2 default hr_api.g_varchar2
714 ,p_attribute11 in varchar2 default hr_api.g_varchar2
715 ,p_attribute12 in varchar2 default hr_api.g_varchar2
716 ,p_attribute13 in varchar2 default hr_api.g_varchar2
717 ,p_attribute14 in varchar2 default hr_api.g_varchar2
718 ,p_attribute15 in varchar2 default hr_api.g_varchar2
719 ,p_attribute16 in varchar2 default hr_api.g_varchar2
720 ,p_attribute17 in varchar2 default hr_api.g_varchar2
721 ,p_attribute18 in varchar2 default hr_api.g_varchar2
722 ,p_attribute19 in varchar2 default hr_api.g_varchar2
723 ,p_attribute20 in varchar2 default hr_api.g_varchar2
724 ,p_party_id in number default hr_api.g_number
725 ) is
726 --
727 l_rec per_evt_shd.g_rec_type;
728 l_proc varchar2(72) := g_package||'upd';
729 --
730 Begin
731 hr_utility.set_location('Entering:'||l_proc, 10);
732 --
733 -- Call conversion function to turn arguments into the
734 -- l_rec structure.
735 --
736 l_rec :=
737 per_evt_shd.convert_args
738 (p_event_id
739 ,p_business_group_id
740 ,p_location_id
741 ,p_internal_contact_person_id
742 ,p_organization_run_by_id
743 ,p_assignment_id
744 ,p_date_start
745 ,p_type
746 ,p_comments
747 ,p_contact_telephone_number
748 ,p_date_end
749 ,p_emp_or_apl
750 ,p_event_or_interview
751 ,p_external_contact
752 ,p_time_end
753 ,p_time_start
754 ,p_request_id
755 ,p_program_application_id
756 ,p_program_id
757 ,p_program_update_date
758 ,p_attribute_category
759 ,p_attribute1
760 ,p_attribute2
761 ,p_attribute3
762 ,p_attribute4
763 ,p_attribute5
764 ,p_attribute6
765 ,p_attribute7
766 ,p_attribute8
767 ,p_attribute9
768 ,p_attribute10
769 ,p_attribute11
770 ,p_attribute12
771 ,p_attribute13
772 ,p_attribute14
773 ,p_attribute15
774 ,p_attribute16
775 ,p_attribute17
776 ,p_attribute18
777 ,p_attribute19
778 ,p_attribute20
779 ,p_party_id
780 ,p_object_version_number
781 );
782 --
783 -- Having converted the arguments into the
784 -- plsql record structure we call the corresponding record
785 -- business process.
786 --
787 per_evt_upd.upd
788 (l_rec
789 );
790 p_object_version_number := l_rec.object_version_number;
791
792 --
793 hr_utility.set_location(' Leaving:'||l_proc, 20);
794 End upd;
795 --
796 end per_evt_upd;