[Home] [Help]
PACKAGE BODY: APPS.PQH_COPY_ENTITY_ATTRIBS_SWI
Source
1 Package Body pqh_copy_entity_attribs_swi As
2 /* $Header: pqceaswi.pkb 115.0 2003/07/30 11:42 rpasapul noship $ */
3 --
4 -- Package variables
5 --
6 g_package varchar2(33) := 'pqh_copy_entity_attribs_swi.';
7 --
8 -- ----------------------------------------------------------------------------
9 -- |-----------------------< create_copy_entity_attrib >----------------------|
10 -- ----------------------------------------------------------------------------
11 PROCEDURE create_copy_entity_attrib
12 (p_validate in number default hr_api.g_false_num
13 ,p_copy_entity_attrib_id out nocopy number
14 ,p_copy_entity_txn_id in number default null
15 ,p_row_type_cd in varchar2 default null
16 ,p_information_category in varchar2 default null
17 ,p_information1 in varchar2 default null
18 ,p_information2 in varchar2 default null
19 ,p_information3 in varchar2 default null
20 ,p_information4 in varchar2 default null
21 ,p_information5 in varchar2 default null
22 ,p_information6 in varchar2 default null
23 ,p_information7 in varchar2 default null
24 ,p_information8 in varchar2 default null
25 ,p_information9 in varchar2 default null
26 ,p_information10 in varchar2 default null
27 ,p_information11 in varchar2 default null
28 ,p_information12 in varchar2 default null
29 ,p_information13 in varchar2 default null
30 ,p_information14 in varchar2 default null
31 ,p_information15 in varchar2 default null
32 ,p_information16 in varchar2 default null
33 ,p_information17 in varchar2 default null
34 ,p_information18 in varchar2 default null
35 ,p_information19 in varchar2 default null
36 ,p_information20 in varchar2 default null
37 ,p_information21 in varchar2 default null
38 ,p_information22 in varchar2 default null
39 ,p_information23 in varchar2 default null
40 ,p_information24 in varchar2 default null
41 ,p_information25 in varchar2 default null
42 ,p_information26 in varchar2 default null
43 ,p_information27 in varchar2 default null
44 ,p_information28 in varchar2 default null
45 ,p_information29 in varchar2 default null
46 ,p_information30 in varchar2 default null
47 ,p_object_version_number out nocopy number
48 ,p_effective_date in date
49 ,p_return_status out nocopy varchar2
50 ) is
51 --
52 -- Variables for API Boolean parameters
53 l_validate boolean;
54 --
55 -- Variables for IN/OUT parameters
56 --
57 -- Other variables
58 l_proc varchar2(72) := g_package ||'create_copy_entity_attrib';
59 Begin
60 hr_utility.set_location(' Entering:' || l_proc,10);
61 --
62 -- Issue a savepoint
63 --
64 savepoint create_copy_entity_attrib_swi;
65 --
66 -- Initialise Multiple Message Detection
67 --
68 hr_multi_message.enable_message_list;
69 --
70 -- Remember IN OUT parameter IN values
71 --
72 --
73 -- Convert constant values to their corresponding boolean value
74 --
75 l_validate :=
76 hr_api.constant_to_boolean
77 (p_constant_value => p_validate);
78 --
79 -- Register Surrogate ID or user key values
80 --
81 --
82 -- Call API
83 --
84 pqh_copy_entity_attribs_api.create_copy_entity_attrib
85 (p_validate => l_validate
86 ,p_copy_entity_attrib_id => p_copy_entity_attrib_id
87 ,p_copy_entity_txn_id => p_copy_entity_txn_id
88 ,p_row_type_cd => p_row_type_cd
89 ,p_information_category => p_information_category
90 ,p_information1 => p_information1
91 ,p_information2 => p_information2
92 ,p_information3 => p_information3
93 ,p_information4 => p_information4
94 ,p_information5 => p_information5
95 ,p_information6 => p_information6
96 ,p_information7 => p_information7
97 ,p_information8 => p_information8
98 ,p_information9 => p_information9
99 ,p_information10 => p_information10
100 ,p_information11 => p_information11
101 ,p_information12 => p_information12
102 ,p_information13 => p_information13
103 ,p_information14 => p_information14
104 ,p_information15 => p_information15
105 ,p_information16 => p_information16
106 ,p_information17 => p_information17
107 ,p_information18 => p_information18
108 ,p_information19 => p_information19
109 ,p_information20 => p_information20
110 ,p_information21 => p_information21
111 ,p_information22 => p_information22
112 ,p_information23 => p_information23
113 ,p_information24 => p_information24
114 ,p_information25 => p_information25
115 ,p_information26 => p_information26
116 ,p_information27 => p_information27
117 ,p_information28 => p_information28
118 ,p_information29 => p_information29
119 ,p_information30 => p_information30
120 ,p_object_version_number => p_object_version_number
121 ,p_effective_date => p_effective_date
122 );
123 --
124 -- Convert API warning boolean parameter values to specific
125 -- messages and add them to Multiple Message List
126 --
127 --
128 -- Convert API non-warning boolean parameter values
129 --
130 --
131 -- Derive the API return status value based on whether
132 -- messages of any type exist in the Multiple Message List.
133 -- Also disable Multiple Message Detection.
134 --
135 p_return_status := hr_multi_message.get_return_status_disable;
136 hr_utility.set_location(' Leaving:' || l_proc,20);
137 --
138 exception
139 when hr_multi_message.error_message_exist then
140 --
141 -- Catch the Multiple Message List exception which
142 -- indicates API processing has been aborted because
143 -- at least one message exists in the list.
144 --
145 rollback to create_copy_entity_attrib_swi;
146 --
147 -- Reset IN OUT parameters and set OUT parameters
148 --
149 p_copy_entity_attrib_id := null;
150 p_object_version_number := null;
151 p_return_status := hr_multi_message.get_return_status_disable;
152 hr_utility.set_location(' Leaving:' || l_proc, 30);
153 when others then
154 --
155 -- When Multiple Message Detection is enabled catch
156 -- any Application specific or other unexpected
157 -- exceptions. Adding appropriate details to the
158 -- Multiple Message List. Otherwise re-raise the
159 -- error.
160 --
161 rollback to create_copy_entity_attrib_swi;
162 if hr_multi_message.unexpected_error_add(l_proc) then
163 hr_utility.set_location(' Leaving:' || l_proc,40);
164 raise;
165 end if;
166 --
167 -- Reset IN OUT and set OUT parameters
168 --
169 p_copy_entity_attrib_id := null;
170 p_object_version_number := null;
171 p_return_status := hr_multi_message.get_return_status_disable;
172 hr_utility.set_location(' Leaving:' || l_proc,50);
173 end create_copy_entity_attrib;
174 -- ----------------------------------------------------------------------------
175 -- |-----------------------< delete_copy_entity_attrib >----------------------|
176 -- ----------------------------------------------------------------------------
177 PROCEDURE delete_copy_entity_attrib
178 (p_validate in number default hr_api.g_false_num
179 ,p_copy_entity_attrib_id in number
180 ,p_object_version_number in number
181 ,p_effective_date in date
182 ,p_return_status out nocopy varchar2
183 ) is
184 --
185 -- Variables for API Boolean parameters
186 l_validate boolean;
187 --
188 -- Variables for IN/OUT parameters
189 --
190 -- Other variables
191 l_proc varchar2(72) := g_package ||'delete_copy_entity_attrib';
192 Begin
193 hr_utility.set_location(' Entering:' || l_proc,10);
194 --
195 -- Issue a savepoint
196 --
197 savepoint delete_copy_entity_attrib_swi;
198 --
199 -- Initialise Multiple Message Detection
200 --
201 hr_multi_message.enable_message_list;
202 --
203 -- Remember IN OUT parameter IN values
204 --
205 --
206 -- Convert constant values to their corresponding boolean value
207 --
208 l_validate :=
209 hr_api.constant_to_boolean
210 (p_constant_value => p_validate);
211 --
212 -- Register Surrogate ID or user key values
213 --
214 --
215 -- Call API
216 --
217 pqh_copy_entity_attribs_api.delete_copy_entity_attrib
218 (p_validate => l_validate
219 ,p_copy_entity_attrib_id => p_copy_entity_attrib_id
220 ,p_object_version_number => p_object_version_number
221 ,p_effective_date => p_effective_date
222 );
223 --
224 -- Convert API warning boolean parameter values to specific
225 -- messages and add them to Multiple Message List
226 --
227 --
228 -- Convert API non-warning boolean parameter values
229 --
230 --
231 -- Derive the API return status value based on whether
232 -- messages of any type exist in the Multiple Message List.
233 -- Also disable Multiple Message Detection.
234 --
235 p_return_status := hr_multi_message.get_return_status_disable;
236 hr_utility.set_location(' Leaving:' || l_proc,20);
237 --
238 exception
239 when hr_multi_message.error_message_exist then
240 --
241 -- Catch the Multiple Message List exception which
242 -- indicates API processing has been aborted because
243 -- at least one message exists in the list.
244 --
245 rollback to delete_copy_entity_attrib_swi;
246 --
247 -- Reset IN OUT parameters and set OUT parameters
248 --
249 p_return_status := hr_multi_message.get_return_status_disable;
250 hr_utility.set_location(' Leaving:' || l_proc, 30);
251 when others then
252 --
253 -- When Multiple Message Detection is enabled catch
254 -- any Application specific or other unexpected
255 -- exceptions. Adding appropriate details to the
256 -- Multiple Message List. Otherwise re-raise the
257 -- error.
258 --
259 rollback to delete_copy_entity_attrib_swi;
260 if hr_multi_message.unexpected_error_add(l_proc) then
261 hr_utility.set_location(' Leaving:' || l_proc,40);
262 raise;
263 end if;
264 --
265 -- Reset IN OUT and set OUT parameters
266 --
267 p_return_status := hr_multi_message.get_return_status_disable;
268 hr_utility.set_location(' Leaving:' || l_proc,50);
269 end delete_copy_entity_attrib;
270 -- ----------------------------------------------------------------------------
271 -- |-----------------------< update_copy_entity_attrib >----------------------|
272 -- ----------------------------------------------------------------------------
273 PROCEDURE update_copy_entity_attrib
274 (p_validate in number default hr_api.g_false_num
275 ,p_copy_entity_attrib_id in number
276 ,p_copy_entity_txn_id in number default hr_api.g_number
277 ,p_row_type_cd in varchar2 default hr_api.g_varchar2
278 ,p_information_category in varchar2 default hr_api.g_varchar2
279 ,p_information1 in varchar2 default hr_api.g_varchar2
280 ,p_information2 in varchar2 default hr_api.g_varchar2
281 ,p_information3 in varchar2 default hr_api.g_varchar2
282 ,p_information4 in varchar2 default hr_api.g_varchar2
283 ,p_information5 in varchar2 default hr_api.g_varchar2
284 ,p_information6 in varchar2 default hr_api.g_varchar2
285 ,p_information7 in varchar2 default hr_api.g_varchar2
286 ,p_information8 in varchar2 default hr_api.g_varchar2
287 ,p_information9 in varchar2 default hr_api.g_varchar2
288 ,p_information10 in varchar2 default hr_api.g_varchar2
289 ,p_information11 in varchar2 default hr_api.g_varchar2
290 ,p_information12 in varchar2 default hr_api.g_varchar2
291 ,p_information13 in varchar2 default hr_api.g_varchar2
292 ,p_information14 in varchar2 default hr_api.g_varchar2
293 ,p_information15 in varchar2 default hr_api.g_varchar2
294 ,p_information16 in varchar2 default hr_api.g_varchar2
295 ,p_information17 in varchar2 default hr_api.g_varchar2
296 ,p_information18 in varchar2 default hr_api.g_varchar2
297 ,p_information19 in varchar2 default hr_api.g_varchar2
298 ,p_information20 in varchar2 default hr_api.g_varchar2
299 ,p_information21 in varchar2 default hr_api.g_varchar2
300 ,p_information22 in varchar2 default hr_api.g_varchar2
301 ,p_information23 in varchar2 default hr_api.g_varchar2
302 ,p_information24 in varchar2 default hr_api.g_varchar2
303 ,p_information25 in varchar2 default hr_api.g_varchar2
304 ,p_information26 in varchar2 default hr_api.g_varchar2
305 ,p_information27 in varchar2 default hr_api.g_varchar2
306 ,p_information28 in varchar2 default hr_api.g_varchar2
307 ,p_information29 in varchar2 default hr_api.g_varchar2
308 ,p_information30 in varchar2 default hr_api.g_varchar2
309 ,p_object_version_number in out nocopy number
310 ,p_effective_date in date
311 ,p_return_status out nocopy varchar2
312 ) is
313 --
314 -- Variables for API Boolean parameters
315 l_validate boolean;
316 --
317 -- Variables for IN/OUT parameters
318 l_object_version_number number;
319 --
320 -- Other variables
321 l_proc varchar2(72) := g_package ||'update_copy_entity_attrib';
322 Begin
323 hr_utility.set_location(' Entering:' || l_proc,10);
324 --
325 -- Issue a savepoint
326 --
327 savepoint update_copy_entity_attrib_swi;
328 --
329 -- Initialise Multiple Message Detection
330 --
331 hr_multi_message.enable_message_list;
332 --
333 -- Remember IN OUT parameter IN values
334 --
335 l_object_version_number := p_object_version_number;
336 --
337 -- Convert constant values to their corresponding boolean value
338 --
339 l_validate :=
340 hr_api.constant_to_boolean
341 (p_constant_value => p_validate);
342 --
343 -- Register Surrogate ID or user key values
344 --
345 --
346 -- Call API
347 --
348 pqh_copy_entity_attribs_api.update_copy_entity_attrib
349 (p_validate => l_validate
350 ,p_copy_entity_attrib_id => p_copy_entity_attrib_id
351 ,p_copy_entity_txn_id => p_copy_entity_txn_id
352 ,p_row_type_cd => p_row_type_cd
353 ,p_information_category => p_information_category
354 ,p_information1 => p_information1
355 ,p_information2 => p_information2
356 ,p_information3 => p_information3
357 ,p_information4 => p_information4
358 ,p_information5 => p_information5
359 ,p_information6 => p_information6
360 ,p_information7 => p_information7
361 ,p_information8 => p_information8
362 ,p_information9 => p_information9
363 ,p_information10 => p_information10
364 ,p_information11 => p_information11
365 ,p_information12 => p_information12
366 ,p_information13 => p_information13
367 ,p_information14 => p_information14
368 ,p_information15 => p_information15
369 ,p_information16 => p_information16
370 ,p_information17 => p_information17
371 ,p_information18 => p_information18
372 ,p_information19 => p_information19
373 ,p_information20 => p_information20
374 ,p_information21 => p_information21
375 ,p_information22 => p_information22
376 ,p_information23 => p_information23
377 ,p_information24 => p_information24
378 ,p_information25 => p_information25
379 ,p_information26 => p_information26
380 ,p_information27 => p_information27
381 ,p_information28 => p_information28
382 ,p_information29 => p_information29
383 ,p_information30 => p_information30
384 ,p_object_version_number => p_object_version_number
385 ,p_effective_date => p_effective_date
386 );
387 --
388 -- Convert API warning boolean parameter values to specific
389 -- messages and add them to Multiple Message List
390 --
391 --
392 -- Convert API non-warning boolean parameter values
393 --
394 --
395 -- Derive the API return status value based on whether
396 -- messages of any type exist in the Multiple Message List.
397 -- Also disable Multiple Message Detection.
398 --
399 p_return_status := hr_multi_message.get_return_status_disable;
400 hr_utility.set_location(' Leaving:' || l_proc,20);
401 --
402 exception
403 when hr_multi_message.error_message_exist then
404 --
405 -- Catch the Multiple Message List exception which
406 -- indicates API processing has been aborted because
407 -- at least one message exists in the list.
408 --
409 rollback to update_copy_entity_attrib_swi;
410 --
411 -- Reset IN OUT parameters and set OUT parameters
412 --
413 p_object_version_number := l_object_version_number;
414 p_return_status := hr_multi_message.get_return_status_disable;
415 hr_utility.set_location(' Leaving:' || l_proc, 30);
416 when others then
417 --
418 -- When Multiple Message Detection is enabled catch
419 -- any Application specific or other unexpected
420 -- exceptions. Adding appropriate details to the
421 -- Multiple Message List. Otherwise re-raise the
422 -- error.
423 --
424 rollback to update_copy_entity_attrib_swi;
425 if hr_multi_message.unexpected_error_add(l_proc) then
426 hr_utility.set_location(' Leaving:' || l_proc,40);
427 raise;
428 end if;
429 --
430 -- Reset IN OUT and set OUT parameters
431 --
432 p_object_version_number := l_object_version_number;
433 p_return_status := hr_multi_message.get_return_status_disable;
434 hr_utility.set_location(' Leaving:' || l_proc,50);
435 end update_copy_entity_attrib;
436 end pqh_copy_entity_attribs_swi;