1 Package Body irc_applicant_tracking_swi As
2 /* $Header: iriatswi.pkb 120.0.12000000.1 2007/03/23 12:24:17 vboggava noship $ */
3 --
4 -- Package variables
5 --
6 g_package varchar2(33) := 'irc_applicant_tracking_swi.';
7 --
8 -- ----------------------------------------------------------------------------
9 -- |-----------------------< create_applicant_snapshot >----------------------|
10 -- ----------------------------------------------------------------------------
11 PROCEDURE create_applicant_snapshot
12 (p_validate in number default hr_api.g_false_num
13 ,p_effective_date in date
14 ,p_person_id in number
15 ,p_profile_snapshot_id in number
16 ,p_object_version_number out nocopy number
17 ,p_return_status out nocopy varchar2
18 ) is
19 --
20 -- Variables for API Boolean parameters
21 l_validate boolean;
22 --
23 -- Variables for IN/OUT parameters
24 --
25 -- Other variables
26 l_profile_snapshot_id number;
27 l_proc varchar2(72) := g_package ||'create_applicant_snapshot';
28 Begin
29 hr_utility.set_location(' Entering:' || l_proc,10);
30 --
31 -- Issue a savepoint
32 --
33 savepoint create_applicant_snapshot_swi;
34 --
35 -- Initialise Multiple Message Detection
36 --
37 hr_multi_message.enable_message_list;
38 --
39 -- Remember IN OUT parameter IN values
40 --
41 --
42 -- Convert constant values to their corresponding boolean value
43 --
44 l_validate :=
45 hr_api.constant_to_boolean
46 (p_constant_value => p_validate);
47 --
48 -- Register Surrogate ID or user key values
49 --
50 irc_aps_ins.set_base_key_value
51 (p_profile_snapshot_id => p_profile_snapshot_id
52 );
53 --
54 -- Call API
55 --
56 irc_apl_prfl_snapshots_api.create_applicant_snapshot
57 (p_validate => l_validate
58 ,p_effective_date => p_effective_date
59 ,p_person_id => p_person_id
60 ,p_profile_snapshot_id => l_profile_snapshot_id
61 ,p_object_version_number => p_object_version_number
62 );
63 --
64 -- Convert API warning boolean parameter values to specific
65 -- messages and add them to Multiple Message List
66 --
67 --
68 -- Convert API non-warning boolean parameter values
69 --
70 --
71 -- Derive the API return status value based on whether
72 -- messages of any type exist in the Multiple Message List.
73 -- Also disable Multiple Message Detection.
74 --
75 p_return_status := hr_multi_message.get_return_status_disable;
76 hr_utility.set_location(' Leaving:' || l_proc,20);
77 --
78 exception
79 when hr_multi_message.error_message_exist then
80 --
81 -- Catch the Multiple Message List exception which
82 -- indicates API processing has been aborted because
83 -- at least one message exists in the list.
84 --
85 rollback to create_applicant_snapshot_swi;
86 --
87 -- Reset IN OUT parameters and set OUT parameters
88 --
89 p_object_version_number := null;
90 p_return_status := hr_multi_message.get_return_status_disable;
91 hr_utility.set_location(' Leaving:' || l_proc, 30);
92 when others then
93 --
94 -- When Multiple Message Detection is enabled catch
95 -- any Application specific or other unexpected
96 -- exceptions. Adding appropriate details to the
97 -- Multiple Message List. Otherwise re-raise the
98 -- error.
99 --
100 rollback to create_applicant_snapshot_swi;
101 if hr_multi_message.unexpected_error_add(l_proc) then
102 hr_utility.set_location(' Leaving:' || l_proc,40);
103 raise;
104 end if;
105 --
106 -- Reset IN OUT and set OUT parameters
107 --
108 p_object_version_number := null;
109 p_return_status := hr_multi_message.get_return_status_disable;
110 hr_utility.set_location(' Leaving:' || l_proc,50);
111 end create_applicant_snapshot;
112 --
113 -- ----------------------------------------------------------------------------
114 -- |-----------------------< update_applicant_snapshot >----------------------|
115 -- ----------------------------------------------------------------------------
116 PROCEDURE update_applicant_snapshot
117 (p_validate in number default hr_api.g_false_num
118 ,p_effective_date in date
119 ,p_person_id in number
120 ,p_profile_snapshot_id in out nocopy number
121 ,p_object_version_number in out nocopy number
122 ,p_return_status out nocopy varchar2
123 ) is
124 --
125 -- Variables for API Boolean parameters
126 l_validate boolean;
127 --
128 -- Variables for IN/OUT parameters
129 l_profile_snapshot_id number;
130 l_object_version_number number;
131 --
132 -- Other variables
133 l_proc varchar2(72) := g_package ||'update_applicant_snapshot';
134 Begin
135 hr_utility.set_location(' Entering:' || l_proc,10);
136 --
137 -- Issue a savepoint
138 --
139 savepoint update_applicant_snapshot_swi;
140 --
141 -- Initialise Multiple Message Detection
142 --
143 hr_multi_message.enable_message_list;
144 --
145 -- Remember IN OUT parameter IN values
146 --
147 l_profile_snapshot_id := p_profile_snapshot_id;
148 l_object_version_number := p_object_version_number;
149 --
150 -- Convert constant values to their corresponding boolean value
151 --
152 l_validate :=
153 hr_api.constant_to_boolean
154 (p_constant_value => p_validate);
155 --
156 -- Register Surrogate ID or user key values
157 --
158 --
159 -- Call API
160 --
161 irc_apl_prfl_snapshots_api.update_applicant_snapshot
162 (p_validate => l_validate
163 ,p_effective_date => p_effective_date
164 ,p_person_id => p_person_id
165 ,p_profile_snapshot_id => p_profile_snapshot_id
166 ,p_object_version_number => p_object_version_number
167 );
168 --
169 -- Convert API warning boolean parameter values to specific
170 -- messages and add them to Multiple Message List
171 --
172 --
173 -- Convert API non-warning boolean parameter values
174 --
175 --
176 -- Derive the API return status value based on whether
177 -- messages of any type exist in the Multiple Message List.
178 -- Also disable Multiple Message Detection.
179 --
180 p_return_status := hr_multi_message.get_return_status_disable;
181 hr_utility.set_location(' Leaving:' || l_proc,20);
182 --
183 exception
184 when hr_multi_message.error_message_exist then
185 --
186 -- Catch the Multiple Message List exception which
187 -- indicates API processing has been aborted because
188 -- at least one message exists in the list.
189 --
190 rollback to update_applicant_snapshot_swi;
191 --
192 -- Reset IN OUT parameters and set OUT parameters
193 --
194 p_profile_snapshot_id := l_profile_snapshot_id;
195 p_object_version_number := l_object_version_number;
196 p_return_status := hr_multi_message.get_return_status_disable;
197 hr_utility.set_location(' Leaving:' || l_proc, 30);
198 when others then
199 --
200 -- When Multiple Message Detection is enabled catch
201 -- any Application specific or other unexpected
202 -- exceptions. Adding appropriate details to the
203 -- Multiple Message List. Otherwise re-raise the
204 -- error.
205 --
206 rollback to update_applicant_snapshot_swi;
207 if hr_multi_message.unexpected_error_add(l_proc) then
208 hr_utility.set_location(' Leaving:' || l_proc,40);
209 raise;
210 end if;
211 --
212 -- Reset IN OUT and set OUT parameters
213 --
214 p_profile_snapshot_id := l_profile_snapshot_id;
215 p_object_version_number := l_object_version_number;
216 p_return_status := hr_multi_message.get_return_status_disable;
217 hr_utility.set_location(' Leaving:' || l_proc,50);
218 end update_applicant_snapshot;
219 --
220 -- ----------------------------------------------------------------------------
221 -- |-----------------------< delete_applicant_snapshot >----------------------|
222 -- ----------------------------------------------------------------------------
223 PROCEDURE delete_applicant_snapshot
224 (p_validate in number default hr_api.g_false_num
225 ,p_effective_date in date
226 ,p_person_id in number
227 ,p_profile_snapshot_id in number
228 ,p_object_version_number in number
229 ,p_return_status out nocopy varchar2
230 ) is
231 --
232 -- Variables for API Boolean parameters
233 l_validate boolean;
234 --
235 -- Variables for IN/OUT parameters
236 --
237 -- Other variables
238 l_proc varchar2(72) := g_package ||'delete_applicant_snapshot';
239 Begin
240 hr_utility.set_location(' Entering:' || l_proc,10);
241 --
242 -- Issue a savepoint
243 --
244 savepoint delete_applicant_snapshot_swi;
245 --
246 -- Initialise Multiple Message Detection
247 --
248 hr_multi_message.enable_message_list;
249 --
250 -- Remember IN OUT parameter IN values
251 --
252 --
253 -- Convert constant values to their corresponding boolean value
254 --
255 l_validate :=
256 hr_api.constant_to_boolean
257 (p_constant_value => p_validate);
258 --
259 -- Register Surrogate ID or user key values
260 --
261 --
262 -- Call API
263 --
264 irc_apl_prfl_snapshots_api.delete_applicant_snapshot
265 (p_validate => l_validate
266 ,p_effective_date => p_effective_date
267 ,p_person_id => p_person_id
268 ,p_profile_snapshot_id => p_profile_snapshot_id
269 ,p_object_version_number => p_object_version_number
270 );
271 --
272 -- Convert API warning boolean parameter values to specific
273 -- messages and add them to Multiple Message List
274 --
275 --
276 -- Convert API non-warning boolean parameter values
277 --
278 --
279 -- Derive the API return status value based on whether
280 -- messages of any type exist in the Multiple Message List.
281 -- Also disable Multiple Message Detection.
282 --
283 p_return_status := hr_multi_message.get_return_status_disable;
284 hr_utility.set_location(' Leaving:' || l_proc,20);
285 --
286 exception
287 when hr_multi_message.error_message_exist then
288 --
289 -- Catch the Multiple Message List exception which
290 -- indicates API processing has been aborted because
291 -- at least one message exists in the list.
292 --
293 rollback to delete_applicant_snapshot_swi;
294 --
295 -- Reset IN OUT parameters and set OUT parameters
296 --
297 p_return_status := hr_multi_message.get_return_status_disable;
298 hr_utility.set_location(' Leaving:' || l_proc, 30);
299 when others then
300 --
301 -- When Multiple Message Detection is enabled catch
302 -- any Application specific or other unexpected
303 -- exceptions. Adding appropriate details to the
304 -- Multiple Message List. Otherwise re-raise the
305 -- error.
306 --
307 rollback to delete_applicant_snapshot_swi;
308 if hr_multi_message.unexpected_error_add(l_proc) then
309 hr_utility.set_location(' Leaving:' || l_proc,40);
310 raise;
311 end if;
312 --
313 -- Reset IN OUT and set OUT parameters
314 --
315 p_return_status := hr_multi_message.get_return_status_disable;
316 hr_utility.set_location(' Leaving:' || l_proc,50);
317 end delete_applicant_snapshot;
318 --
319 -- ----------------------------------------------------------------------------
320 -- |------------------------< create_search_criteria >------------------------|
321 -- ----------------------------------------------------------------------------
322 PROCEDURE create_search_criteria
323 (p_validate in number default hr_api.g_false_num
324 ,p_vacancy_id in number
325 ,p_saved_search_criteria_id in number
326 ,p_object_version_number out nocopy number
327 ,p_return_status out nocopy varchar2
328 ) is
329
330 --
331 -- Variables for API Boolean parameters
332 l_validate boolean;
333 --
334 -- Variables for IN/OUT parameters
335 --
336 -- Other variables
337 l_saved_search_criteria_id number;
338 l_proc varchar2(72) := g_package ||'create_search_criteria';
339 Begin
340
341 hr_utility.set_location(' Entering:' || l_proc,10);
342 --
343 -- Issue a savepoint
344 --
345 savepoint create_search_criteria_swi;
346 --
347 -- Initialise Multiple Message Detection
348 --
349 hr_multi_message.enable_message_list;
350 --
351 -- Remember IN OUT parameter IN values
352 --
353 --
354 -- Convert constant values to their corresponding boolean value
355 --
356 l_validate :=
357 hr_api.constant_to_boolean
358 (p_constant_value => p_validate);
359 --
360 -- Register Surrogate ID or user key values
361 --
362 irc_iss_ins.set_base_key_value
363 (p_saved_search_criteria_id => p_saved_search_criteria_id
364 );
365 --
366 -- Call API
367 --
368 irc_saved_search_criteria_api.create_search_criteria
369 (p_validate => l_validate
370 ,p_vacancy_id => p_vacancy_id
371 ,p_saved_search_criteria_id => l_saved_search_criteria_id
372 ,p_object_version_number => p_object_version_number
373 );
374 --
375 -- Convert API warning boolean parameter values to specific
376 -- messages and add them to Multiple Message List
377 --
378 --
379 -- Convert API non-warning boolean parameter values
380 --
381 --
382 -- Derive the API return status value based on whether
383 -- messages of any type exist in the Multiple Message List.
384 -- Also disable Multiple Message Detection.
385 --
386 p_return_status := hr_multi_message.get_return_status_disable;
387 hr_utility.set_location(' Leaving:' || l_proc,20);
388 --
389 exception
390 when hr_multi_message.error_message_exist then
391 --
392 -- Catch the Multiple Message List exception which
393 -- indicates API processing has been aborted because
394 -- at least one message exists in the list.
395 --
396 rollback to create_search_criteria_swi;
397 --
398 -- Reset IN OUT parameters and set OUT parameters
399 --
400 p_object_version_number := null;
401 p_return_status := hr_multi_message.get_return_status_disable;
402 hr_utility.set_location(' Leaving:' || l_proc, 30);
403 when others then
404 --
405 -- When Multiple Message Detection is enabled catch
406 -- any Application specific or other unexpected
407 -- exceptions. Adding appropriate details to the
408 -- Multiple Message List. Otherwise re-raise the
409 -- error.
410 --
411 rollback to create_search_criteria_swi;
412 if hr_multi_message.unexpected_error_add(l_proc) then
413 hr_utility.set_location(' Leaving:' || l_proc,40);
414 raise;
415 end if;
416 --
417 -- Reset IN OUT and set OUT parameters
418 --
419 p_object_version_number := null;
420 p_return_status := hr_multi_message.get_return_status_disable;
421 hr_utility.set_location(' Leaving:' || l_proc,50);
422 end create_search_criteria;
423 --
424 -- ----------------------------------------------------------------------------
425 -- |------------------------< update_search_criteria >------------------------|
426 -- ----------------------------------------------------------------------------
427 PROCEDURE update_search_criteria
428 (p_validate in number default hr_api.g_false_num
429 ,p_vacancy_id in number
430 ,p_saved_search_criteria_id in out nocopy number
431 ,p_object_version_number in out nocopy number
432 ,p_return_status out nocopy varchar2
433 ) is
434 --
435 -- Variables for API Boolean parameters
436 l_validate boolean;
437 --
438 -- Variables for IN/OUT parameters
439 l_saved_search_criteria_id number;
440 l_object_version_number number;
441 --
442 -- Other variables
443 l_proc varchar2(72) := g_package ||'update_search_criteria';
444 Begin
445 hr_utility.set_location(' Entering:' || l_proc,10);
446 --
447 -- Issue a savepoint
448 --
449 savepoint update_search_criteria_swi;
450 --
451 -- Initialise Multiple Message Detection
452 --
453 hr_multi_message.enable_message_list;
454 --
455 -- Remember IN OUT parameter IN values
456 --
457 l_saved_search_criteria_id := p_saved_search_criteria_id;
458 l_object_version_number := p_object_version_number;
459 --
460 -- Convert constant values to their corresponding boolean value
461 --
462 l_validate :=
463 hr_api.constant_to_boolean
464 (p_constant_value => p_validate);
465 --
466 -- Register Surrogate ID or user key values
467 --
468 --
469 -- Call API
470 --
471 irc_saved_search_criteria_api.update_search_criteria
472 (p_validate => l_validate
473 ,p_vacancy_id => p_vacancy_id
474 ,p_saved_search_criteria_id => p_saved_search_criteria_id
475 ,p_object_version_number => p_object_version_number
476 );
477 --
478 -- Convert API warning boolean parameter values to specific
479 -- messages and add them to Multiple Message List
480 --
481 --
482 -- Convert API non-warning boolean parameter values
483 --
484 --
485 -- Derive the API return status value based on whether
486 -- messages of any type exist in the Multiple Message List.
487 -- Also disable Multiple Message Detection.
488 --
489 p_return_status := hr_multi_message.get_return_status_disable;
490 hr_utility.set_location(' Leaving:' || l_proc,20);
491 --
492 exception
493 when hr_multi_message.error_message_exist then
494 --
495 -- Catch the Multiple Message List exception which
496 -- indicates API processing has been aborted because
497 -- at least one message exists in the list.
498 --
499 rollback to update_search_criteria_swi;
500 --
501 -- Reset IN OUT parameters and set OUT parameters
502 --
503 p_saved_search_criteria_id := l_saved_search_criteria_id;
504 p_object_version_number := l_object_version_number;
505 p_return_status := hr_multi_message.get_return_status_disable;
506 hr_utility.set_location(' Leaving:' || l_proc, 30);
507 when others then
508 --
509 -- When Multiple Message Detection is enabled catch
510 -- any Application specific or other unexpected
511 -- exceptions. Adding appropriate details to the
512 -- Multiple Message List. Otherwise re-raise the
513 -- error.
514 --
515 rollback to update_search_criteria_swi;
516 if hr_multi_message.unexpected_error_add(l_proc) then
517 hr_utility.set_location(' Leaving:' || l_proc,40);
518 raise;
519 end if;
520 --
521 -- Reset IN OUT and set OUT parameters
522 --
523 p_saved_search_criteria_id := l_saved_search_criteria_id;
524 p_object_version_number := l_object_version_number;
525 p_return_status := hr_multi_message.get_return_status_disable;
526 hr_utility.set_location(' Leaving:' || l_proc,50);
527 end update_search_criteria;
528
529 -- ----------------------------------------------------------------------------
530 -- |------------------------------< delete_search_criteria >-----------------------------|
531 -- ----------------------------------------------------------------------------
532 PROCEDURE delete_search_criteria
533 (p_validate in number default hr_api.g_false_num
534 ,p_vacancy_id in number
535 ,p_saved_search_criteria_id in number
536 ,p_object_version_number in number
537 ,p_return_status out nocopy varchar2
538 ) is
539 --
540 -- Variables for API Boolean parameters
541 l_validate boolean;
542 --
543 -- Variables for IN/OUT parameters
544 --
545 -- Other variables
546 l_proc varchar2(72) := g_package ||'delete_search_criteria';
547 Begin
548 hr_utility.set_location(' Entering:' || l_proc,10);
549 --
550 -- Issue a savepoint
551 --
552 savepoint delete_search_criteria_swi;
553 --
554 -- Initialise Multiple Message Detection
555 --
556 hr_multi_message.enable_message_list;
557 --
558 -- Remember IN OUT parameter IN values
559 --
560 --
561 -- Convert constant values to their corresponding boolean value
562 --
563 l_validate :=
564 hr_api.constant_to_boolean
565 (p_constant_value => p_validate);
566 --
567 -- Register Surrogate ID or user key values
568 --
569 --
570 -- Call API
571 --
572 irc_saved_search_criteria_api.delete_search_criteria
573 (p_validate => l_validate
574 ,p_vacancy_id => p_vacancy_id
575 ,p_saved_search_criteria_id => p_saved_search_criteria_id
576 ,p_object_version_number => p_object_version_number
577 );
578 --
579 -- Convert API warning boolean parameter values to specific
580 -- messages and add them to Multiple Message List
581 --
582 --
583 -- Convert API non-warning boolean parameter values
584 --
585 --
586 -- Derive the API return status value based on whether
587 -- messages of any type exist in the Multiple Message List.
588 -- Also disable Multiple Message Detection.
589 --
590 p_return_status := hr_multi_message.get_return_status_disable;
591 hr_utility.set_location(' Leaving:' || l_proc,20);
592 --
593 exception
594 when hr_multi_message.error_message_exist then
595 --
596 -- Catch the Multiple Message List exception which
597 -- indicates API processing has been aborted because
598 -- at least one message exists in the list.
599 --
600 rollback to delete_search_criteria_swi;
601 --
602 -- Reset IN OUT parameters and set OUT parameters
603 --
604 p_return_status := hr_multi_message.get_return_status_disable;
605 hr_utility.set_location(' Leaving:' || l_proc, 30);
606 when others then
607 --
608 -- When Multiple Message Detection is enabled catch
609 -- any Application specific or other unexpected
610 -- exceptions. Adding appropriate details to the
611 -- Multiple Message List. Otherwise re-raise the
612 -- error.
613 --
614 rollback to delete_search_criteria_swi;
615 if hr_multi_message.unexpected_error_add(l_proc) then
616 hr_utility.set_location(' Leaving:' || l_proc,40);
617 raise;
618 end if;
619 --
620 -- Reset IN OUT and set OUT parameters
621 --
622 p_return_status := hr_multi_message.get_return_status_disable;
623 hr_utility.set_location(' Leaving:' || l_proc,50);
624 end delete_search_criteria;
625 --
626 -- ----------------------------------------------------------------------------
627 -- |-----------------------< create_apl_profile_access >----------------------|
628 -- ----------------------------------------------------------------------------
629 PROCEDURE create_apl_profile_access
630 (p_validate in number default hr_api.g_false_num
631 ,p_person_id in number
632 ,p_apl_profile_access_id in number
633 ,p_object_version_number out nocopy number
634 ,p_return_status out nocopy varchar2
635 ) is
636 --
637 -- Variables for API Boolean parameters
638 l_validate boolean;
639 --
640 -- Variables for IN/OUT parameters
641 --
642 -- Other variables
643 l_apl_profile_access_id number;
644 l_proc varchar2(72) := g_package ||'create_apl_profile_access';
645 Begin
646 hr_utility.set_location(' Entering:' || l_proc,10);
647 --
648 -- Issue a savepoint
649 --
650 savepoint create_apl_profile_access_swi;
651 --
652 -- Initialise Multiple Message Detection
653 --
654 hr_multi_message.enable_message_list;
655 --
656 -- Remember IN OUT parameter IN values
657 --
658 --
659 -- Convert constant values to their corresponding boolean value
660 --
661 l_validate :=
662 hr_api.constant_to_boolean
663 (p_constant_value => p_validate);
664 --
665 -- Register Surrogate ID or user key values
666 --
667 --
668 -- Call API
669 --
670 irc_apl_profile_access_api.create_apl_profile_access
671 (p_validate => l_validate
672 ,p_person_id => p_person_id
673 ,p_apl_profile_access_id => l_apl_profile_access_id
674 ,p_object_version_number => p_object_version_number
675 );
676 --
677 -- Convert API warning boolean parameter values to specific
678 -- messages and add them to Multiple Message List
679 --
680 --
681 -- Convert API non-warning boolean parameter values
682 --
683 --
684 -- Derive the API return status value based on whether
685 -- messages of any type exist in the Multiple Message List.
686 -- Also disable Multiple Message Detection.
687 --
688 p_return_status := hr_multi_message.get_return_status_disable;
689 hr_utility.set_location(' Leaving:' || l_proc,20);
690 --
691 exception
692 when hr_multi_message.error_message_exist then
693 --
694 -- Catch the Multiple Message List exception which
695 -- indicates API processing has been aborted because
696 -- at least one message exists in the list.
697 --
698 rollback to create_apl_profile_access_swi;
699 --
700 -- Reset IN OUT parameters and set OUT parameters
701 --
702 p_object_version_number := null;
703 p_return_status := hr_multi_message.get_return_status_disable;
704 hr_utility.set_location(' Leaving:' || l_proc, 30);
705 when others then
706 --
707 -- When Multiple Message Detection is enabled catch
708 -- any Application specific or other unexpected
709 -- exceptions. Adding appropriate details to the
710 -- Multiple Message List. Otherwise re-raise the
711 -- error.
712 --
713 rollback to create_apl_profile_access_swi;
714 if hr_multi_message.unexpected_error_add(l_proc) then
715 hr_utility.set_location(' Leaving:' || l_proc,40);
716 raise;
717 end if;
718 --
719 -- Reset IN OUT and set OUT parameters
720 --
721 p_object_version_number := null;
722 p_return_status := hr_multi_message.get_return_status_disable;
723 hr_utility.set_location(' Leaving:' || l_proc,50);
724 end create_apl_profile_access;
725 --
726 -- ----------------------------------------------------------------------------
727 -- |-----------------------< update_apl_profile_access >----------------------|
728 -- ----------------------------------------------------------------------------
729 PROCEDURE update_apl_profile_access
730 (p_validate in number default hr_api.g_false_num
731 ,p_person_id in number
732 ,p_apl_profile_access_id in out nocopy number
733 ,p_object_version_number in out nocopy number
734 ,p_return_status out nocopy varchar2
735 ) is
736 --
737 -- Variables for API Boolean parameters
738 l_validate boolean;
739 --
740 -- Variables for IN/OUT parameters
741 l_apl_profile_access_id number;
742 l_object_version_number number;
743 --
744 -- Other variables
745 l_proc varchar2(72) := g_package ||'update_apl_profile_access';
746 Begin
747 hr_utility.set_location(' Entering:' || l_proc,10);
748 --
749 -- Issue a savepoint
750 --
751 savepoint update_apl_profile_access_swi;
752 --
753 -- Initialise Multiple Message Detection
754 --
755 hr_multi_message.enable_message_list;
756 --
757 -- Remember IN OUT parameter IN values
758 --
759 l_apl_profile_access_id := p_apl_profile_access_id;
760 l_object_version_number := p_object_version_number;
761 --
762 -- Convert constant values to their corresponding boolean value
763 --
764 l_validate :=
765 hr_api.constant_to_boolean
766 (p_constant_value => p_validate);
767 --
768 -- Register Surrogate ID or user key values
769 --
770 --
771 -- Call API
772 --
773 irc_apl_profile_access_api.update_apl_profile_access
774 (p_validate => l_validate
775 ,p_person_id => p_person_id
776 ,p_apl_profile_access_id => p_apl_profile_access_id
777 ,p_object_version_number => p_object_version_number
778 );
779 --
780 -- Convert API warning boolean parameter values to specific
781 -- messages and add them to Multiple Message List
782 --
783 --
784 -- Convert API non-warning boolean parameter values
785 --
786 --
787 -- Derive the API return status value based on whether
788 -- messages of any type exist in the Multiple Message List.
789 -- Also disable Multiple Message Detection.
790 --
791 p_return_status := hr_multi_message.get_return_status_disable;
792 hr_utility.set_location(' Leaving:' || l_proc,20);
793 --
794 exception
795 when hr_multi_message.error_message_exist then
796 --
797 -- Catch the Multiple Message List exception which
798 -- indicates API processing has been aborted because
799 -- at least one message exists in the list.
800 --
801 rollback to update_apl_profile_access_swi;
802 --
803 -- Reset IN OUT parameters and set OUT parameters
804 --
805 p_apl_profile_access_id := l_apl_profile_access_id;
806 p_object_version_number := l_object_version_number;
807 p_return_status := hr_multi_message.get_return_status_disable;
808 hr_utility.set_location(' Leaving:' || l_proc, 30);
809 when others then
810 --
811 -- When Multiple Message Detection is enabled catch
812 -- any Application specific or other unexpected
813 -- exceptions. Adding appropriate details to the
814 -- Multiple Message List. Otherwise re-raise the
815 -- error.
816 --
817 rollback to update_apl_profile_access_swi;
818 if hr_multi_message.unexpected_error_add(l_proc) then
819 hr_utility.set_location(' Leaving:' || l_proc,40);
820 raise;
821 end if;
822 --
823 -- Reset IN OUT and set OUT parameters
824 --
825 p_apl_profile_access_id := l_apl_profile_access_id;
826 p_object_version_number := l_object_version_number;
827 p_return_status := hr_multi_message.get_return_status_disable;
828 hr_utility.set_location(' Leaving:' || l_proc,50);
829 end update_apl_profile_access;
830 --
831 ------------------------------------------------------------------------------------------
832 -- |------------------------------< delete_apl_profile_access >-----------------------------|
833 -- ----------------------------------------------------------------------------
834 PROCEDURE delete_apl_profile_access
835 (p_validate in number default hr_api.g_false_num
836 ,p_person_id in number
837 ,p_apl_profile_access_id in number
838 ,p_object_version_number in number
839 ,p_return_status out nocopy varchar2
840 ) is
841 --
842 -- Variables for API Boolean parameters
843 l_validate boolean;
844 --
845 -- Variables for IN/OUT parameters
846 --
847 -- Other variables
848 l_proc varchar2(72) := g_package ||'delete_apl_profile_access';
849 Begin
850 hr_utility.set_location(' Entering:' || l_proc,10);
851 --
852 -- Issue a savepoint
853 --
854 savepoint delete_apl_profile_access_swi;
855 --
856 -- Initialise Multiple Message Detection
857 --
858 hr_multi_message.enable_message_list;
859 --
860 -- Remember IN OUT parameter IN values
861 --
862 --
863 -- Convert constant values to their corresponding boolean value
864 --
865 l_validate :=
866 hr_api.constant_to_boolean
867 (p_constant_value => p_validate);
868 --
869 -- Register Surrogate ID or user key values
870 --
871 --
872 -- Call API
873 --
874 irc_apl_profile_access_api.delete_apl_profile_access
875 (p_validate => l_validate
876 ,p_person_id => p_person_id
877 ,p_apl_profile_access_id => p_apl_profile_access_id
878 ,p_object_version_number => p_object_version_number
879 );
880 --
881 -- Convert API warning boolean parameter values to specific
882 -- messages and add them to Multiple Message List
883 --
884 --
885 -- Convert API non-warning boolean parameter values
886 --
887 --
888 -- Derive the API return status value based on whether
889 -- messages of any type exist in the Multiple Message List.
890 -- Also disable Multiple Message Detection.
891 --
892 p_return_status := hr_multi_message.get_return_status_disable;
893 hr_utility.set_location(' Leaving:' || l_proc,20);
894 --
895 exception
896 when hr_multi_message.error_message_exist then
897 --
898 -- Catch the Multiple Message List exception which
899 -- indicates API processing has been aborted because
900 -- at least one message exists in the list.
901 --
902 rollback to delete_apl_profile_access_swi;
903 --
904 -- Reset IN OUT parameters and set OUT parameters
905 --
906 p_return_status := hr_multi_message.get_return_status_disable;
907 hr_utility.set_location(' Leaving:' || l_proc, 30);
908 when others then
909 --
910 -- When Multiple Message Detection is enabled catch
911 -- any Application specific or other unexpected
912 -- exceptions. Adding appropriate details to the
913 -- Multiple Message List. Otherwise re-raise the
914 -- error.
915 --
916 rollback to delete_apl_profile_access_swi;
917 if hr_multi_message.unexpected_error_add(l_proc) then
918 hr_utility.set_location(' Leaving:' || l_proc,40);
919 raise;
920 end if;
921 --
922 -- Reset IN OUT and set OUT parameters
923 --
924 p_return_status := hr_multi_message.get_return_status_disable;
925 hr_utility.set_location(' Leaving:' || l_proc,50);
926 end delete_apl_profile_access;
927 --
928 end irc_applicant_tracking_swi;