[Home] [Help]
PACKAGE BODY: APPS.IRC_DEFAULT_POSTING_SWI
Source
1 Package Body irc_default_posting_swi As
2 /* $Header: iridpswi.pkb 120.0 2005/07/26 15:07:15 mbocutt noship $ */
3 --
4 -- Package variables
5 --
6 g_package varchar2(33) := 'irc_default_posting_swi.';
7 --
8 -- ----------------------------------------------------------------------------
9 -- |------------------------< create_default_posting >------------------------|
10 -- ----------------------------------------------------------------------------
11 PROCEDURE create_default_posting
12 (p_validate in number default hr_api.g_false_num
13 ,p_language_code in varchar2 default null
14 ,p_position_id in number default null
15 ,p_job_id in number default null
16 ,p_organization_id in number default null
17 ,p_org_name in varchar2 default null
18 ,p_org_description in varchar2 default null
19 ,p_job_title in varchar2 default null
20 ,p_brief_description in varchar2 default null
21 ,p_detailed_description in varchar2 default null
22 ,p_job_requirements in varchar2 default null
23 ,p_additional_details in varchar2 default null
24 ,p_how_to_apply in varchar2 default null
25 ,p_image_url in varchar2 default null
26 ,p_image_url_alt in varchar2 default null
27 ,p_attribute_category in varchar2 default null
28 ,p_attribute1 in varchar2 default null
29 ,p_attribute2 in varchar2 default null
30 ,p_attribute3 in varchar2 default null
31 ,p_attribute4 in varchar2 default null
32 ,p_attribute5 in varchar2 default null
33 ,p_attribute6 in varchar2 default null
34 ,p_attribute7 in varchar2 default null
35 ,p_attribute8 in varchar2 default null
36 ,p_attribute9 in varchar2 default null
37 ,p_attribute10 in varchar2 default null
38 ,p_attribute11 in varchar2 default null
39 ,p_attribute12 in varchar2 default null
40 ,p_attribute13 in varchar2 default null
41 ,p_attribute14 in varchar2 default null
42 ,p_attribute15 in varchar2 default null
43 ,p_attribute16 in varchar2 default null
44 ,p_attribute17 in varchar2 default null
45 ,p_attribute18 in varchar2 default null
46 ,p_attribute19 in varchar2 default null
47 ,p_attribute20 in varchar2 default null
48 ,p_attribute21 in varchar2 default null
49 ,p_attribute22 in varchar2 default null
50 ,p_attribute23 in varchar2 default null
51 ,p_attribute24 in varchar2 default null
52 ,p_attribute25 in varchar2 default null
53 ,p_attribute26 in varchar2 default null
54 ,p_attribute27 in varchar2 default null
55 ,p_attribute28 in varchar2 default null
56 ,p_attribute29 in varchar2 default null
57 ,p_attribute30 in varchar2 default null
58 ,p_default_posting_id in number
59 ,p_object_version_number out nocopy number
60 ,p_return_status out nocopy varchar2
61 ) is
62 --
63 -- Variables for API Boolean parameters
64 l_validate boolean;
65 --
66 -- Variables for IN/OUT parameters
67 --
68 -- Other variables
69 l_default_posting_id number;
70 l_proc varchar2(72) := g_package ||'create_default_posting';
71 Begin
72 hr_utility.set_location(' Entering:' || l_proc,10);
73 --
74 -- Issue a savepoint
75 --
76 savepoint create_default_posting_swi;
77 --
78 -- Initialise Multiple Message Detection
79 --
80 hr_multi_message.enable_message_list;
81 --
82 -- Remember IN OUT parameter IN values
83 --
84 --
85 -- Convert constant values to their corresponding boolean value
86 --
87 l_validate :=
88 hr_api.constant_to_boolean
89 (p_constant_value => p_validate);
90 --
91 -- Register Surrogate ID or user key values
92 --
93 irc_idp_ins.set_base_key_value
94 (p_default_posting_id => p_default_posting_id
95 );
96 --
97 -- Call API
98 --
99 irc_default_posting_api.create_default_posting
100 (p_validate => l_validate
101 ,p_language_code => p_language_code
102 ,p_position_id => p_position_id
103 ,p_job_id => p_job_id
104 ,p_organization_id => p_organization_id
105 ,p_org_name => p_org_name
106 ,p_org_description => p_org_description
107 ,p_job_title => p_job_title
108 ,p_brief_description => p_brief_description
109 ,p_detailed_description => p_detailed_description
110 ,p_job_requirements => p_job_requirements
111 ,p_additional_details => p_additional_details
112 ,p_how_to_apply => p_how_to_apply
113 ,p_image_url => p_image_url
114 ,p_image_url_alt => p_image_url_alt
115 ,p_attribute_category => p_attribute_category
116 ,p_attribute1 => p_attribute1
117 ,p_attribute2 => p_attribute2
118 ,p_attribute3 => p_attribute3
119 ,p_attribute4 => p_attribute4
120 ,p_attribute5 => p_attribute5
121 ,p_attribute6 => p_attribute6
122 ,p_attribute7 => p_attribute7
123 ,p_attribute8 => p_attribute8
124 ,p_attribute9 => p_attribute9
125 ,p_attribute10 => p_attribute10
126 ,p_attribute11 => p_attribute11
127 ,p_attribute12 => p_attribute12
128 ,p_attribute13 => p_attribute13
129 ,p_attribute14 => p_attribute14
130 ,p_attribute15 => p_attribute15
131 ,p_attribute16 => p_attribute16
132 ,p_attribute17 => p_attribute17
133 ,p_attribute18 => p_attribute18
134 ,p_attribute19 => p_attribute19
135 ,p_attribute20 => p_attribute20
136 ,p_attribute21 => p_attribute21
137 ,p_attribute22 => p_attribute22
138 ,p_attribute23 => p_attribute23
139 ,p_attribute24 => p_attribute24
140 ,p_attribute25 => p_attribute25
141 ,p_attribute26 => p_attribute26
142 ,p_attribute27 => p_attribute27
143 ,p_attribute28 => p_attribute28
144 ,p_attribute29 => p_attribute29
145 ,p_attribute30 => p_attribute30
146 ,p_default_posting_id => l_default_posting_id
147 ,p_object_version_number => p_object_version_number
148 );
149 --
150 -- Convert API warning boolean parameter values to specific
151 -- messages and add them to Multiple Message List
152 --
153 --
154 -- Convert API non-warning boolean parameter values
155 --
156 --
157 -- Derive the API return status value based on whether
158 -- messages of any type exist in the Multiple Message List.
159 -- Also disable Multiple Message Detection.
160 --
161 p_return_status := hr_multi_message.get_return_status_disable;
162 hr_utility.set_location(' Leaving:' || l_proc,20);
163 --
164 exception
165 when hr_multi_message.error_message_exist then
166 --
167 -- Catch the Multiple Message List exception which
168 -- indicates API processing has been aborted because
169 -- at least one message exists in the list.
170 --
171 rollback to create_default_posting_swi;
172 --
173 -- Reset IN OUT parameters and set OUT parameters
174 --
175 p_object_version_number := null;
176 p_return_status := hr_multi_message.get_return_status_disable;
177 hr_utility.set_location(' Leaving:' || l_proc, 30);
178 when others then
179 --
180 -- When Multiple Message Detection is enabled catch
181 -- any Application specific or other unexpected
182 -- exceptions. Adding appropriate details to the
183 -- Multiple Message List. Otherwise re-raise the
184 -- error.
185 --
186 rollback to create_default_posting_swi;
187 if hr_multi_message.unexpected_error_add(l_proc) then
188 hr_utility.set_location(' Leaving:' || l_proc,40);
189 raise;
190 end if;
191 --
192 -- Reset IN OUT and set OUT parameters
193 --
194 p_object_version_number := null;
195 p_return_status := hr_multi_message.get_return_status_disable;
196 hr_utility.set_location(' Leaving:' || l_proc,50);
197 end create_default_posting;
198 -- ----------------------------------------------------------------------------
199 -- |------------------------< delete_default_posting >------------------------|
200 -- ----------------------------------------------------------------------------
201 PROCEDURE delete_default_posting
202 (p_validate in number default hr_api.g_false_num
203 ,p_default_posting_id in number
204 ,p_object_version_number in number
205 ,p_return_status out nocopy varchar2
206 ) is
207 --
208 -- Variables for API Boolean parameters
209 l_validate boolean;
210 --
211 -- Variables for IN/OUT parameters
212 --
213 -- Other variables
214 l_proc varchar2(72) := g_package ||'delete_default_posting';
215 Begin
216 hr_utility.set_location(' Entering:' || l_proc,10);
217 --
218 -- Issue a savepoint
219 --
220 savepoint delete_default_posting_swi;
221 --
222 -- Initialise Multiple Message Detection
223 --
224 hr_multi_message.enable_message_list;
225 --
226 -- Remember IN OUT parameter IN values
227 --
228 --
229 -- Convert constant values to their corresponding boolean value
230 --
231 l_validate :=
232 hr_api.constant_to_boolean
233 (p_constant_value => p_validate);
234 --
235 -- Register Surrogate ID or user key values
236 --
237 --
238 -- Call API
239 --
240 irc_default_posting_api.delete_default_posting
241 (p_validate => l_validate
242 ,p_default_posting_id => p_default_posting_id
243 ,p_object_version_number => p_object_version_number
244 );
245 --
246 -- Convert API warning boolean parameter values to specific
247 -- messages and add them to Multiple Message List
248 --
249 --
250 -- Convert API non-warning boolean parameter values
251 --
252 --
253 -- Derive the API return status value based on whether
254 -- messages of any type exist in the Multiple Message List.
255 -- Also disable Multiple Message Detection.
256 --
257 p_return_status := hr_multi_message.get_return_status_disable;
258 hr_utility.set_location(' Leaving:' || l_proc,20);
259 --
260 exception
261 when hr_multi_message.error_message_exist then
262 --
263 -- Catch the Multiple Message List exception which
264 -- indicates API processing has been aborted because
265 -- at least one message exists in the list.
266 --
267 rollback to delete_default_posting_swi;
268 --
269 -- Reset IN OUT parameters and set OUT parameters
270 --
271 p_return_status := hr_multi_message.get_return_status_disable;
272 hr_utility.set_location(' Leaving:' || l_proc, 30);
273 when others then
274 --
275 -- When Multiple Message Detection is enabled catch
276 -- any Application specific or other unexpected
277 -- exceptions. Adding appropriate details to the
278 -- Multiple Message List. Otherwise re-raise the
279 -- error.
280 --
281 rollback to delete_default_posting_swi;
282 if hr_multi_message.unexpected_error_add(l_proc) then
283 hr_utility.set_location(' Leaving:' || l_proc,40);
284 raise;
285 end if;
286 --
287 -- Reset IN OUT and set OUT parameters
288 --
289 p_return_status := hr_multi_message.get_return_status_disable;
290 hr_utility.set_location(' Leaving:' || l_proc,50);
291 end delete_default_posting;
292 -- ----------------------------------------------------------------------------
293 -- |------------------------< update_default_posting >------------------------|
294 -- ----------------------------------------------------------------------------
295 PROCEDURE update_default_posting
296 (p_validate in number default hr_api.g_false_num
297 ,p_language_code in varchar2 default hr_api.g_varchar2
298 ,p_default_posting_id in number
299 ,p_position_id in number default hr_api.g_number
300 ,p_job_id in number default hr_api.g_number
301 ,p_organization_id in number default hr_api.g_number
302 ,p_org_name in varchar2 default hr_api.g_varchar2
303 ,p_org_description in varchar2 default hr_api.g_varchar2
304 ,p_job_title in varchar2 default hr_api.g_varchar2
305 ,p_brief_description in varchar2 default hr_api.g_varchar2
306 ,p_detailed_description in varchar2 default hr_api.g_varchar2
307 ,p_job_requirements in varchar2 default hr_api.g_varchar2
308 ,p_additional_details in varchar2 default hr_api.g_varchar2
309 ,p_how_to_apply in varchar2 default hr_api.g_varchar2
310 ,p_image_url in varchar2 default hr_api.g_varchar2
311 ,p_image_url_alt in varchar2 default hr_api.g_varchar2
312 ,p_attribute_category in varchar2 default hr_api.g_varchar2
313 ,p_attribute1 in varchar2 default hr_api.g_varchar2
314 ,p_attribute2 in varchar2 default hr_api.g_varchar2
315 ,p_attribute3 in varchar2 default hr_api.g_varchar2
316 ,p_attribute4 in varchar2 default hr_api.g_varchar2
317 ,p_attribute5 in varchar2 default hr_api.g_varchar2
318 ,p_attribute6 in varchar2 default hr_api.g_varchar2
319 ,p_attribute7 in varchar2 default hr_api.g_varchar2
320 ,p_attribute8 in varchar2 default hr_api.g_varchar2
321 ,p_attribute9 in varchar2 default hr_api.g_varchar2
322 ,p_attribute10 in varchar2 default hr_api.g_varchar2
323 ,p_attribute11 in varchar2 default hr_api.g_varchar2
324 ,p_attribute12 in varchar2 default hr_api.g_varchar2
325 ,p_attribute13 in varchar2 default hr_api.g_varchar2
326 ,p_attribute14 in varchar2 default hr_api.g_varchar2
327 ,p_attribute15 in varchar2 default hr_api.g_varchar2
328 ,p_attribute16 in varchar2 default hr_api.g_varchar2
329 ,p_attribute17 in varchar2 default hr_api.g_varchar2
330 ,p_attribute18 in varchar2 default hr_api.g_varchar2
331 ,p_attribute19 in varchar2 default hr_api.g_varchar2
332 ,p_attribute20 in varchar2 default hr_api.g_varchar2
333 ,p_attribute21 in varchar2 default hr_api.g_varchar2
334 ,p_attribute22 in varchar2 default hr_api.g_varchar2
335 ,p_attribute23 in varchar2 default hr_api.g_varchar2
336 ,p_attribute24 in varchar2 default hr_api.g_varchar2
337 ,p_attribute25 in varchar2 default hr_api.g_varchar2
338 ,p_attribute26 in varchar2 default hr_api.g_varchar2
342 ,p_attribute30 in varchar2 default hr_api.g_varchar2
339 ,p_attribute27 in varchar2 default hr_api.g_varchar2
340 ,p_attribute28 in varchar2 default hr_api.g_varchar2
341 ,p_attribute29 in varchar2 default hr_api.g_varchar2
343 ,p_object_version_number in out nocopy number
344 ,p_return_status out nocopy varchar2
345 ) is
346 --
347 -- Variables for API Boolean parameters
348 l_validate boolean;
349 --
350 -- Variables for IN/OUT parameters
351 l_object_version_number number;
352 --
353 -- Other variables
354 l_proc varchar2(72) := g_package ||'update_default_posting';
355 Begin
356 hr_utility.set_location(' Entering:' || l_proc,10);
357 --
358 -- Issue a savepoint
359 --
360 savepoint update_default_posting_swi;
361 --
362 -- Initialise Multiple Message Detection
363 --
364 hr_multi_message.enable_message_list;
365 --
366 -- Remember IN OUT parameter IN values
367 --
368 l_object_version_number := p_object_version_number;
369 --
370 -- Convert constant values to their corresponding boolean value
371 --
372 l_validate :=
373 hr_api.constant_to_boolean
374 (p_constant_value => p_validate);
375 --
376 -- Register Surrogate ID or user key values
377 --
378 --
379 -- Call API
380 --
381 irc_default_posting_api.update_default_posting
382 (p_validate => l_validate
383 ,p_language_code => p_language_code
384 ,p_default_posting_id => p_default_posting_id
385 ,p_position_id => p_position_id
386 ,p_job_id => p_job_id
387 ,p_organization_id => p_organization_id
388 ,p_org_name => p_org_name
389 ,p_org_description => p_org_description
390 ,p_job_title => p_job_title
391 ,p_brief_description => p_brief_description
392 ,p_detailed_description => p_detailed_description
393 ,p_job_requirements => p_job_requirements
394 ,p_additional_details => p_additional_details
395 ,p_how_to_apply => p_how_to_apply
396 ,p_image_url => p_image_url
397 ,p_image_url_alt => p_image_url_alt
398 ,p_attribute_category => p_attribute_category
399 ,p_attribute1 => p_attribute1
400 ,p_attribute2 => p_attribute2
401 ,p_attribute3 => p_attribute3
402 ,p_attribute4 => p_attribute4
403 ,p_attribute5 => p_attribute5
404 ,p_attribute6 => p_attribute6
405 ,p_attribute7 => p_attribute7
406 ,p_attribute8 => p_attribute8
407 ,p_attribute9 => p_attribute9
408 ,p_attribute10 => p_attribute10
409 ,p_attribute11 => p_attribute11
410 ,p_attribute12 => p_attribute12
411 ,p_attribute13 => p_attribute13
412 ,p_attribute14 => p_attribute14
413 ,p_attribute15 => p_attribute15
414 ,p_attribute16 => p_attribute16
415 ,p_attribute17 => p_attribute17
416 ,p_attribute18 => p_attribute18
417 ,p_attribute19 => p_attribute19
418 ,p_attribute20 => p_attribute20
419 ,p_attribute21 => p_attribute21
420 ,p_attribute22 => p_attribute22
421 ,p_attribute23 => p_attribute23
422 ,p_attribute24 => p_attribute24
423 ,p_attribute25 => p_attribute25
424 ,p_attribute26 => p_attribute26
425 ,p_attribute27 => p_attribute27
426 ,p_attribute28 => p_attribute28
427 ,p_attribute29 => p_attribute29
428 ,p_attribute30 => p_attribute30
429 ,p_object_version_number => p_object_version_number
430 );
431 --
432 -- Convert API warning boolean parameter values to specific
433 -- messages and add them to Multiple Message List
434 --
435 --
436 -- Convert API non-warning boolean parameter values
437 --
438 --
439 -- Derive the API return status value based on whether
440 -- messages of any type exist in the Multiple Message List.
441 -- Also disable Multiple Message Detection.
442 --
443 p_return_status := hr_multi_message.get_return_status_disable;
444 hr_utility.set_location(' Leaving:' || l_proc,20);
445 --
446 exception
447 when hr_multi_message.error_message_exist then
448 --
449 -- Catch the Multiple Message List exception which
450 -- indicates API processing has been aborted because
451 -- at least one message exists in the list.
452 --
453 rollback to update_default_posting_swi;
454 --
455 -- Reset IN OUT parameters and set OUT parameters
456 --
457 p_object_version_number := l_object_version_number;
458 p_return_status := hr_multi_message.get_return_status_disable;
459 hr_utility.set_location(' Leaving:' || l_proc, 30);
460 when others then
461 --
462 -- When Multiple Message Detection is enabled catch
463 -- any Application specific or other unexpected
467 --
464 -- exceptions. Adding appropriate details to the
465 -- Multiple Message List. Otherwise re-raise the
466 -- error.
468 rollback to update_default_posting_swi;
469 if hr_multi_message.unexpected_error_add(l_proc) then
470 hr_utility.set_location(' Leaving:' || l_proc,40);
471 raise;
472 end if;
473 --
474 -- Reset IN OUT and set OUT parameters
475 --
476 p_object_version_number := l_object_version_number;
477 p_return_status := hr_multi_message.get_return_status_disable;
478 hr_utility.set_location(' Leaving:' || l_proc,50);
479 end update_default_posting;
480 end irc_default_posting_swi;