DBA Data[Home] [Help]

PACKAGE BODY: APPS.PQP_VEH_REPOS_EXTRA_INFO_SWI

Source


1 Package Body pqp_veh_repos_extra_info_swi As
2 /* $Header: pqvriswi.pkb 120.0 2005/05/29 02:19 appldev noship $ */
3 --
4 -- Package variables
5 --
6 g_package  varchar2(33) := 'pqp_veh_repos_extra_info_swi.';
7 --
8 -- ----------------------------------------------------------------------------
9 -- |----------------------< create_veh_repos_extra_info >---------------------|
10 -- ----------------------------------------------------------------------------
11 PROCEDURE create_veh_repos_extra_info
12   (p_validate                     in     number
13   ,p_vehicle_repository_id        in     number
14   ,p_information_type             in     varchar2
15   ,p_vrei_attribute_category      in     varchar2
16   ,p_vrei_attribute1              in     varchar2
17   ,p_vrei_attribute2              in     varchar2
18   ,p_vrei_attribute3              in     varchar2
19   ,p_vrei_attribute4              in     varchar2
20   ,p_vrei_attribute5              in     varchar2
21   ,p_vrei_attribute6              in     varchar2
22   ,p_vrei_attribute7              in     varchar2
23   ,p_vrei_attribute8              in     varchar2
24   ,p_vrei_attribute9              in     varchar2
25   ,p_vrei_attribute10             in     varchar2
26   ,p_vrei_attribute11             in     varchar2
27   ,p_vrei_attribute12             in     varchar2
28   ,p_vrei_attribute13             in     varchar2
29   ,p_vrei_attribute14             in     varchar2
30   ,p_vrei_attribute15             in     varchar2
31   ,p_vrei_attribute16             in     varchar2
32   ,p_vrei_attribute17             in     varchar2
33   ,p_vrei_attribute18             in     varchar2
34   ,p_vrei_attribute19             in     varchar2
35   ,p_vrei_attribute20             in     varchar2
36   ,p_vrei_information_category    in     varchar2
37   ,p_vrei_information1            in     varchar2
38   ,p_vrei_information2            in     varchar2
39   ,p_vrei_information3            in     varchar2
40   ,p_vrei_information4            in     varchar2
41   ,p_vrei_information5            in     varchar2
42   ,p_vrei_information6            in     varchar2
43   ,p_vrei_information7            in     varchar2
44   ,p_vrei_information8            in     varchar2
45   ,p_vrei_information9            in     varchar2
46   ,p_vrei_information10           in     varchar2
47   ,p_vrei_information11           in     varchar2
48   ,p_vrei_information12           in     varchar2
49   ,p_vrei_information13           in     varchar2
50   ,p_vrei_information14           in     varchar2
51   ,p_vrei_information15           in     varchar2
52   ,p_vrei_information16           in     varchar2
53   ,p_vrei_information17           in     varchar2
54   ,p_vrei_information18           in     varchar2
55   ,p_vrei_information19           in     varchar2
56   ,p_vrei_information20           in     varchar2
57   ,p_vrei_information21           in     varchar2
58   ,p_vrei_information22           in     varchar2
59   ,p_vrei_information23           in     varchar2
60   ,p_vrei_information24           in     varchar2
61   ,p_vrei_information25           in     varchar2
62   ,p_vrei_information26           in     varchar2
63   ,p_vrei_information27           in     varchar2
64   ,p_vrei_information28           in     varchar2
65   ,p_vrei_information29           in     varchar2
66   ,p_vrei_information30           in     varchar2
67   ,p_request_id                   in     number
68   ,p_program_application_id       in     number
69   ,p_program_id                   in     number
70   ,p_program_update_date          in     date
71   ,p_veh_repos_extra_info_id         out nocopy   number
72   ,p_object_version_number           out nocopy number
73   ,p_return_status                   out nocopy varchar2
74   ) is
75   --
76   -- Variables for API Boolean parameters
77   l_validate                      boolean;
78   --
79   -- Variables for IN/OUT parameters
80   --
81   -- Other variables
82   l_veh_repos_extra_info_id      number;
83   l_proc    varchar2(72) := g_package ||'create_veh_repos_extra_info';
84 Begin
85   hr_utility.set_location(' Entering:' || l_proc,10);
86   --
87   -- Issue a savepoint
88   --
89   savepoint create_veh_repos_xtra_info_swi;
90   --
91   -- Initialise Multiple Message Detection
92   --
93   hr_multi_message.enable_message_list;
94   --
95   -- Remember IN OUT parameter IN values
96   --
97   --
98   -- Convert constant values to their corresponding boolean value
99   --
100   l_validate :=
101     hr_api.constant_to_boolean
102       (p_constant_value => p_validate);
103   --
104   -- Register Surrogate ID or user key values
105   --
106   pqp_vri_ins.set_base_key_value
107     (p_veh_repos_extra_info_id => p_veh_repos_extra_info_id
108     );
109   --
110   -- Call API
111   --
112   pqp_veh_repos_extra_info_api.create_veh_repos_extra_info
113     (p_validate                     => l_validate
114     ,p_vehicle_repository_id        => p_vehicle_repository_id
115     ,p_information_type             => p_information_type
116     ,p_vrei_attribute_category      => p_vrei_attribute_category
117     ,p_vrei_attribute1              => p_vrei_attribute1
118     ,p_vrei_attribute2              => p_vrei_attribute2
119     ,p_vrei_attribute3              => p_vrei_attribute3
120     ,p_vrei_attribute4              => p_vrei_attribute4
121     ,p_vrei_attribute5              => p_vrei_attribute5
122     ,p_vrei_attribute6              => p_vrei_attribute6
123     ,p_vrei_attribute7              => p_vrei_attribute7
124     ,p_vrei_attribute8              => p_vrei_attribute8
125     ,p_vrei_attribute9              => p_vrei_attribute9
126     ,p_vrei_attribute10             => p_vrei_attribute10
127     ,p_vrei_attribute11             => p_vrei_attribute11
128     ,p_vrei_attribute12             => p_vrei_attribute12
129     ,p_vrei_attribute13             => p_vrei_attribute13
130     ,p_vrei_attribute14             => p_vrei_attribute14
131     ,p_vrei_attribute15             => p_vrei_attribute15
132     ,p_vrei_attribute16             => p_vrei_attribute16
133     ,p_vrei_attribute17             => p_vrei_attribute17
134     ,p_vrei_attribute18             => p_vrei_attribute18
135     ,p_vrei_attribute19             => p_vrei_attribute19
136     ,p_vrei_attribute20             => p_vrei_attribute20
137     ,p_vrei_information_category    => p_vrei_information_category
138     ,p_vrei_information1            => p_vrei_information1
139     ,p_vrei_information2            => p_vrei_information2
140     ,p_vrei_information3            => p_vrei_information3
141     ,p_vrei_information4            => p_vrei_information4
142     ,p_vrei_information5            => p_vrei_information5
143     ,p_vrei_information6            => p_vrei_information6
144     ,p_vrei_information7            => p_vrei_information7
145     ,p_vrei_information8            => p_vrei_information8
146     ,p_vrei_information9            => p_vrei_information9
147     ,p_vrei_information10           => p_vrei_information10
148     ,p_vrei_information11           => p_vrei_information11
149     ,p_vrei_information12           => p_vrei_information12
150     ,p_vrei_information13           => p_vrei_information13
151     ,p_vrei_information14           => p_vrei_information14
152     ,p_vrei_information15           => p_vrei_information15
153     ,p_vrei_information16           => p_vrei_information16
154     ,p_vrei_information17           => p_vrei_information17
155     ,p_vrei_information18           => p_vrei_information18
156     ,p_vrei_information19           => p_vrei_information19
157     ,p_vrei_information20           => p_vrei_information20
158     ,p_vrei_information21           => p_vrei_information21
159     ,p_vrei_information22           => p_vrei_information22
160     ,p_vrei_information23           => p_vrei_information23
161     ,p_vrei_information24           => p_vrei_information24
162     ,p_vrei_information25           => p_vrei_information25
163     ,p_vrei_information26           => p_vrei_information26
164     ,p_vrei_information27           => p_vrei_information27
165     ,p_vrei_information28           => p_vrei_information28
166     ,p_vrei_information29           => p_vrei_information29
167     ,p_vrei_information30           => p_vrei_information30
168     ,p_request_id                   => p_request_id
169     ,p_program_application_id       => p_program_application_id
170     ,p_program_id                   => p_program_id
171     ,p_program_update_date          => p_program_update_date
172     ,p_veh_repos_extra_info_id      => l_veh_repos_extra_info_id
173     ,p_object_version_number        => p_object_version_number
174     );
175   --
176   -- Convert API warning boolean parameter values to specific
177   -- messages and add them to Multiple Message List
178   --
179   --
180   -- Convert API non-warning boolean parameter values
181   --
182   --
183   -- Derive the API return status value based on whether
184   -- messages of any type exist in the Multiple Message List.
185   -- Also disable Multiple Message Detection.
186   --
187   p_return_status := hr_multi_message.get_return_status_disable;
188   hr_utility.set_location(' Leaving:' || l_proc,20);
189   --
190 exception
191   when hr_multi_message.error_message_exist then
192     --
193     -- Catch the Multiple Message List exception which
194     -- indicates API processing has been aborted because
195     -- at least one message exists in the list.
196     --
197     rollback to create_veh_repos_xtra_info_swi;
198     --
199     -- Reset IN OUT parameters and set OUT parameters
200     --
201     p_object_version_number        := null;
202     p_return_status := hr_multi_message.get_return_status_disable;
203     hr_utility.set_location(' Leaving:' || l_proc, 30);
204   when others then
205     --
206     -- When Multiple Message Detection is enabled catch
207     -- any Application specific or other unexpected
208     -- exceptions.  Adding appropriate details to the
209     -- Multiple Message List.  Otherwise re-raise the
210     -- error.
211     --
212     rollback to create_veh_repos_xtra_info_swi;
213     if hr_multi_message.unexpected_error_add(l_proc) then
214        hr_utility.set_location(' Leaving:' || l_proc,40);
215        raise;
216     end if;
217     --
218     -- Reset IN OUT and set OUT parameters
219     --
220     p_object_version_number        := null;
221     p_return_status := hr_multi_message.get_return_status_disable;
222     hr_utility.set_location(' Leaving:' || l_proc,50);
223 end create_veh_repos_extra_info;
224 -- ----------------------------------------------------------------------------
225 -- |----------------------< update_veh_repos_extra_info >---------------------|
226 -- ----------------------------------------------------------------------------
227 PROCEDURE update_veh_repos_extra_info
228   (p_validate                     in     number
229   ,p_veh_repos_extra_info_id      in     number
230   ,p_object_version_number        in out nocopy number
231   ,p_vehicle_repository_id        in     number
232   ,p_information_type             in     varchar2
233   ,p_vrei_attribute_category      in     varchar2
234   ,p_vrei_attribute1              in     varchar2
235   ,p_vrei_attribute2              in     varchar2
236   ,p_vrei_attribute3              in     varchar2
237   ,p_vrei_attribute4              in     varchar2
238   ,p_vrei_attribute5              in     varchar2
239   ,p_vrei_attribute6              in     varchar2
240   ,p_vrei_attribute7              in     varchar2
241   ,p_vrei_attribute8              in     varchar2
242   ,p_vrei_attribute9              in     varchar2
243   ,p_vrei_attribute10             in     varchar2
244   ,p_vrei_attribute11             in     varchar2
245   ,p_vrei_attribute12             in     varchar2
246   ,p_vrei_attribute13             in     varchar2
247   ,p_vrei_attribute14             in     varchar2
248   ,p_vrei_attribute15             in     varchar2
249   ,p_vrei_attribute16             in     varchar2
250   ,p_vrei_attribute17             in     varchar2
251   ,p_vrei_attribute18             in     varchar2
252   ,p_vrei_attribute19             in     varchar2
253   ,p_vrei_attribute20             in     varchar2
254   ,p_vrei_information_category    in     varchar2
255   ,p_vrei_information1            in     varchar2
256   ,p_vrei_information2            in     varchar2
257   ,p_vrei_information3            in     varchar2
258   ,p_vrei_information4            in     varchar2
259   ,p_vrei_information5            in     varchar2
260   ,p_vrei_information6            in     varchar2
261   ,p_vrei_information7            in     varchar2
262   ,p_vrei_information8            in     varchar2
263   ,p_vrei_information9            in     varchar2
264   ,p_vrei_information10           in     varchar2
265   ,p_vrei_information11           in     varchar2
266   ,p_vrei_information12           in     varchar2
267   ,p_vrei_information13           in     varchar2
268   ,p_vrei_information14           in     varchar2
269   ,p_vrei_information15           in     varchar2
270   ,p_vrei_information16           in     varchar2
271   ,p_vrei_information17           in     varchar2
272   ,p_vrei_information18           in     varchar2
273   ,p_vrei_information19           in     varchar2
274   ,p_vrei_information20           in     varchar2
275   ,p_vrei_information21           in     varchar2
276   ,p_vrei_information22           in     varchar2
277   ,p_vrei_information23           in     varchar2
278   ,p_vrei_information24           in     varchar2
279   ,p_vrei_information25           in     varchar2
280   ,p_vrei_information26           in     varchar2
281   ,p_vrei_information27           in     varchar2
282   ,p_vrei_information28           in     varchar2
283   ,p_vrei_information29           in     varchar2
284   ,p_vrei_information30           in     varchar2
285   ,p_request_id                   in     number
286   ,p_program_application_id       in     number
287   ,p_program_id                   in     number
288   ,p_program_update_date          in     date
289   ,p_return_status                   out nocopy varchar2
290   ) is
291   --
292   -- Variables for API Boolean parameters
293   l_validate                      boolean;
294   --
295   -- Variables for IN/OUT parameters
296   l_object_version_number         number;
297   --
298   -- Other variables
299   l_proc    varchar2(72) := g_package ||'update_veh_repos_extra_info';
300 Begin
301   hr_utility.set_location(' Entering:' || l_proc,10);
302   --
303   -- Issue a savepoint
304   --
305   savepoint update_veh_repos_xtra_info_swi;
306   --
307   -- Initialise Multiple Message Detection
308   --
309   hr_multi_message.enable_message_list;
310   --
311   -- Remember IN OUT parameter IN values
312   --
313   l_object_version_number         := p_object_version_number;
314   --
315   -- Convert constant values to their corresponding boolean value
316   --
317   l_validate :=
318     hr_api.constant_to_boolean
319       (p_constant_value => p_validate);
320   --
321   -- Register Surrogate ID or user key values
322   --
323   --
324   -- Call API
325   --
326   pqp_veh_repos_extra_info_api.update_veh_repos_extra_info
327     (p_validate                     => l_validate
328     ,p_veh_repos_extra_info_id      => p_veh_repos_extra_info_id
329     ,p_object_version_number        => p_object_version_number
330     ,p_vehicle_repository_id        => p_vehicle_repository_id
331     ,p_information_type             => p_information_type
332     ,p_vrei_attribute_category      => p_vrei_attribute_category
333     ,p_vrei_attribute1              => p_vrei_attribute1
334     ,p_vrei_attribute2              => p_vrei_attribute2
335     ,p_vrei_attribute3              => p_vrei_attribute3
336     ,p_vrei_attribute4              => p_vrei_attribute4
337     ,p_vrei_attribute5              => p_vrei_attribute5
338     ,p_vrei_attribute6              => p_vrei_attribute6
339     ,p_vrei_attribute7              => p_vrei_attribute7
340     ,p_vrei_attribute8              => p_vrei_attribute8
341     ,p_vrei_attribute9              => p_vrei_attribute9
342     ,p_vrei_attribute10             => p_vrei_attribute10
343     ,p_vrei_attribute11             => p_vrei_attribute11
344     ,p_vrei_attribute12             => p_vrei_attribute12
345     ,p_vrei_attribute13             => p_vrei_attribute13
346     ,p_vrei_attribute14             => p_vrei_attribute14
347     ,p_vrei_attribute15             => p_vrei_attribute15
348     ,p_vrei_attribute16             => p_vrei_attribute16
349     ,p_vrei_attribute17             => p_vrei_attribute17
350     ,p_vrei_attribute18             => p_vrei_attribute18
351     ,p_vrei_attribute19             => p_vrei_attribute19
352     ,p_vrei_attribute20             => p_vrei_attribute20
353     ,p_vrei_information_category    => p_vrei_information_category
354     ,p_vrei_information1            => p_vrei_information1
355     ,p_vrei_information2            => p_vrei_information2
356     ,p_vrei_information3            => p_vrei_information3
357     ,p_vrei_information4            => p_vrei_information4
358     ,p_vrei_information5            => p_vrei_information5
359     ,p_vrei_information6            => p_vrei_information6
360     ,p_vrei_information7            => p_vrei_information7
361     ,p_vrei_information8            => p_vrei_information8
362     ,p_vrei_information9            => p_vrei_information9
363     ,p_vrei_information10           => p_vrei_information10
364     ,p_vrei_information11           => p_vrei_information11
365     ,p_vrei_information12           => p_vrei_information12
366     ,p_vrei_information13           => p_vrei_information13
367     ,p_vrei_information14           => p_vrei_information14
368     ,p_vrei_information15           => p_vrei_information15
369     ,p_vrei_information16           => p_vrei_information16
370     ,p_vrei_information17           => p_vrei_information17
371     ,p_vrei_information18           => p_vrei_information18
372     ,p_vrei_information19           => p_vrei_information19
373     ,p_vrei_information20           => p_vrei_information20
374     ,p_vrei_information21           => p_vrei_information21
375     ,p_vrei_information22           => p_vrei_information22
376     ,p_vrei_information23           => p_vrei_information23
377     ,p_vrei_information24           => p_vrei_information24
378     ,p_vrei_information25           => p_vrei_information25
379     ,p_vrei_information26           => p_vrei_information26
380     ,p_vrei_information27           => p_vrei_information27
381     ,p_vrei_information28           => p_vrei_information28
382     ,p_vrei_information29           => p_vrei_information29
383     ,p_vrei_information30           => p_vrei_information30
384     ,p_request_id                   => p_request_id
385     ,p_program_application_id       => p_program_application_id
386     ,p_program_id                   => p_program_id
387     ,p_program_update_date          => p_program_update_date
388     );
389   --
390   -- Convert API warning boolean parameter values to specific
391   -- messages and add them to Multiple Message List
392   --
393   --
394   -- Convert API non-warning boolean parameter values
395   --
396   --
397   -- Derive the API return status value based on whether
398   -- messages of any type exist in the Multiple Message List.
399   -- Also disable Multiple Message Detection.
400   --
401   p_return_status := hr_multi_message.get_return_status_disable;
402   hr_utility.set_location(' Leaving:' || l_proc,20);
403   --
404 exception
405   when hr_multi_message.error_message_exist then
406     --
407     -- Catch the Multiple Message List exception which
408     -- indicates API processing has been aborted because
409     -- at least one message exists in the list.
410     --
411     rollback to update_veh_repos_xtra_info_swi;
412     --
413     -- Reset IN OUT parameters and set OUT parameters
414     --
415     p_object_version_number        := l_object_version_number;
416     p_return_status := hr_multi_message.get_return_status_disable;
417     hr_utility.set_location(' Leaving:' || l_proc, 30);
418   when others then
419     --
420     -- When Multiple Message Detection is enabled catch
421     -- any Application specific or other unexpected
422     -- exceptions.  Adding appropriate details to the
423     -- Multiple Message List.  Otherwise re-raise the
424     -- error.
425     --
426     rollback to update_veh_repos_xtra_info_swi;
427     if hr_multi_message.unexpected_error_add(l_proc) then
428        hr_utility.set_location(' Leaving:' || l_proc,40);
429        raise;
430     end if;
431     --
432     -- Reset IN OUT and set OUT parameters
433     --
434     p_object_version_number        := l_object_version_number;
435     p_return_status := hr_multi_message.get_return_status_disable;
436     hr_utility.set_location(' Leaving:' || l_proc,50);
437 end update_veh_repos_extra_info;
438 -- ----------------------------------------------------------------------------
439 -- |----------------------< delete_veh_repos_extra_info >---------------------|
440 -- ----------------------------------------------------------------------------
441 PROCEDURE delete_veh_repos_extra_info
442   (p_validate                     in     number
443   ,p_veh_repos_extra_info_id      in     number
444   ,p_object_version_number        in     number
445   ,p_return_status                   out nocopy varchar2
446   ) is
447   --
448   -- Variables for API Boolean parameters
449   l_validate                      boolean;
450   --
451   -- Variables for IN/OUT parameters
452   --
453   -- Other variables
454   l_proc    varchar2(72) := g_package ||'delete_veh_repos_extra_info';
455 Begin
456   hr_utility.set_location(' Entering:' || l_proc,10);
457   --
458   -- Issue a savepoint
459   --
460   savepoint delete_veh_repos_xtra_info_swi;
461   --
462   -- Initialise Multiple Message Detection
463   --
464   hr_multi_message.enable_message_list;
465   --
466   -- Remember IN OUT parameter IN values
467   --
468   --
469   -- Convert constant values to their corresponding boolean value
470   --
471   l_validate :=
472     hr_api.constant_to_boolean
473       (p_constant_value => p_validate);
474   --
475   -- Register Surrogate ID or user key values
476   --
477   --
478   -- Call API
479   --
480   pqp_veh_repos_extra_info_api.delete_veh_repos_extra_info
481     (p_validate                     => l_validate
482     ,p_veh_repos_extra_info_id      => p_veh_repos_extra_info_id
483     ,p_object_version_number        => p_object_version_number
484     );
485   --
486   -- Convert API warning boolean parameter values to specific
487   -- messages and add them to Multiple Message List
488   --
489   --
490   -- Convert API non-warning boolean parameter values
491   --
492   --
493   -- Derive the API return status value based on whether
494   -- messages of any type exist in the Multiple Message List.
495   -- Also disable Multiple Message Detection.
496   --
497   p_return_status := hr_multi_message.get_return_status_disable;
498   hr_utility.set_location(' Leaving:' || l_proc,20);
499   --
500 exception
501   when hr_multi_message.error_message_exist then
502     --
503     -- Catch the Multiple Message List exception which
504     -- indicates API processing has been aborted because
505     -- at least one message exists in the list.
506     --
507     rollback to delete_veh_repos_xtra_info_swi;
508     --
509     -- Reset IN OUT parameters and set OUT parameters
510     --
511     p_return_status := hr_multi_message.get_return_status_disable;
512     hr_utility.set_location(' Leaving:' || l_proc, 30);
513   when others then
514     --
515     -- When Multiple Message Detection is enabled catch
516     -- any Application specific or other unexpected
517     -- exceptions.  Adding appropriate details to the
518     -- Multiple Message List.  Otherwise re-raise the
519     -- error.
520     --
521     rollback to delete_veh_repos_xtra_info_swi;
522     if hr_multi_message.unexpected_error_add(l_proc) then
523        hr_utility.set_location(' Leaving:' || l_proc,40);
524        raise;
525     end if;
526     --
527     -- Reset IN OUT and set OUT parameters
528     --
529     p_return_status := hr_multi_message.get_return_status_disable;
530     hr_utility.set_location(' Leaving:' || l_proc,50);
531 end delete_veh_repos_extra_info;
532 end pqp_veh_repos_extra_info_swi;