DBA Data[Home] [Help]

PACKAGE BODY: APPS.IRC_NOTIFICATION_PREFS_API

Source


1 Package Body IRC_NOTIFICATION_PREFS_API as
2 /* $Header: irinpapi.pkb 120.1 2006/02/15 16:19:07 gjaggava noship $ */
3 --
4 -- Package Variables
5 --
6 g_package  varchar2(33) := 'IRC_NOTIFICATION_PREFS_API.';
7 --
8 -- ----------------------------------------------------------------------------
9 -- |---------------------< CREATE_NOTIFICATION_PREFS >------------------------|
10 -- ----------------------------------------------------------------------------
11 --
12 procedure CREATE_NOTIFICATION_PREFS
13   (p_validate                      in     boolean  default false
14   ,p_person_id                     in     number
15   ,p_effective_date                in     date
16   ,p_address_id                    in     number   default null
17   ,p_matching_jobs                 in     varchar2 default 'N'
18   ,p_matching_job_freq             in     varchar2 default '1'
19   ,p_allow_access                  in     varchar2 default 'N'
20   ,p_receive_info_mail             in     varchar2 default 'N'
21   ,p_attribute_category            in     varchar2 default null
22   ,p_attribute1                    in     varchar2 default null
23   ,p_attribute2                    in     varchar2 default null
24   ,p_attribute3                    in     varchar2 default null
25   ,p_attribute4                    in     varchar2 default null
26   ,p_attribute5                    in     varchar2 default null
27   ,p_attribute6                    in     varchar2 default null
28   ,p_attribute7                    in     varchar2 default null
29   ,p_attribute8                    in     varchar2 default null
30   ,p_attribute9                    in     varchar2 default null
31   ,p_attribute10                   in     varchar2 default null
32   ,p_attribute11                   in     varchar2 default null
33   ,p_attribute12                   in     varchar2 default null
34   ,p_attribute13                   in     varchar2 default null
35   ,p_attribute14                   in     varchar2 default null
36   ,p_attribute15                   in     varchar2 default null
37   ,p_attribute16                   in     varchar2 default null
38   ,p_attribute17                   in     varchar2 default null
39   ,p_attribute18                   in     varchar2 default null
40   ,p_attribute19                   in     varchar2 default null
41   ,p_attribute20                   in     varchar2 default null
42   ,p_attribute21                   in     varchar2 default null
43   ,p_attribute22                   in     varchar2 default null
44   ,p_attribute23                   in     varchar2 default null
45   ,p_attribute24                   in     varchar2 default null
46   ,p_attribute25                   in     varchar2 default null
47   ,p_attribute26                   in     varchar2 default null
48   ,p_attribute27                   in     varchar2 default null
49   ,p_attribute28                   in     varchar2 default null
50   ,p_attribute29                   in     varchar2 default null
51   ,p_attribute30                   in     varchar2 default null
52   ,p_agency_id                     in     number   default null
53   ,p_attempt_id                    in     number   default null
54   ,p_notification_preference_id       out nocopy number
55   ,p_object_version_number            out nocopy number
56   ) is
57   --
58   -- Declare cursors and local variables
59   --
60   l_proc         varchar2(72) := g_package||'CREATE_NOTIFICATION_PREFS';
61   l_object_version_number number;
62   l_effective_date        date;
63   l_notification_preference_id number;
64 begin
65   hr_utility.set_location('Entering:'|| l_proc, 10);
66   --
67   -- Issue a savepoint
68   --
69   savepoint CREATE_NOTIFICATION_PREFS;
70   --
71   -- Truncate the time portion from all IN date parameters
72   --
73   l_effective_date := trunc(p_effective_date);
74   --
75   -- Call Before Process User Hook
76   --
77   begin
78     IRC_NOTIFICATION_PREFS_BK1.CREATE_NOTIFICATION_PREFS_B
79       (p_person_id          => p_person_id
80       ,p_effective_date     => l_effective_date
81       ,p_address_id         => p_address_id
82       ,p_matching_jobs      => p_matching_jobs
83       ,p_matching_job_freq  => p_matching_job_freq
84       ,p_allow_access       => p_allow_access
85       ,p_receive_info_mail  => p_receive_info_mail
86       ,p_attribute_category => p_attribute_category
87       ,p_attribute1         => p_attribute1
88       ,p_attribute2         => p_attribute2
89       ,p_attribute3         => p_attribute3
90       ,p_attribute4         => p_attribute4
91       ,p_attribute5         => p_attribute5
92       ,p_attribute6         => p_attribute6
93       ,p_attribute7         => p_attribute7
94       ,p_attribute8         => p_attribute8
95       ,p_attribute9         => p_attribute9
96       ,p_attribute10        => p_attribute10
97       ,p_attribute11        => p_attribute11
98       ,p_attribute12        => p_attribute12
99       ,p_attribute13        => p_attribute13
100       ,p_attribute14        => p_attribute14
101       ,p_attribute15        => p_attribute15
102       ,p_attribute16        => p_attribute16
103       ,p_attribute17        => p_attribute17
104       ,p_attribute18        => p_attribute18
105       ,p_attribute19        => p_attribute19
106       ,p_attribute20        => p_attribute20
107       ,p_attribute21        => p_attribute21
108       ,p_attribute22        => p_attribute22
109       ,p_attribute23        => p_attribute23
110       ,p_attribute24        => p_attribute24
111       ,p_attribute25        => p_attribute25
112       ,p_attribute26        => p_attribute26
113       ,p_attribute27        => p_attribute27
114       ,p_attribute28        => p_attribute28
115       ,p_attribute29        => p_attribute29
116       ,p_attribute30        => p_attribute30
117       ,p_agency_id          => p_agency_id
118       ,p_attempt_id         => p_attempt_id
119       );
120   exception
121     when hr_api.cannot_find_prog_unit then
122       hr_api.cannot_find_prog_unit_error
123         (p_module_name => 'CREATE_NOTIFICATION_PREFS'
124         ,p_hook_type   => 'BP'
125         );
126   end;
127   --
128   -- Validation in addition to Row Handlers
129   --
130   --
131   -- Process Logic
132   --
133   irc_inp_ins.ins
134   (p_effective_date                => l_effective_date
135   ,p_person_id                     => p_person_id
136   ,p_matching_jobs                 => p_matching_jobs
137   ,p_matching_job_freq             => p_matching_job_freq
138   ,p_receive_info_mail             => p_receive_info_mail
139   ,p_allow_access                  => p_allow_access
140   ,p_attribute_category            => p_attribute_category
141   ,p_address_id                    => p_address_id
142   ,p_attribute1                    => p_attribute1
143   ,p_attribute2                    => p_attribute2
144   ,p_attribute3                    => p_attribute3
145   ,p_attribute4                    => p_attribute4
146   ,p_attribute5                    => p_attribute5
147   ,p_attribute6                    => p_attribute6
148   ,p_attribute7                    => p_attribute7
149   ,p_attribute8                    => p_attribute8
150   ,p_attribute9                    => p_attribute9
151   ,p_attribute10                   => p_attribute10
152   ,p_attribute11                   => p_attribute11
153   ,p_attribute12                   => p_attribute12
154   ,p_attribute13                   => p_attribute13
155   ,p_attribute14                   => p_attribute14
156   ,p_attribute15                   => p_attribute15
157   ,p_attribute16                   => p_attribute16
158   ,p_attribute17                   => p_attribute17
159   ,p_attribute18                   => p_attribute18
160   ,p_attribute19                   => p_attribute19
161   ,p_attribute20                   => p_attribute20
162   ,p_attribute21                   => p_attribute21
163   ,p_attribute22                   => p_attribute22
164   ,p_attribute23                   => p_attribute23
165   ,p_attribute24                   => p_attribute24
166   ,p_attribute25                   => p_attribute25
167   ,p_attribute26                   => p_attribute26
168   ,p_attribute27                   => p_attribute27
169   ,p_attribute28                   => p_attribute28
170   ,p_attribute29                   => p_attribute29
171   ,p_attribute30                   => p_attribute30
172   ,p_object_version_number         => l_object_version_number
173   ,p_notification_preference_id    => l_notification_preference_id
174   ,p_agency_id                     => p_agency_id
175   ,p_attempt_id                    => p_attempt_id
176   );
177   --
178   -- Call After Process User Hook
179   --
180   begin
181     IRC_NOTIFICATION_PREFS_BK1.CREATE_NOTIFICATION_PREFS_A
182       (p_person_id            => p_person_id
183       ,p_effective_date       => l_effective_date
184       ,p_address_id           => p_address_id
185       ,p_matching_jobs        => p_matching_jobs
186       ,p_matching_job_freq    => p_matching_job_freq
187       ,p_allow_access         => p_allow_access
188       ,p_receive_info_mail    => p_receive_info_mail
189       ,p_object_version_number => l_object_version_number
190       ,p_attribute_category   => p_attribute_category
191       ,p_attribute1           => p_attribute1
192       ,p_attribute2           => p_attribute2
193       ,p_attribute3           => p_attribute3
194       ,p_attribute4           => p_attribute4
195       ,p_attribute5           => p_attribute5
196       ,p_attribute6           => p_attribute6
197       ,p_attribute7           => p_attribute7
198       ,p_attribute8           => p_attribute8
199       ,p_attribute9           => p_attribute9
200       ,p_attribute10          => p_attribute10
201       ,p_attribute11          => p_attribute11
202       ,p_attribute12          => p_attribute12
203       ,p_attribute13          => p_attribute13
204       ,p_attribute14          => p_attribute14
205       ,p_attribute15          => p_attribute15
206       ,p_attribute16          => p_attribute16
207       ,p_attribute17          => p_attribute17
208       ,p_attribute18          => p_attribute18
209       ,p_attribute19          => p_attribute19
210       ,p_attribute20          => p_attribute20
211       ,p_attribute21          => p_attribute21
212       ,p_attribute22          => p_attribute22
213       ,p_attribute23          => p_attribute23
214       ,p_attribute24          => p_attribute24
215       ,p_attribute25          => p_attribute25
216       ,p_attribute26          => p_attribute26
217       ,p_attribute27          => p_attribute27
218       ,p_attribute28          => p_attribute28
219       ,p_attribute29          => p_attribute29
220       ,p_attribute30          => p_attribute30
221       ,p_notification_preference_id => l_notification_preference_id
222       ,p_agency_id            => p_agency_id
223       ,p_attempt_id           => p_attempt_id
224       );
225   exception
226     when hr_api.cannot_find_prog_unit then
227       hr_api.cannot_find_prog_unit_error
228         (p_module_name => 'CREATE_NOTIFICATION_PREFS'
229         ,p_hook_type   => 'AP'
230         );
231   end;
232   --
233   -- When in validation only mode raise the Validate_Enabled exception
234   --
235   if p_validate then
236     raise hr_api.validate_enabled;
237   end if;
238   --
239   -- Set all output arguments
240   --
241   p_object_version_number  := l_object_version_number;
242   p_notification_preference_id := l_notification_preference_id;
243   --
244   hr_utility.set_location(' Leaving:'||l_proc, 70);
245 exception
246   when hr_api.validate_enabled then
247     --
248     -- As the Validate_Enabled exception has been raised
249     -- we must rollback to the savepoint
250     --
251     rollback to CREATE_NOTIFICATION_PREFS;
252     --
253     -- Only set output warning arguments
254     -- (Any key or derived arguments must be set to null
255     -- when validation only mode is being used.)
256     --
257     p_object_version_number  := null;
258     p_notification_preference_id := null;
259     hr_utility.set_location(' Leaving:'||l_proc, 80);
260   when others then
261     --
262     -- A validation or unexpected error has occured
263     --
267     hr_utility.set_location(' Leaving:'||l_proc, 90);
264     p_object_version_number  := null;
265     p_notification_preference_id := null;
266     rollback to CREATE_NOTIFICATION_PREFS;
268     raise;
269 end CREATE_NOTIFICATION_PREFS;
270 --
271 -- ----------------------------------------------------------------------------
272 -- |---------------------< UPDATE_NOTIFICATION_PREFS >------------------------|
273 -- ----------------------------------------------------------------------------
274 --
275 procedure UPDATE_NOTIFICATION_PREFS
276   (p_validate                      in     boolean  default false
277   ,p_party_id                      in     number   default hr_api.g_number
278   ,p_person_id                     in     number   default hr_api.g_number
279   ,p_effective_date                in     date
280   ,p_matching_jobs                 in     varchar2 default hr_api.g_varchar2
281   ,p_matching_job_freq             in     varchar2 default hr_api.g_varchar2
282   ,p_allow_access                  in     varchar2 default hr_api.g_varchar2
283   ,p_receive_info_mail             in     varchar2 default hr_api.g_varchar2
284   ,p_address_id                    in     number   default hr_api.g_number
285   ,p_attribute_category            in     varchar2 default hr_api.g_varchar2
286   ,p_attribute1                    in     varchar2 default hr_api.g_varchar2
287   ,p_attribute2                    in     varchar2 default hr_api.g_varchar2
288   ,p_attribute3                    in     varchar2 default hr_api.g_varchar2
289   ,p_attribute4                    in     varchar2 default hr_api.g_varchar2
290   ,p_attribute5                    in     varchar2 default hr_api.g_varchar2
291   ,p_attribute6                    in     varchar2 default hr_api.g_varchar2
292   ,p_attribute7                    in     varchar2 default hr_api.g_varchar2
293   ,p_attribute8                    in     varchar2 default hr_api.g_varchar2
294   ,p_attribute9                    in     varchar2 default hr_api.g_varchar2
295   ,p_attribute10                   in     varchar2 default hr_api.g_varchar2
296   ,p_attribute11                   in     varchar2 default hr_api.g_varchar2
297   ,p_attribute12                   in     varchar2 default hr_api.g_varchar2
298   ,p_attribute13                   in     varchar2 default hr_api.g_varchar2
299   ,p_attribute14                   in     varchar2 default hr_api.g_varchar2
300   ,p_attribute15                   in     varchar2 default hr_api.g_varchar2
301   ,p_attribute16                   in     varchar2 default hr_api.g_varchar2
302   ,p_attribute17                   in     varchar2 default hr_api.g_varchar2
303   ,p_attribute18                   in     varchar2 default hr_api.g_varchar2
304   ,p_attribute19                   in     varchar2 default hr_api.g_varchar2
305   ,p_attribute20                   in     varchar2 default hr_api.g_varchar2
306   ,p_attribute21                   in     varchar2 default hr_api.g_varchar2
307   ,p_attribute22                   in     varchar2 default hr_api.g_varchar2
308   ,p_attribute23                   in     varchar2 default hr_api.g_varchar2
309   ,p_attribute24                   in     varchar2 default hr_api.g_varchar2
310   ,p_attribute25                   in     varchar2 default hr_api.g_varchar2
311   ,p_attribute26                   in     varchar2 default hr_api.g_varchar2
312   ,p_attribute27                   in     varchar2 default hr_api.g_varchar2
313   ,p_attribute28                   in     varchar2 default hr_api.g_varchar2
314   ,p_attribute29                   in     varchar2 default hr_api.g_varchar2
315   ,p_attribute30                   in     varchar2 default hr_api.g_varchar2
316   ,p_notification_preference_id    in     number
317   ,p_agency_id                     in     number   default hr_api.g_number
318   ,p_attempt_id                    in     number   default hr_api.g_number
319   ,p_object_version_number         in out nocopy number
320   ) is
321   --
322   -- Declare cursors and local variables
323   --
324   l_proc         varchar2(72) := g_package||'UPDATE_NOTIFICATION_PREFS';
325   --
326   l_effective_date        date;
327   l_p_object_version_number number := p_object_version_number;
328 begin
329   hr_utility.set_location('Entering:'|| l_proc, 10);
330   --
331   -- Issue a savepoint
332   --
333   savepoint UPDATE_NOTIFICATION_PREFS;
334   --
335   -- Truncate the time portion from all IN date parameters
336   --
337   l_effective_date := trunc(p_effective_date);
338   --
339   -- Call Before Process User Hook
340   --
341   begin
342     IRC_NOTIFICATION_PREFS_BK2.UPDATE_NOTIFICATION_PREFS_B
343       (p_party_id           => p_party_id
344       ,p_person_id          => p_person_id
345       ,p_notification_preference_id => p_notification_preference_id
346       ,p_effective_date     => l_effective_date
347       ,p_matching_jobs      => p_matching_jobs
348       ,p_matching_job_freq  => p_matching_job_freq
349       ,p_allow_access       => p_allow_access
350       ,p_receive_info_mail  => p_receive_info_mail
351       ,p_object_version_number => l_p_object_version_number
352       ,p_address_id         => p_address_id
353       ,p_attribute_category => p_attribute_category
354       ,p_attribute1         => p_attribute1
355       ,p_attribute2         => p_attribute2
356       ,p_attribute3         => p_attribute3
357       ,p_attribute4         => p_attribute4
358       ,p_attribute5         => p_attribute5
359       ,p_attribute6         => p_attribute6
360       ,p_attribute7         => p_attribute7
361       ,p_attribute8         => p_attribute8
362       ,p_attribute9         => p_attribute9
363       ,p_attribute10        => p_attribute10
364       ,p_attribute11        => p_attribute11
365       ,p_attribute12        => p_attribute12
366       ,p_attribute13        => p_attribute13
367       ,p_attribute14        => p_attribute14
368       ,p_attribute15        => p_attribute15
369       ,p_attribute16        => p_attribute16
370       ,p_attribute17        => p_attribute17
371       ,p_attribute18        => p_attribute18
372       ,p_attribute19        => p_attribute19
373       ,p_attribute20        => p_attribute20
374       ,p_attribute21        => p_attribute21
375       ,p_attribute22        => p_attribute22
376       ,p_attribute23        => p_attribute23
377       ,p_attribute24        => p_attribute24
378       ,p_attribute25        => p_attribute25
379       ,p_attribute26        => p_attribute26
380       ,p_attribute27        => p_attribute27
381       ,p_attribute28        => p_attribute28
382       ,p_attribute29        => p_attribute29
383       ,p_attribute30        => p_attribute30
384       ,p_agency_id          => p_agency_id
385       ,p_attempt_id         => p_attempt_id
386       );
387   exception
388     when hr_api.cannot_find_prog_unit then
389       hr_api.cannot_find_prog_unit_error
390         (p_module_name => 'UPDATE_NOTIFICATION_PREFS'
391         ,p_hook_type   => 'BP'
392         );
393   end;
394   --
395   -- Validation in addition to Row Handlers
396   --
397   --
398   --
399   -- Process Logic
400   --
401     --
402   irc_inp_upd.upd
403   (p_effective_date                => l_effective_date
404   ,p_party_id                      => p_party_id
405   ,p_person_id                     => p_person_id
406   ,p_notification_preference_id    => p_notification_preference_id
407   ,p_object_version_number         => l_p_object_version_number
408   ,p_matching_jobs                 => p_matching_jobs
409   ,p_matching_job_freq             => p_matching_job_freq
410   ,p_receive_info_mail             => p_receive_info_mail
411   ,p_allow_access                  => p_allow_access
412   ,p_attribute_category            => p_attribute_category
413   ,p_address_id                    => p_address_id
414   ,p_attribute1                    => p_attribute1
415   ,p_attribute2                    => p_attribute2
416   ,p_attribute3                    => p_attribute3
417   ,p_attribute4                    => p_attribute4
418   ,p_attribute5                    => p_attribute5
419   ,p_attribute6                    => p_attribute6
420   ,p_attribute7                    => p_attribute7
421   ,p_attribute8                    => p_attribute8
422   ,p_attribute9                    => p_attribute9
423   ,p_attribute10                   => p_attribute10
424   ,p_attribute11                   => p_attribute11
425   ,p_attribute12                   => p_attribute12
426   ,p_attribute13                   => p_attribute13
427   ,p_attribute14                   => p_attribute14
428   ,p_attribute15                   => p_attribute15
429   ,p_attribute16                   => p_attribute16
430   ,p_attribute17                   => p_attribute17
431   ,p_attribute18                   => p_attribute18
432   ,p_attribute19                   => p_attribute19
433   ,p_attribute20                   => p_attribute20
434   ,p_attribute21                   => p_attribute21
435   ,p_attribute22                   => p_attribute22
436   ,p_attribute23                   => p_attribute23
437   ,p_attribute24                   => p_attribute24
438   ,p_attribute25                   => p_attribute25
439   ,p_attribute26                   => p_attribute26
440   ,p_attribute27                   => p_attribute27
441   ,p_attribute28                   => p_attribute28
442   ,p_attribute29                   => p_attribute29
443   ,p_attribute30                   => p_attribute30
444   ,p_agency_id                     => p_agency_id
445   ,p_attempt_id                    => p_attempt_id
446   );
447  --
448   --
449   -- Call After Process User Hook
450   --
451   begin
452     IRC_NOTIFICATION_PREFS_BK2.UPDATE_NOTIFICATION_PREFS_A
453       (p_party_id              => p_party_id
454       ,p_person_id             => p_person_id
455       ,p_notification_preference_id => p_notification_preference_id
456       ,p_effective_date        => l_effective_date
457       ,p_matching_jobs         => p_matching_jobs
458       ,p_matching_job_freq     => p_matching_job_freq
459       ,p_allow_access          => p_allow_access
460       ,p_receive_info_mail     => p_receive_info_mail
461       ,p_object_version_number => l_p_object_version_number
462       ,p_address_id           => p_address_id
463       ,p_attribute_category   => p_attribute_category
464       ,p_attribute1           => p_attribute1
465       ,p_attribute2           => p_attribute2
466       ,p_attribute3           => p_attribute3
467       ,p_attribute4           => p_attribute4
468       ,p_attribute5           => p_attribute5
469       ,p_attribute6           => p_attribute6
470       ,p_attribute7           => p_attribute7
471       ,p_attribute8           => p_attribute8
472       ,p_attribute9           => p_attribute9
473       ,p_attribute10          => p_attribute10
474       ,p_attribute11          => p_attribute11
475       ,p_attribute12          => p_attribute12
476       ,p_attribute13          => p_attribute13
477       ,p_attribute14          => p_attribute14
478       ,p_attribute15          => p_attribute15
479       ,p_attribute16          => p_attribute16
480       ,p_attribute17          => p_attribute17
481       ,p_attribute18          => p_attribute18
482       ,p_attribute19          => p_attribute19
483       ,p_attribute20          => p_attribute20
484       ,p_attribute21          => p_attribute21
485       ,p_attribute22          => p_attribute22
486       ,p_attribute23          => p_attribute23
487       ,p_attribute24          => p_attribute24
488       ,p_attribute25          => p_attribute25
489       ,p_attribute26          => p_attribute26
490       ,p_attribute27          => p_attribute27
491       ,p_attribute28          => p_attribute28
492       ,p_attribute29          => p_attribute29
493       ,p_attribute30          => p_attribute30
494       ,p_agency_id            => p_agency_id
495       ,p_attempt_id           => p_attempt_id
496       );
497   exception
498     when hr_api.cannot_find_prog_unit then
499       hr_api.cannot_find_prog_unit_error
500         (p_module_name => 'UPDATE_NOTIFICATION_PREFS'
501         ,p_hook_type   => 'AP'
502         );
503   end;
504   --
505   -- When in validation only mode raise the Validate_Enabled exception
506   --
507   if p_validate then
508     raise hr_api.validate_enabled;
509   end if;
510   --
511   -- Set all output arguments
512   --
513   --
514   p_object_version_number := l_p_object_version_number;
515   hr_utility.set_location(' Leaving:'||l_proc, 70);
516 exception
517   when hr_api.validate_enabled then
518     --
519     -- As the Validate_Enabled exception has been raised
520     -- we must rollback to the savepoint
521     --
522     rollback to UPDATE_NOTIFICATION_PREFS;
523     --
524     -- Reset IN OUT parameters and set OUT parameters
525     p_object_version_number := l_p_object_version_number;
526     --
527     -- Only set output warning arguments
528     -- (Any key or derived arguments must be set to null
529     -- when validation only mode is being used.)
530     --
531     hr_utility.set_location(' Leaving:'||l_proc, 80);
532   when others then
533     --
534     -- A validation or unexpected error has occured
535     --
536     rollback to UPDATE_NOTIFICATION_PREFS;
537     --
538     -- Reset IN OUT parameters and set OUT parameters
539     p_object_version_number := l_p_object_version_number;
540     --
541     hr_utility.set_location(' Leaving:'||l_proc, 90);
542     raise;
543 end UPDATE_NOTIFICATION_PREFS;
544 --
545 -- ----------------------------------------------------------------------------
546 -- |---------------------< DELETE_NOTIFICATION_PREFS >------------------------|
547 -- ----------------------------------------------------------------------------
548 --
549 procedure DELETE_NOTIFICATION_PREFS
550   (p_validate                      in     boolean  default false
551   ,p_notification_preference_id    in     number
552   ,p_object_version_number         in     number
553   ) is
554   --
555   -- Declare cursors and local variables
556   --
557   l_proc         varchar2(72) := g_package||'DELETE_NOTIFICATION_PREFS';
558   --
559 begin
560   hr_utility.set_location('Entering:'|| l_proc, 10);
561   --
562   -- Issue a savepoint
563   --
564   savepoint DELETE_NOTIFICATION_PREFS;
565   --
566   -- Truncate the time portion from all IN date parameters
567   --
568   --
569   -- Call Before Process User Hook
570   --
571   begin
572     IRC_NOTIFICATION_PREFS_BK3.DELETE_NOTIFICATION_PREFS_B
573       (p_notification_preference_id    => p_notification_preference_id
574       ,p_object_version_number         => p_object_version_number
575       );
576   exception
577     when hr_api.cannot_find_prog_unit then
578       hr_api.cannot_find_prog_unit_error
579         (p_module_name => 'DELETE_NOTIFICATION_PREFS'
580         ,p_hook_type   => 'BP'
581         );
582   end;
583   --
584   -- Validation in addition to Row Handlers
585   --
586   --
587   -- Process Logic
588   --
589   irc_inp_del.del
590   (p_notification_preference_id    => p_notification_preference_id
591   ,p_object_version_number         => p_object_version_number
592   );
593   --
594   -- Call After Process User Hook
595   --
596   begin
597     IRC_NOTIFICATION_PREFS_BK3.DELETE_NOTIFICATION_PREFS_A
598       (p_notification_preference_id    => p_notification_preference_id
599       ,p_object_version_number         => p_object_version_number
600       );
601   exception
602     when hr_api.cannot_find_prog_unit then
603       hr_api.cannot_find_prog_unit_error
604         (p_module_name => 'DELETE_NOTIFICATION_PREFS'
605         ,p_hook_type   => 'AP'
606         );
607   end;
608   --
609   -- When in validation only mode raise the Validate_Enabled exception
610   --
611   if p_validate then
612     raise hr_api.validate_enabled;
613   end if;
614   --
615   -- Set all output arguments
616   --
617   --
618   hr_utility.set_location(' Leaving:'||l_proc, 70);
619 exception
620   when hr_api.validate_enabled then
621     --
622     -- As the Validate_Enabled exception has been raised
623     -- we must rollback to the savepoint
624     --
625     rollback to DELETE_NOTIFICATION_PREFS;
626     --
627     -- Only set output warning arguments
628     -- (Any key or derived arguments must be set to null
629     -- when validation only mode is being used.)
630     --
631     --
632     hr_utility.set_location(' Leaving:'||l_proc, 80);
633   when others then
634     --
635     -- A validation or unexpected error has occured
636     --
637     rollback to DELETE_NOTIFICATION_PREFS;
638     hr_utility.set_location(' Leaving:'||l_proc, 90);
639     raise;
640 end DELETE_NOTIFICATION_PREFS;
641 --
642 end IRC_NOTIFICATION_PREFS_API;