DBA Data[Home] [Help]

PACKAGE BODY: APPS.PQH_FYI_NOTIFY_API

Source


1 Package Body pqh_fyi_notify_api as
2 /* $Header: pqfynapi.pkb 115.4 2002/12/06 18:06:21 rpasapul ship $ */
3 --
4 -- Package Variables
5 --
6 g_package  varchar2(33) := '  pqh_fyi_notify_api.';
7 --
8 -- ----------------------------------------------------------------------------
9 -- |------------------------< create_fyi_notify >----------------------|
10 -- ----------------------------------------------------------------------------
11 --
12 procedure create_fyi_notify
13   (p_validate                       in  boolean   default false
14   ,p_fyi_notified_id                out nocopy number
15   ,p_transaction_category_id        in  number    default null
16   ,p_transaction_id                 in  number    default null
17   ,p_notification_event_cd          in  varchar2  default null
18   ,p_notified_type_cd               in  varchar2  default null
19   ,p_notified_name                  in  varchar2  default null
20   ,p_notification_date              in  date      default null
21   ,p_status                         in  varchar2  default null
22   ,p_object_version_number          out nocopy number
23   ,p_effective_date                 in  date
24   ) is
25   --
26   -- Declare cursors and local variables
27   --
28   l_fyi_notified_id pqh_fyi_notify.fyi_notified_id%TYPE;
29   l_proc varchar2(72) := g_package||'create_fyi_notify';
30   l_object_version_number pqh_fyi_notify.object_version_number%TYPE;
31   --
32 begin
33   --
34   hr_utility.set_location('Entering:'|| l_proc, 10);
35   --
36   -- Issue a savepoint if operating in validation only mode
37   --
38   savepoint create_fyi_notify;
39   --
40   hr_utility.set_location(l_proc, 20);
41   --
42   -- Process Logic
43   --
44   begin
45     --
46     -- Start of API User Hook for the before hook of create_fyi_notify
47     --
48     pqh_fyi_notify_bk1.create_fyi_notify_b
49       (
50        p_transaction_category_id        =>  p_transaction_category_id
51       ,p_transaction_id                 =>  p_transaction_id
52       ,p_notification_event_cd          =>  p_notification_event_cd
53       ,p_notified_type_cd               =>  p_notified_type_cd
54       ,p_notified_name                  =>  p_notified_name
55       ,p_notification_date              =>  p_notification_date
56       ,p_status                         =>  p_status
57       ,p_effective_date               => trunc(p_effective_date)
58       );
59   exception
60     when hr_api.cannot_find_prog_unit then
61       hr_api.cannot_find_prog_unit_error
62         (
63          p_module_name => 'CREATE_FYI_NOTIFY'
64         ,p_hook_type   => 'BP'
65         );
66     --
67     -- End of API User Hook for the before hook of create_fyi_notify
68     --
69   end;
70   --
71   pqh_fyn_ins.ins
72     (
73      p_fyi_notified_id               => l_fyi_notified_id
74     ,p_transaction_category_id       => p_transaction_category_id
75     ,p_transaction_id                => p_transaction_id
76     ,p_notification_event_cd         => p_notification_event_cd
77     ,p_notified_type_cd              => p_notified_type_cd
78     ,p_notified_name                 => p_notified_name
79     ,p_notification_date             => p_notification_date
80     ,p_status                        => p_status
81     ,p_object_version_number         => l_object_version_number
82     ,p_effective_date                => trunc(p_effective_date)
83     );
84   --
85   begin
86     --
87     -- Start of API User Hook for the after hook of create_fyi_notify
88     --
89     pqh_fyi_notify_bk1.create_fyi_notify_a
90       (
91        p_fyi_notified_id                =>  l_fyi_notified_id
92       ,p_transaction_category_id        =>  p_transaction_category_id
93       ,p_transaction_id                 =>  p_transaction_id
94       ,p_notification_event_cd          =>  p_notification_event_cd
95       ,p_notified_type_cd               =>  p_notified_type_cd
96       ,p_notified_name                  =>  p_notified_name
97       ,p_notification_date              =>  p_notification_date
98       ,p_status                         =>  p_status
99       ,p_object_version_number          =>  l_object_version_number
100       ,p_effective_date                 => trunc(p_effective_date)
101       );
102   exception
103     when hr_api.cannot_find_prog_unit then
104       hr_api.cannot_find_prog_unit_error
105         (p_module_name => 'CREATE_FYI_NOTIFY'
106         ,p_hook_type   => 'AP'
107         );
108     --
109     -- End of API User Hook for the after hook of create_fyi_notify
110     --
111   end;
112   --
113   hr_utility.set_location(l_proc, 60);
114   --
115   -- When in validation only mode raise the Validate_Enabled exception
116   --
117   if p_validate then
118     raise hr_api.validate_enabled;
119   end if;
120   --
121   -- Set all output arguments
122   --
123   p_fyi_notified_id := l_fyi_notified_id;
124   p_object_version_number := l_object_version_number;
125   --
126   hr_utility.set_location(' Leaving:'||l_proc, 70);
127   --
128 exception
129   --
130   when hr_api.validate_enabled then
131     --
132     -- As the Validate_Enabled exception has been raised
133     -- we must rollback to the savepoint
134     --
135     ROLLBACK TO create_fyi_notify;
136     --
137     -- Only set output warning arguments
138     -- (Any key or derived arguments must be set to null
139     -- when validation only mode is being used.)
140     --
141     p_fyi_notified_id := null;
142     p_object_version_number  := null;
143     hr_utility.set_location(' Leaving:'||l_proc, 80);
144     --
145   when others then
146       p_fyi_notified_id := null;
147     p_object_version_number  := null;
148     --
149     -- A validation or unexpected error has occured
150     --
151     ROLLBACK TO create_fyi_notify;
152     raise;
153     --
154 end create_fyi_notify;
155 -- ----------------------------------------------------------------------------
156 -- |------------------------< update_fyi_notify >--- ------------------|
157 -- ----------------------------------------------------------------------------
158 --
159 procedure update_fyi_notify
160   (p_validate                       in  boolean   default false
161   ,p_fyi_notified_id                in  number
162   ,p_transaction_category_id        in  number    default hr_api.g_number
163   ,p_transaction_id                 in  number    default hr_api.g_number
164   ,p_notification_event_cd          in  varchar2  default hr_api.g_varchar2
165   ,p_notified_type_cd               in  varchar2  default hr_api.g_varchar2
166   ,p_notified_name                  in  varchar2  default hr_api.g_varchar2
167   ,p_notification_date              in  date      default hr_api.g_date
168   ,p_status                         in  varchar2  default hr_api.g_varchar2
169   ,p_object_version_number          in out nocopy number
170   ,p_effective_date                 in  date
171   ) is
172   --
173   -- Declare cursors and local variables
174   --
175   l_proc varchar2(72) := g_package||'update_fyi_notify';
176   l_object_version_number pqh_fyi_notify.object_version_number%TYPE;
177   --
178 begin
179   --
180   hr_utility.set_location('Entering:'|| l_proc, 10);
181   --
182   -- Issue a savepoint if operating in validation only mode
183   --
184   savepoint update_fyi_notify;
185   --
186   hr_utility.set_location(l_proc, 20);
187   --
188   -- Process Logic
189   --
190   l_object_version_number := p_object_version_number;
191   --
192   begin
193     --
194     -- Start of API User Hook for the before hook of update_fyi_notify
195     --
196     pqh_fyi_notify_bk2.update_fyi_notify_b
197       (
198        p_fyi_notified_id                =>  p_fyi_notified_id
199       ,p_transaction_category_id        =>  p_transaction_category_id
200       ,p_transaction_id                 =>  p_transaction_id
201       ,p_notification_event_cd          =>  p_notification_event_cd
202       ,p_notified_type_cd               =>  p_notified_type_cd
203       ,p_notified_name                  =>  p_notified_name
204       ,p_notification_date              =>  p_notification_date
205       ,p_status                         =>  p_status
206       ,p_object_version_number          =>  p_object_version_number
207     ,p_effective_date                 => trunc(p_effective_date)
208       );
209   exception
210     when hr_api.cannot_find_prog_unit then
211       hr_api.cannot_find_prog_unit_error
212         (p_module_name => 'UPDATE_FYI_NOTIFY'
213         ,p_hook_type   => 'BP'
214         );
215     --
216     -- End of API User Hook for the before hook of update_fyi_notify
217     --
218   end;
219   --
220   pqh_fyn_upd.upd
221     (
222      p_fyi_notified_id               => p_fyi_notified_id
223     ,p_transaction_category_id       => p_transaction_category_id
224     ,p_transaction_id                => p_transaction_id
225     ,p_notification_event_cd         => p_notification_event_cd
226     ,p_notified_type_cd              => p_notified_type_cd
227     ,p_notified_name                 => p_notified_name
228     ,p_notification_date             => p_notification_date
229     ,p_status                        => p_status
230     ,p_object_version_number         => l_object_version_number
231     ,p_effective_date                => trunc(p_effective_date)
232     );
233   --
234   begin
235     --
236     -- Start of API User Hook for the after hook of update_fyi_notify
237     --
238     pqh_fyi_notify_bk2.update_fyi_notify_a
239       (
240        p_fyi_notified_id                =>  p_fyi_notified_id
241       ,p_transaction_category_id        =>  p_transaction_category_id
242       ,p_transaction_id                 =>  p_transaction_id
243       ,p_notification_event_cd          =>  p_notification_event_cd
244       ,p_notified_type_cd               =>  p_notified_type_cd
245       ,p_notified_name                  =>  p_notified_name
246       ,p_notification_date              =>  p_notification_date
247       ,p_status                         =>  p_status
248       ,p_object_version_number          =>  l_object_version_number
249       ,p_effective_date                => trunc(p_effective_date)
250       );
251   exception
252     when hr_api.cannot_find_prog_unit then
253       hr_api.cannot_find_prog_unit_error
254         (p_module_name => 'UPDATE_FYI_NOTIFY'
255         ,p_hook_type   => 'AP'
256         );
257     --
258     -- End of API User Hook for the after hook of update_fyi_notify
259     --
260   end;
261   --
262   hr_utility.set_location(l_proc, 60);
263   --
264   -- When in validation only mode raise the Validate_Enabled exception
265   --
266   if p_validate then
267     raise hr_api.validate_enabled;
268   end if;
269   --
270   -- Set all output arguments
271   --
272   p_object_version_number := l_object_version_number;
273   --
274   hr_utility.set_location(' Leaving:'||l_proc, 70);
275   --
276 exception
277   --
278   when hr_api.validate_enabled then
279     --
280     -- As the Validate_Enabled exception has been raised
281     -- we must rollback to the savepoint
282     --
283     ROLLBACK TO update_fyi_notify;
284     --
285     -- Only set output warning arguments
286     -- (Any key or derived arguments must be set to null
287     -- when validation only mode is being used.)
288     --
289     hr_utility.set_location(' Leaving:'||l_proc, 80);
290     --
291   when others then
292      p_object_version_number := l_object_version_number;
293     --
294     -- A validation or unexpected error has occured
295     --
296     ROLLBACK TO update_fyi_notify;
297     raise;
298     --
299 end update_fyi_notify;
300 -- ----------------------------------------------------------------------------
301 -- |------------------------< delete_fyi_notify >----------------------|
302 -- ----------------------------------------------------------------------------
303 --
304 procedure delete_fyi_notify
305   (p_validate                       in  boolean  default false
306   ,p_fyi_notified_id                in  number
307   ,p_object_version_number          in  number
308   ,p_effective_date                 in  date
309   ) is
310   --
311   -- Declare cursors and local variables
312   --
313   l_proc varchar2(72) := g_package||'update_fyi_notify';
314   l_object_version_number pqh_fyi_notify.object_version_number%TYPE;
315   --
316 begin
317   --
318   hr_utility.set_location('Entering:'|| l_proc, 10);
319   --
320   -- Issue a savepoint if operating in validation only mode
321   --
322   savepoint delete_fyi_notify;
323   --
324   hr_utility.set_location(l_proc, 20);
325   --
326   -- Process Logic
327   --
328   l_object_version_number := p_object_version_number;
329   --
330   --
331   begin
332     --
333     -- Start of API User Hook for the before hook of delete_fyi_notify
334     --
335     pqh_fyi_notify_bk3.delete_fyi_notify_b
336       (
340       );
337        p_fyi_notified_id                =>  p_fyi_notified_id
338       ,p_object_version_number          =>  p_object_version_number
339     ,p_effective_date                      => trunc(p_effective_date)
341   exception
342     when hr_api.cannot_find_prog_unit then
343       hr_api.cannot_find_prog_unit_error
344         (p_module_name => 'DELETE_FYI_NOTIFY'
345         ,p_hook_type   => 'BP'
346         );
347     --
348     -- End of API User Hook for the before hook of delete_fyi_notify
349     --
350   end;
351   --
352   pqh_fyn_del.del
353     (
354      p_fyi_notified_id               => p_fyi_notified_id
355     ,p_object_version_number         => l_object_version_number
356     ,p_effective_date                => p_effective_date
357     );
358   --
359   begin
360     --
361     -- Start of API User Hook for the after hook of delete_fyi_notify
362     --
363     pqh_fyi_notify_bk3.delete_fyi_notify_a
364       (
365        p_fyi_notified_id                =>  p_fyi_notified_id
366       ,p_object_version_number          =>  l_object_version_number
367     ,p_effective_date                      => trunc(p_effective_date)
368       );
369   exception
370     when hr_api.cannot_find_prog_unit then
371       hr_api.cannot_find_prog_unit_error
372         (p_module_name => 'DELETE_FYI_NOTIFY'
373         ,p_hook_type   => 'AP'
374         );
375     --
376     -- End of API User Hook for the after hook of delete_fyi_notify
377     --
378   end;
379   --
380   hr_utility.set_location(l_proc, 60);
381   --
382   -- When in validation only mode raise the Validate_Enabled exception
383   --
384   if p_validate then
385     raise hr_api.validate_enabled;
386   end if;
387   --
388   hr_utility.set_location(' Leaving:'||l_proc, 70);
389   --
390 exception
391   --
392   when hr_api.validate_enabled then
393     --
394     -- As the Validate_Enabled exception has been raised
395     -- we must rollback to the savepoint
396     --
397     ROLLBACK TO delete_fyi_notify;
398     --
399     -- Only set output warning arguments
400     -- (Any key or derived arguments must be set to null
401     -- when validation only mode is being used.)
402     --
403     --
404   when others then
405     --
406     -- A validation or unexpected error has occured
407     --
408     ROLLBACK TO delete_fyi_notify;
409     raise;
410     --
411 end delete_fyi_notify;
412 --
413 -- ----------------------------------------------------------------------------
414 -- |-------------------------------< lck >------------------------------------|
415 -- ----------------------------------------------------------------------------
416 --
417 procedure lck
418   (
419    p_fyi_notified_id                   in     number
420   ,p_object_version_number          in     number
421   ) is
422   --
423   --
424   -- Declare cursors and local variables
425   --
426   l_proc varchar2(72) := g_package||'lck';
427   --
428 begin
429   --
430   hr_utility.set_location('Entering:'|| l_proc, 10);
431   --
432   pqh_fyn_shd.lck
433     (
434       p_fyi_notified_id                 => p_fyi_notified_id
435      ,p_object_version_number      => p_object_version_number
436     );
437   --
438   hr_utility.set_location(' Leaving:'||l_proc, 70);
439   --
440 end lck;
441 --
442 end pqh_fyi_notify_api;