DBA Data[Home] [Help]

PACKAGE BODY: APPS.PQH_PTX_INFO_TYPES_API

Source


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