1 Package Body per_raa_upd as
2 /* $Header: peraarhi.pkb 115.20 2003/11/21 02:05:11 vvayanip ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' per_raa_upd.'; -- Global package name
9 g_recruiting_site_response boolean := false;
10 --
11 -- ----------------------------------------------------------------------------
12 -- |------------------------------< update_dml >------------------------------|
13 -- ----------------------------------------------------------------------------
14 -- {Start Of Comments}
15 --
16 -- Description:
17 -- This procedure controls the actual dml update logic. The processing of
18 -- this procedure is:
19 -- 1) Increment the object_version_number by 1 if the object_version_number
20 -- is defined as an attribute for this entity.
21 -- 2) To set and unset the g_api_dml status as required (as we are about to
22 -- perform dml).
23 -- 3) To update the specified row in the schema using the primary key in
24 -- the predicates.
25 -- 4) To trap any constraint violations that may have occurred.
26 -- 5) To raise any other errors.
27 --
28 -- Prerequisites:
29 -- This is an internal private procedure which must be called from the upd
30 -- procedure.
31 --
32 -- In Parameters:
33 -- A Pl/Sql record structre.
34 --
35 -- Post Success:
36 -- The specified row will be updated in the schema.
37 --
38 -- Post Failure:
39 -- On the update dml failure it is important to note that we always reset the
40 -- g_api_dml status to false.
41 -- If a check, unique or parent integrity constraint violation is raised the
42 -- constraint_error procedure will be called.
43 -- If any other error is reported, the error will be raised after the
44 -- g_api_dml status is reset.
45 --
46 -- Developer Implementation Notes:
47 -- The update 'set' attribute list should be modified if any of your
48 -- attributes are not updateable.
49 --
50 -- Access Status:
51 -- Internal Row Handler Use Only.
52 --
53 -- {End Of Comments}
54 -- ----------------------------------------------------------------------------
55 Procedure update_dml
56 (p_rec in out nocopy per_raa_shd.g_rec_type
57 ) is
58 --
59 l_proc varchar2(72) := g_package||'update_dml';
60 l_recruiting_site_response clob;
61 --
62 Begin
63 hr_utility.set_location('Entering:'||l_proc, 5);
64 --
65 -- Increment the object version
66 p_rec.object_version_number := p_rec.object_version_number + 1;
67 --
68 --
69 --
70 -- Update the per_recruitment_activities Row
71 --
72 update per_recruitment_activities
73 set
74 recruitment_activity_id = p_rec.recruitment_activity_id
75 ,business_group_id = p_rec.business_group_id
76 ,authorising_person_id = p_rec.authorising_person_id
77 ,run_by_organization_id = p_rec.run_by_organization_id
78 ,internal_contact_person_id = p_rec.internal_contact_person_id
79 ,parent_recruitment_activity_id = p_rec.parent_recruitment_activity_id
80 ,currency_code = p_rec.currency_code
81 ,date_start = p_rec.date_start
82 ,name = p_rec.name
83 ,actual_cost = p_rec.actual_cost
84 ,comments = p_rec.comments
85 ,contact_telephone_number = p_rec.contact_telephone_number
86 ,date_closing = p_rec.date_closing
87 ,date_end = p_rec.date_end
88 ,external_contact = p_rec.external_contact
89 ,planned_cost = p_rec.planned_cost
90 ,recruiting_site_id = p_rec.recruiting_site_id
91 ,recruiting_site_response = empty_clob()
92 ,last_posted_date = p_rec.last_posted_date
93 ,type = p_rec.type
94 ,request_id = p_rec.request_id
95 ,program_application_id = p_rec.program_application_id
96 ,program_id = p_rec.program_id
97 ,program_update_date = p_rec.program_update_date
98 ,attribute_category = p_rec.attribute_category
99 ,attribute1 = p_rec.attribute1
100 ,attribute2 = p_rec.attribute2
101 ,attribute3 = p_rec.attribute3
102 ,attribute4 = p_rec.attribute4
103 ,attribute5 = p_rec.attribute5
104 ,attribute6 = p_rec.attribute6
105 ,attribute7 = p_rec.attribute7
106 ,attribute8 = p_rec.attribute8
107 ,attribute9 = p_rec.attribute9
108 ,attribute10 = p_rec.attribute10
109 ,attribute11 = p_rec.attribute11
110 ,attribute12 = p_rec.attribute12
111 ,attribute13 = p_rec.attribute13
112 ,attribute14 = p_rec.attribute14
113 ,attribute15 = p_rec.attribute15
114 ,attribute16 = p_rec.attribute16
115 ,attribute17 = p_rec.attribute17
116 ,attribute18 = p_rec.attribute18
117 ,attribute19 = p_rec.attribute19
118 ,attribute20 = p_rec.attribute20
119 ,posting_content_id = p_rec.posting_content_id
120 ,status = p_rec.status
121 ,object_version_number = p_rec.object_version_number
122 where recruitment_activity_id = p_rec.recruitment_activity_id
123 returning recruiting_site_response into l_recruiting_site_response;
124 --
125 --
126 if (g_recruiting_site_response
127 and dbms_lob.getlength(l_recruiting_site_response)<=32767
128 and dbms_lob.instr(l_recruiting_site_response,p_rec.recruiting_site_response)<>1)
129 then
130 hr_utility.set_location(l_proc, 10);
131 dbms_lob.trim(l_recruiting_site_response,0);
132 dbms_lob.write(l_recruiting_site_response
133 ,length(p_rec.recruiting_site_response)
134 ,1
135 ,p_rec.recruiting_site_response);
136 end if;
137 --
138 --
139 hr_utility.set_location(' Leaving:'||l_proc, 10);
140 --
141 Exception
142 When hr_api.check_integrity_violated Then
143 -- A check constraint has been violated
144 --
145 per_raa_shd.constraint_error
146 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
147 When hr_api.parent_integrity_violated Then
148 -- Parent integrity has been violated
149 --
150 per_raa_shd.constraint_error
151 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
152 When hr_api.unique_integrity_violated Then
153 -- Unique integrity has been violated
154 --
155 per_raa_shd.constraint_error
156 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
157 When Others Then
158 --
159 Raise;
160 End update_dml;
161 --
162 -- ----------------------------------------------------------------------------
163 -- |------------------------------< pre_update >------------------------------|
164 -- ----------------------------------------------------------------------------
165 -- {Start Of Comments}
166 --
167 -- Description:
168 -- This private procedure contains any processing which is required before
169 -- the update dml.
170 --
171 -- Prerequisites:
172 -- This is an internal procedure which is called from the upd procedure.
173 --
174 -- In Parameters:
175 -- A Pl/Sql record structure.
176 --
177 -- Post Success:
178 -- Processing continues.
179 --
180 -- Post Failure:
181 -- If an error has occurred, an error message and exception wil be raised
182 -- but not handled.
183 --
184 -- Developer Implementation Notes:
185 -- Any pre-processing required before the update dml is issued should be
186 -- coded within this procedure. It is important to note that any 3rd party
187 -- maintenance should be reviewed before placing in this procedure.
188 --
189 -- Access Status:
190 -- Internal Row Handler Use Only.
191 --
192 -- {End Of Comments}
193 -- ----------------------------------------------------------------------------
194 Procedure pre_update
195 (p_rec in per_raa_shd.g_rec_type
196 ) is
197 --
198 l_proc varchar2(72) := g_package||'pre_update';
199 --
200 Begin
201 hr_utility.set_location('Entering:'||l_proc, 5);
202 --
203 hr_utility.set_location(' Leaving:'||l_proc, 10);
204 End pre_update;
205 --
206 -- ----------------------------------------------------------------------------
207 -- |-----------------------------< post_update >------------------------------|
208 -- ----------------------------------------------------------------------------
209 -- {Start Of Comments}
210 --
211 -- Description:
212 -- This private procedure contains any processing which is required after
213 -- the update dml.
214 --
215 -- Prerequisites:
216 -- This is an internal procedure which is called from the upd procedure.
217 --
218 -- In Parameters:
219 -- A Pl/Sql record structure.
220 --
221 -- Post Success:
222 -- Processing continues.
223 --
224 -- Post Failure:
225 -- If an error has occurred, an error message and exception will be raised
226 -- but not handled.
227 --
228 -- Developer Implementation Notes:
229 -- Any post-processing required after the update dml is issued should be
230 -- coded within this procedure. It is important to note that any 3rd party
231 -- maintenance should be reviewed before placing in this procedure.
232 --
233 -- Access Status:
234 -- Internal Row Handler Use Only.
235 --
236 -- {End Of Comments}
237 -- ----------------------------------------------------------------------------
238 Procedure post_update
239 (p_rec in per_raa_shd.g_rec_type
240 ) is
241 --
242 l_proc varchar2(72) := g_package||'post_update';
243 --
244 Begin
245 hr_utility.set_location('Entering:'||l_proc, 5);
246 begin
247 --
248 per_raa_rku.after_update
249 (p_recruitment_activity_id
250 => p_rec.recruitment_activity_id
251 ,p_business_group_id
252 => p_rec.business_group_id
253 ,p_authorising_person_id
254 => p_rec.authorising_person_id
255 ,p_run_by_organization_id
256 => p_rec.run_by_organization_id
257 ,p_internal_contact_person_id
258 => p_rec.internal_contact_person_id
259 ,p_parent_recruitment_activity
260 => p_rec.parent_recruitment_activity_id
261 ,p_currency_code
262 => p_rec.currency_code
263 ,p_date_start
264 => p_rec.date_start
265 ,p_name
266 => p_rec.name
267 ,p_actual_cost
268 => p_rec.actual_cost
269 ,p_comments
270 => p_rec.comments
271 ,p_contact_telephone_number
272 => p_rec.contact_telephone_number
273 ,p_date_closing
274 => p_rec.date_closing
275 ,p_date_end
276 => p_rec.date_end
277 ,p_external_contact
278 => p_rec.external_contact
279 ,p_planned_cost
280 => p_rec.planned_cost
281 ,p_recruiting_site_id
282 => p_rec.recruiting_site_id
283 ,p_recruiting_site_response
284 => p_rec.recruiting_site_response
285 ,p_last_posted_date
286 => p_rec.last_posted_date
287 ,p_type
288 => p_rec.type
289 ,p_request_id
290 => p_rec.request_id
291 ,p_program_application_id
292 => p_rec.program_application_id
293 ,p_program_id
294 => p_rec.program_id
295 ,p_program_update_date
296 => p_rec.program_update_date
297 ,p_attribute_category
298 => p_rec.attribute_category
299 ,p_attribute1
300 => p_rec.attribute1
301 ,p_attribute2
302 => p_rec.attribute2
303 ,p_attribute3
304 => p_rec.attribute3
305 ,p_attribute4
306 => p_rec.attribute4
307 ,p_attribute5
308 => p_rec.attribute5
309 ,p_attribute6
310 => p_rec.attribute6
311 ,p_attribute7
312 => p_rec.attribute7
313 ,p_attribute8
314 => p_rec.attribute8
315 ,p_attribute9
316 => p_rec.attribute9
317 ,p_attribute10
318 => p_rec.attribute10
319 ,p_attribute11
320 => p_rec.attribute11
321 ,p_attribute12
322 => p_rec.attribute12
323 ,p_attribute13
324 => p_rec.attribute13
325 ,p_attribute14
326 => p_rec.attribute14
327 ,p_attribute15
328 => p_rec.attribute15
329 ,p_attribute16
330 => p_rec.attribute16
331 ,p_attribute17
332 => p_rec.attribute17
333 ,p_attribute18
334 => p_rec.attribute18
335 ,p_attribute19
336 => p_rec.attribute19
337 ,p_attribute20
338 => p_rec.attribute20
339 ,p_posting_content_id
340 => p_rec.posting_content_id
341 ,p_status
342 => p_rec.status
343 ,p_object_version_number
344 => p_rec.object_version_number
345 ,p_business_group_id_o
346 => per_raa_shd.g_old_rec.business_group_id
347 ,p_authorising_person_id_o
348 => per_raa_shd.g_old_rec.authorising_person_id
349 ,p_run_by_organization_id_o
350 => per_raa_shd.g_old_rec.run_by_organization_id
351 ,p_internal_contact_person_id_o
352 => per_raa_shd.g_old_rec.internal_contact_person_id
353 ,p_parent_recruitment_activit_o
354 => per_raa_shd.g_old_rec.parent_recruitment_activity_id
355 ,p_currency_code_o
356 => per_raa_shd.g_old_rec.currency_code
357 ,p_date_start_o
358 => per_raa_shd.g_old_rec.date_start
362 => per_raa_shd.g_old_rec.actual_cost
359 ,p_name_o
360 => per_raa_shd.g_old_rec.name
361 ,p_actual_cost_o
363 ,p_comments_o
364 => per_raa_shd.g_old_rec.comments
365 ,p_contact_telephone_number_o
366 => per_raa_shd.g_old_rec.contact_telephone_number
367 ,p_date_closing_o
368 => per_raa_shd.g_old_rec.date_closing
369 ,p_date_end_o
370 => per_raa_shd.g_old_rec.date_end
371 ,p_external_contact_o
372 => per_raa_shd.g_old_rec.external_contact
373 ,p_planned_cost_o
374 => per_raa_shd.g_old_rec.planned_cost
375 ,p_recruiting_site_id_o
376 => per_raa_shd.g_old_rec.recruiting_site_id
377 ,p_recruiting_site_response_o
378 => per_raa_shd.g_old_rec.recruiting_site_response
379 ,p_last_posted_date_o
380 => per_raa_shd.g_old_rec.last_posted_date
381 ,p_type_o
382 => per_raa_shd.g_old_rec.type
383 ,p_request_id_o
384 => per_raa_shd.g_old_rec.request_id
385 ,p_program_application_id_o
386 => per_raa_shd.g_old_rec.program_application_id
387 ,p_program_id_o
388 => per_raa_shd.g_old_rec.program_id
389 ,p_program_update_date_o
390 => per_raa_shd.g_old_rec.program_update_date
391 ,p_attribute_category_o
392 => per_raa_shd.g_old_rec.attribute_category
393 ,p_attribute1_o
394 => per_raa_shd.g_old_rec.attribute1
395 ,p_attribute2_o
396 => per_raa_shd.g_old_rec.attribute2
397 ,p_attribute3_o
398 => per_raa_shd.g_old_rec.attribute3
399 ,p_attribute4_o
400 => per_raa_shd.g_old_rec.attribute4
401 ,p_attribute5_o
402 => per_raa_shd.g_old_rec.attribute5
403 ,p_attribute6_o
404 => per_raa_shd.g_old_rec.attribute6
405 ,p_attribute7_o
406 => per_raa_shd.g_old_rec.attribute7
407 ,p_attribute8_o
408 => per_raa_shd.g_old_rec.attribute8
409 ,p_attribute9_o
410 => per_raa_shd.g_old_rec.attribute9
411 ,p_attribute10_o
412 => per_raa_shd.g_old_rec.attribute10
413 ,p_attribute11_o
414 => per_raa_shd.g_old_rec.attribute11
415 ,p_attribute12_o
416 => per_raa_shd.g_old_rec.attribute12
417 ,p_attribute13_o
418 => per_raa_shd.g_old_rec.attribute13
419 ,p_attribute14_o
420 => per_raa_shd.g_old_rec.attribute14
421 ,p_attribute15_o
422 => per_raa_shd.g_old_rec.attribute15
423 ,p_attribute16_o
424 => per_raa_shd.g_old_rec.attribute16
425 ,p_attribute17_o
426 => per_raa_shd.g_old_rec.attribute17
427 ,p_attribute18_o
428 => per_raa_shd.g_old_rec.attribute18
429 ,p_attribute19_o
430 => per_raa_shd.g_old_rec.attribute19
431 ,p_attribute20_o
432 => per_raa_shd.g_old_rec.attribute20
433 ,p_posting_content_id_o
434 => per_raa_shd.g_old_rec.posting_content_id
435 ,p_status_o
436 => per_raa_shd.g_old_rec.status
437 ,p_object_version_number_o
438 => per_raa_shd.g_old_rec.object_version_number
439 );
440 --
441 exception
442 --
443 when hr_api.cannot_find_prog_unit then
444 --
445 hr_api.cannot_find_prog_unit_error
446 (p_module_name => 'PER_RECRUITMENT_ACTIVITIES'
447 ,p_hook_type => 'AU');
448 --
449 end;
450 --
451 hr_utility.set_location(' Leaving:'||l_proc, 10);
452 End post_update;
453 --
454 -- ----------------------------------------------------------------------------
455 -- |-----------------------------< convert_defs >-----------------------------|
456 -- ----------------------------------------------------------------------------
457 -- {Start Of Comments}
458 --
459 -- Description:
460 -- The Convert_Defs procedure has one very important function:
461 -- It must return the record structure for the row with all system defaulted
462 -- values converted into its corresponding parameter value for update. When
463 -- we attempt to update a row through the Upd process , certain
464 -- parameters can be defaulted which enables flexibility in the calling of
465 -- the upd process (e.g. only attributes which need to be updated need to be
466 -- specified). For the upd process to determine which attributes
467 -- have NOT been specified we need to check if the parameter has a reserved
468 -- system default value. Therefore, for all parameters which have a
469 -- corresponding reserved system default mechanism specified we need to
470 -- check if a system default is being used. If a system default is being
471 -- used then we convert the defaulted value into its corresponding attribute
472 -- value held in the g_old_rec data structure.
473 --
474 -- Prerequisites:
475 -- This private function can only be called from the upd process.
476 --
477 -- In Parameters:
478 -- A Pl/Sql record structure.
479 --
480 -- Post Success:
481 -- The record structure will be returned with all system defaulted parameter
482 -- values converted into its current row attribute value.
483 --
484 -- Post Failure:
485 -- No direct error handling is required within this function. Any possible
486 -- errors within this procedure will be a PL/SQL value error due to
490 -- None.
487 -- conversion of datatypes or data lengths.
488 --
489 -- Developer Implementation Notes:
491 --
492 -- Access Status:
493 -- Internal Row Handler Use Only.
494 --
495 -- {End Of Comments}
496 -- ----------------------------------------------------------------------------
497 Procedure convert_defs
498 (p_rec in out nocopy per_raa_shd.g_rec_type
499 ) is
500 --
501 Begin
502 --
503 -- We must now examine each argument value in the
504 -- p_rec plsql record structure
505 -- to see if a system default is being used. If a system default
506 -- is being used then we must set to the 'current' argument value.
507 --
508 If (p_rec.business_group_id = hr_api.g_number) then
509 p_rec.business_group_id :=
510 per_raa_shd.g_old_rec.business_group_id;
511 End If;
512 If (p_rec.authorising_person_id = hr_api.g_number) then
513 p_rec.authorising_person_id :=
514 per_raa_shd.g_old_rec.authorising_person_id;
515 End If;
516 If (p_rec.run_by_organization_id = hr_api.g_number) then
517 p_rec.run_by_organization_id :=
518 per_raa_shd.g_old_rec.run_by_organization_id;
519 End If;
520 If (p_rec.internal_contact_person_id = hr_api.g_number) then
521 p_rec.internal_contact_person_id :=
522 per_raa_shd.g_old_rec.internal_contact_person_id;
523 End If;
524 If (p_rec.parent_recruitment_activity_id = hr_api.g_number) then
525 p_rec.parent_recruitment_activity_id :=
526 per_raa_shd.g_old_rec.parent_recruitment_activity_id;
527 End If;
528 If (p_rec.currency_code = hr_api.g_varchar2) then
529 p_rec.currency_code :=
530 per_raa_shd.g_old_rec.currency_code;
531 End If;
532 If (p_rec.date_start = hr_api.g_date) then
533 p_rec.date_start :=
534 per_raa_shd.g_old_rec.date_start;
535 End If;
536 If (p_rec.name = hr_api.g_varchar2) then
537 p_rec.name :=
538 per_raa_shd.g_old_rec.name;
539 End If;
540 If (p_rec.actual_cost = hr_api.g_varchar2) then
541 p_rec.actual_cost :=
542 per_raa_shd.g_old_rec.actual_cost;
543 End If;
544 If (p_rec.comments = hr_api.g_varchar2) then
545 p_rec.comments :=
546 per_raa_shd.g_old_rec.comments;
547 End If;
548 If (p_rec.contact_telephone_number = hr_api.g_varchar2) then
549 p_rec.contact_telephone_number :=
550 per_raa_shd.g_old_rec.contact_telephone_number;
551 End If;
552 If (p_rec.date_closing = hr_api.g_date) then
553 p_rec.date_closing :=
554 per_raa_shd.g_old_rec.date_closing;
555 End If;
556 If (p_rec.date_end = hr_api.g_date) then
557 p_rec.date_end :=
558 per_raa_shd.g_old_rec.date_end;
559 End If;
560 If (p_rec.external_contact = hr_api.g_varchar2) then
561 p_rec.external_contact :=
562 per_raa_shd.g_old_rec.external_contact;
563 End If;
564 If (p_rec.planned_cost = hr_api.g_varchar2) then
565 p_rec.planned_cost :=
566 per_raa_shd.g_old_rec.planned_cost;
567 End If;
568 If (p_rec.recruiting_site_id = hr_api.g_number) then
569 p_rec.recruiting_site_id :=
570 per_raa_shd.g_old_rec.recruiting_site_id;
571 End If;
572 If (p_rec.recruiting_site_response = hr_api.g_varchar2) then
573 p_rec.recruiting_site_response :=
574 per_raa_shd.g_old_rec.recruiting_site_response;
575 Else
576 g_recruiting_site_response:=true;
577 End If;
578 if (p_rec.last_posted_date=hr_api.g_date) then
579 p_rec.last_posted_date :=
580 per_raa_shd.g_old_rec.last_posted_date;
581 end if;
582 If (p_rec.type = hr_api.g_varchar2) then
583 p_rec.type :=
584 per_raa_shd.g_old_rec.type;
585 End If;
586 If (p_rec.request_id = hr_api.g_number) then
587 p_rec.request_id :=
588 per_raa_shd.g_old_rec.request_id;
589 End If;
590 If (p_rec.program_application_id = hr_api.g_number) then
591 p_rec.program_application_id :=
592 per_raa_shd.g_old_rec.program_application_id;
593 End If;
594 If (p_rec.program_id = hr_api.g_number) then
595 p_rec.program_id :=
596 per_raa_shd.g_old_rec.program_id;
597 End If;
598 If (p_rec.program_update_date = hr_api.g_date) then
599 p_rec.program_update_date :=
600 per_raa_shd.g_old_rec.program_update_date;
601 End If;
602 If (p_rec.attribute_category = hr_api.g_varchar2) then
603 p_rec.attribute_category :=
604 per_raa_shd.g_old_rec.attribute_category;
605 End If;
606 If (p_rec.attribute1 = hr_api.g_varchar2) then
607 p_rec.attribute1 :=
608 per_raa_shd.g_old_rec.attribute1;
609 End If;
610 If (p_rec.attribute2 = hr_api.g_varchar2) then
611 p_rec.attribute2 :=
612 per_raa_shd.g_old_rec.attribute2;
613 End If;
614 If (p_rec.attribute3 = hr_api.g_varchar2) then
615 p_rec.attribute3 :=
616 per_raa_shd.g_old_rec.attribute3;
617 End If;
618 If (p_rec.attribute4 = hr_api.g_varchar2) then
619 p_rec.attribute4 :=
620 per_raa_shd.g_old_rec.attribute4;
621 End If;
622 If (p_rec.attribute5 = hr_api.g_varchar2) then
623 p_rec.attribute5 :=
624 per_raa_shd.g_old_rec.attribute5;
625 End If;
626 If (p_rec.attribute6 = hr_api.g_varchar2) then
627 p_rec.attribute6 :=
631 p_rec.attribute7 :=
628 per_raa_shd.g_old_rec.attribute6;
629 End If;
630 If (p_rec.attribute7 = hr_api.g_varchar2) then
632 per_raa_shd.g_old_rec.attribute7;
633 End If;
634 If (p_rec.attribute8 = hr_api.g_varchar2) then
635 p_rec.attribute8 :=
636 per_raa_shd.g_old_rec.attribute8;
637 End If;
638 If (p_rec.attribute9 = hr_api.g_varchar2) then
639 p_rec.attribute9 :=
640 per_raa_shd.g_old_rec.attribute9;
641 End If;
642 If (p_rec.attribute10 = hr_api.g_varchar2) then
643 p_rec.attribute10 :=
644 per_raa_shd.g_old_rec.attribute10;
645 End If;
646 If (p_rec.attribute11 = hr_api.g_varchar2) then
647 p_rec.attribute11 :=
648 per_raa_shd.g_old_rec.attribute11;
649 End If;
650 If (p_rec.attribute12 = hr_api.g_varchar2) then
651 p_rec.attribute12 :=
652 per_raa_shd.g_old_rec.attribute12;
653 End If;
654 If (p_rec.attribute13 = hr_api.g_varchar2) then
655 p_rec.attribute13 :=
656 per_raa_shd.g_old_rec.attribute13;
657 End If;
658 If (p_rec.attribute14 = hr_api.g_varchar2) then
659 p_rec.attribute14 :=
660 per_raa_shd.g_old_rec.attribute14;
661 End If;
662 If (p_rec.attribute15 = hr_api.g_varchar2) then
663 p_rec.attribute15 :=
664 per_raa_shd.g_old_rec.attribute15;
665 End If;
666 If (p_rec.attribute16 = hr_api.g_varchar2) then
667 p_rec.attribute16 :=
668 per_raa_shd.g_old_rec.attribute16;
669 End If;
670 If (p_rec.attribute17 = hr_api.g_varchar2) then
671 p_rec.attribute17 :=
672 per_raa_shd.g_old_rec.attribute17;
673 End If;
674 If (p_rec.attribute18 = hr_api.g_varchar2) then
675 p_rec.attribute18 :=
676 per_raa_shd.g_old_rec.attribute18;
677 End If;
678 If (p_rec.attribute19 = hr_api.g_varchar2) then
679 p_rec.attribute19 :=
680 per_raa_shd.g_old_rec.attribute19;
681 End If;
682 If (p_rec.attribute20 = hr_api.g_varchar2) then
683 p_rec.attribute20 :=
684 per_raa_shd.g_old_rec.attribute20;
685 End If;
686 If (p_rec.posting_content_id = hr_api.g_number) then
687 p_rec.posting_content_id :=
688 per_raa_shd.g_old_rec.posting_content_id;
689 End If;
690 If (p_rec.status = hr_api.g_varchar2) then
691 p_rec.status :=
692 per_raa_shd.g_old_rec.status;
693 End If;
694 --
695 End convert_defs;
696 --
697 -- ----------------------------------------------------------------------------
698 -- |---------------------------------< upd >----------------------------------|
699 -- ----------------------------------------------------------------------------
700 Procedure upd
701 (p_rec in out nocopy per_raa_shd.g_rec_type
702 ) is
703 --
704 l_proc varchar2(72) := g_package||'upd';
705 --
706 Begin
707 hr_utility.set_location('Entering:'||l_proc, 5);
708 --
709 -- We must lock the row which we need to update.
710 --
711 per_raa_shd.lck
712 (p_rec.recruitment_activity_id
713 ,p_rec.object_version_number
714 );
715 --
716 -- 1. During an update system defaults are used to determine if
717 -- arguments have been defaulted or not. We must therefore
718 -- derive the full record structure values to be updated.
719 --
720 -- 2. Call the supporting update validate operations.
721 --
722 convert_defs(p_rec);
723 per_raa_bus.update_validate
724 (p_rec
725 );
726 --
727 -- Call to raise any errors on multi-message list
728 hr_multi_message.end_validation_set;
729 --
730 -- Call the supporting pre-update operation
731 --
732 per_raa_upd.pre_update(p_rec);
733 --
734 -- Update the row.
735 --
736 per_raa_upd.update_dml(p_rec);
737 --
738 -- Call the supporting post-update operation
739 --
740 per_raa_upd.post_update
741 (p_rec
742 );
743 -- Call to raise any errors on multi-message list
744 hr_multi_message.end_validation_set;
745 --
746 End upd;
747 --
748 -- ----------------------------------------------------------------------------
749 -- |---------------------------------< upd >----------------------------------|
750 -- ----------------------------------------------------------------------------
751 Procedure upd
752 (p_recruitment_activity_id in number
753 ,p_object_version_number in out nocopy number
754 ,p_business_group_id in number default hr_api.g_number
755 ,p_date_start in date default hr_api.g_date
756 ,p_name in varchar2 default hr_api.g_varchar2
757 ,p_authorising_person_id in number default hr_api.g_number
758 ,p_run_by_organization_id in number default hr_api.g_number
759 ,p_internal_contact_person_id in number default hr_api.g_number
760 ,p_parent_recruitment_activity in number default hr_api.g_number
761 ,p_currency_code in varchar2 default hr_api.g_varchar2
762 ,p_actual_cost in varchar2 default hr_api.g_varchar2
763 ,p_comments in varchar2 default hr_api.g_varchar2
764 ,p_contact_telephone_number in varchar2 default hr_api.g_varchar2
765 ,p_date_closing in date default hr_api.g_date
766 ,p_date_end in date default hr_api.g_date
767 ,p_external_contact in varchar2 default hr_api.g_varchar2
768 ,p_planned_cost in varchar2 default hr_api.g_varchar2
769 ,p_recruiting_site_id in number default hr_api.g_number
770 ,p_recruiting_site_response in varchar2 default hr_api.g_varchar2
771 ,p_last_posted_date in date default hr_api.g_date
772 ,p_type in varchar2 default hr_api.g_varchar2
773 ,p_request_id in number default hr_api.g_number
774 ,p_program_application_id in number default hr_api.g_number
775 ,p_program_id in number default hr_api.g_number
776 ,p_program_update_date in date default hr_api.g_date
777 ,p_attribute_category in varchar2 default hr_api.g_varchar2
778 ,p_attribute1 in varchar2 default hr_api.g_varchar2
779 ,p_attribute2 in varchar2 default hr_api.g_varchar2
780 ,p_attribute3 in varchar2 default hr_api.g_varchar2
781 ,p_attribute4 in varchar2 default hr_api.g_varchar2
782 ,p_attribute5 in varchar2 default hr_api.g_varchar2
783 ,p_attribute6 in varchar2 default hr_api.g_varchar2
784 ,p_attribute7 in varchar2 default hr_api.g_varchar2
785 ,p_attribute8 in varchar2 default hr_api.g_varchar2
786 ,p_attribute9 in varchar2 default hr_api.g_varchar2
787 ,p_attribute10 in varchar2 default hr_api.g_varchar2
788 ,p_attribute11 in varchar2 default hr_api.g_varchar2
789 ,p_attribute12 in varchar2 default hr_api.g_varchar2
790 ,p_attribute13 in varchar2 default hr_api.g_varchar2
791 ,p_attribute14 in varchar2 default hr_api.g_varchar2
792 ,p_attribute15 in varchar2 default hr_api.g_varchar2
793 ,p_attribute16 in varchar2 default hr_api.g_varchar2
794 ,p_attribute17 in varchar2 default hr_api.g_varchar2
795 ,p_attribute18 in varchar2 default hr_api.g_varchar2
796 ,p_attribute19 in varchar2 default hr_api.g_varchar2
797 ,p_attribute20 in varchar2 default hr_api.g_varchar2
798 ,p_posting_content_id in number default hr_api.g_number
799 ,p_status in varchar2 default hr_api.g_varchar2
800 ) is
801 --
802 l_rec per_raa_shd.g_rec_type;
803 l_proc varchar2(72) := g_package||'upd';
804 --
805 Begin
806 hr_utility.set_location('Entering:'||l_proc, 5);
807 --
808 -- Call conversion function to turn arguments into the
809 -- l_rec structure.
810 --
811 l_rec :=
812 per_raa_shd.convert_args
813 (p_recruitment_activity_id
814 ,p_business_group_id
815 ,p_authorising_person_id
816 ,p_run_by_organization_id
817 ,p_internal_contact_person_id
818 ,p_parent_recruitment_activity
819 ,p_currency_code
820 ,p_date_start
821 ,p_name
822 ,p_actual_cost
823 ,p_comments
824 ,p_contact_telephone_number
825 ,p_date_closing
826 ,p_date_end
827 ,p_external_contact
828 ,p_planned_cost
829 ,p_recruiting_site_id
830 ,p_recruiting_site_response
831 ,p_last_posted_date
832 ,p_type
833 ,p_request_id
834 ,p_program_application_id
835 ,p_program_id
836 ,p_program_update_date
837 ,p_attribute_category
838 ,p_attribute1
839 ,p_attribute2
840 ,p_attribute3
841 ,p_attribute4
842 ,p_attribute5
843 ,p_attribute6
844 ,p_attribute7
845 ,p_attribute8
846 ,p_attribute9
847 ,p_attribute10
848 ,p_attribute11
849 ,p_attribute12
850 ,p_attribute13
851 ,p_attribute14
852 ,p_attribute15
853 ,p_attribute16
854 ,p_attribute17
855 ,p_attribute18
856 ,p_attribute19
857 ,p_attribute20
858 ,p_posting_content_id
859 ,p_status
860 ,p_object_version_number
861 );
862 --
863 -- Having converted the arguments into the
864 -- plsql record structure we call the corresponding record
865 -- business process.
866 --
867 per_raa_upd.upd
868 (l_rec
869 );
870 p_object_version_number := l_rec.object_version_number;
871 --
872 hr_utility.set_location(' Leaving:'||l_proc, 10);
873 End upd;
874 --
875 end per_raa_upd;