DBA Data[Home] [Help]

PACKAGE BODY: APPS.BEN_EXT_ELMT_DECD_API

Source


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