DBA Data[Home] [Help]

PACKAGE BODY: APPS.PQH_TXN_CAT_ATTRIBUTES_API

Source


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