[Home] [Help]
PACKAGE BODY: APPS.IRC_IOF_UPD
Source
1 package body irc_iof_upd as
2 /* $Header: iriofrhi.pkb 120.20 2011/04/08 12:04:09 amikukum ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | private global definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' irc_iof_upd.'; -- global package name
9 --
10 -- ----------------------------------------------------------------------------
11 -- |------------------------------< update_dml >------------------------------|
12 -- ----------------------------------------------------------------------------
13 -- {start of comments}
14 --
15 -- description:
16 -- this procedure controls the actual dml update logic. the processing of
17 -- this procedure is:
18 -- 1) increment the object_version_number by 1 if the object_version_number
19 -- is defined as an attribute for this entity.
20 -- 2) to set and unset the g_api_dml status as required (as we are about to
21 -- perform dml).
22 -- 3) to update the specified row in the schema using the primary key in
23 -- the predicates.
24 -- 4) to trap any constraint violations that may have occurred.
25 -- 5) to raise any other errors.
26 --
27 -- prerequisites:
28 -- this is an internal private procedure which must be called from the upd
29 -- procedure.
30 --
31 -- in parameters:
32 -- a pl/sql record structre.
33 --
34 -- post success:
35 -- the specified row will be updated in the schema.
36 --
37 -- post failure:
38 -- on the update dml failure it is important to note that we always reset the
39 -- g_api_dml status to false.
40 -- if a check, unique or parent integrity constraint violation is raised the
41 -- constraint_error procedure will be called.
42 -- if any other error is reported, the error will be raised after the
43 -- g_api_dml status is reset.
44 --
45 -- developer implementation notes:
46 -- the update 'set' attribute list should be modified if any of your
47 -- attributes are not updateable.
48 --
49 -- access status:
50 -- internal row handler use only.
51 --
52 -- {end of comments}
53 -- ----------------------------------------------------------------------------
54 procedure update_dml
55 (p_rec in out nocopy irc_iof_shd.g_rec_type
56 ) is
57 --
58 l_proc varchar2(72) := g_package||'update_dml';
59 --
60 begin
61 hr_utility.set_location('entering:'||l_proc, 5);
62 --
63 -- increment the object version
64 p_rec.object_version_number := p_rec.object_version_number + 1;
65 --
66 --
67 --
68 -- update the irc_offers row
69 --
70 update irc_offers
71 set
72 offer_id = p_rec.offer_id
73 ,offer_version = p_rec.offer_version
74 ,latest_offer = p_rec.latest_offer
75 ,offer_status = p_rec.offer_status
76 ,discretionary_job_title = p_rec.discretionary_job_title
77 ,offer_extended_method = p_rec.offer_extended_method
78 ,respondent_id = p_rec.respondent_id
79 ,expiry_date = p_rec.expiry_date
80 ,proposed_start_date = p_rec.proposed_start_date
81 ,offer_letter_tracking_code = p_rec.offer_letter_tracking_code
82 ,offer_postal_service = p_rec.offer_postal_service
83 ,offer_shipping_date = p_rec.offer_shipping_date
84 ,vacancy_id = p_rec.vacancy_id
85 ,applicant_assignment_id = p_rec.applicant_assignment_id
86 ,offer_assignment_id = p_rec.offer_assignment_id
87 ,address_id = p_rec.address_id
88 ,template_id = p_rec.template_id
89 ,offer_letter_file_type = p_rec.offer_letter_file_type
90 ,offer_letter_file_name = p_rec.offer_letter_file_name
91 ,attribute_category = p_rec.attribute_category
92 ,attribute1 = p_rec.attribute1
93 ,attribute2 = p_rec.attribute2
94 ,attribute3 = p_rec.attribute3
95 ,attribute4 = p_rec.attribute4
96 ,attribute5 = p_rec.attribute5
97 ,attribute6 = p_rec.attribute6
98 ,attribute7 = p_rec.attribute7
99 ,attribute8 = p_rec.attribute8
100 ,attribute9 = p_rec.attribute9
101 ,attribute10 = p_rec.attribute10
102 ,attribute11 = p_rec.attribute11
103 ,attribute12 = p_rec.attribute12
104 ,attribute13 = p_rec.attribute13
105 ,attribute14 = p_rec.attribute14
106 ,attribute15 = p_rec.attribute15
107 ,attribute16 = p_rec.attribute16
108 ,attribute17 = p_rec.attribute17
109 ,attribute18 = p_rec.attribute18
110 ,attribute19 = p_rec.attribute19
111 ,attribute20 = p_rec.attribute20
112 ,attribute21 = p_rec.attribute21
113 ,attribute22 = p_rec.attribute22
114 ,attribute23 = p_rec.attribute23
115 ,attribute24 = p_rec.attribute24
116 ,attribute25 = p_rec.attribute25
117 ,attribute26 = p_rec.attribute26
118 ,attribute27 = p_rec.attribute27
119 ,attribute28 = p_rec.attribute28
120 ,attribute29 = p_rec.attribute29
121 ,attribute30 = p_rec.attribute30
122 ,object_version_number = p_rec.object_version_number
123 where offer_id = p_rec.offer_id;
124 --
125 --
126 --
127 hr_utility.set_location(' leaving:'||l_proc, 10);
128 --
129 exception
130 when hr_api.check_integrity_violated then
131 -- a check constraint has been violated
132 --
133 irc_iof_shd.constraint_error
134 (p_constraint_name => hr_api.strip_constraint_name(sqlerrm));
135 when hr_api.parent_integrity_violated then
136 -- parent integrity has been violated
137 --
138 irc_iof_shd.constraint_error
139 (p_constraint_name => hr_api.strip_constraint_name(sqlerrm));
140 when hr_api.unique_integrity_violated then
141 -- unique integrity has been violated
142 --
143 irc_iof_shd.constraint_error
144 (p_constraint_name => hr_api.strip_constraint_name(sqlerrm));
145 when others then
146 --
147 raise;
148 end update_dml;
149 --
150 -- ----------------------------------------------------------------------------
151 -- |------------------------------< pre_update >------------------------------|
152 -- ----------------------------------------------------------------------------
153 -- {start of comments}
154 --
155 -- description:
156 -- this private procedure contains any processing which is required before
157 -- the update dml.
158 --
159 -- prerequisites:
160 -- this is an internal procedure which is called from the upd procedure.
161 --
162 -- in parameters:
163 -- a pl/sql record structure.
164 --
165 -- post success:
166 -- processing continues.
167 --
168 -- post failure:
169 -- if an error has occurred, an error message and exception wil be raised
170 -- but not handled.
171 --
172 -- developer implementation notes:
173 -- any pre-processing required before the update dml is issued should be
174 -- coded within this procedure. it is important to note that any 3rd party
175 -- maintenance should be reviewed before placing in this procedure.
176 --
177 -- access status:
178 -- internal row handler use only.
179 --
180 -- {end of comments}
181 -- ----------------------------------------------------------------------------
182 procedure pre_update
183 (p_rec in irc_iof_shd.g_rec_type
184 ) is
185 --
186 l_proc varchar2(72) := g_package||'pre_update';
187 --
188 begin
189 hr_utility.set_location('entering:'||l_proc, 5);
190 --
191 hr_utility.set_location(' leaving:'||l_proc, 10);
192 end pre_update;
193 --
194 -- ----------------------------------------------------------------------------
195 -- |-----------------------------< post_update >------------------------------|
196 -- ----------------------------------------------------------------------------
197 -- {start of comments}
198 --
199 -- description:
200 -- this private procedure contains any processing which is required after
201 -- the update dml.
202 --
203 -- prerequisites:
204 -- this is an internal procedure which is called from the upd procedure.
205 --
206 -- in parameters:
207 -- a pl/sql record structure.
208 --
209 -- post success:
210 -- processing continues.
211 --
212 -- post failure:
213 -- if an error has occurred, an error message and exception will be raised
214 -- but not handled.
215 --
216 -- developer implementation notes:
217 -- any post-processing required after the update dml is issued should be
218 -- coded within this procedure. it is important to note that any 3rd party
219 -- maintenance should be reviewed before placing in this procedure.
220 --
221 -- access status:
222 -- internal row handler use only.
223 --
224 -- {end of comments}
225 -- ----------------------------------------------------------------------------
226 procedure post_update
227 (p_effective_date in date
228 ,p_rec in irc_iof_shd.g_rec_type
229 ) is
230 --
231 l_proc varchar2(72) := g_package||'post_update';
232 --
233 begin
234 hr_utility.set_location('entering:'||l_proc, 5);
235 begin
236 --
237 irc_iof_rku.after_update
238 (p_effective_date => p_effective_date
239 ,p_offer_id
240 => p_rec.offer_id
241 ,p_offer_version
242 => p_rec.offer_version
243 ,p_latest_offer
244 => p_rec.latest_offer
245 ,p_offer_status
246 => p_rec.offer_status
247 ,p_discretionary_job_title
248 => p_rec.discretionary_job_title
249 ,p_offer_extended_method
250 => p_rec.offer_extended_method
251 ,p_respondent_id
252 => p_rec.respondent_id
253 ,p_expiry_date
254 => p_rec.expiry_date
255 ,p_proposed_start_date
256 => p_rec.proposed_start_date
257 ,p_offer_letter_tracking_code
258 => p_rec.offer_letter_tracking_code
259 ,p_offer_postal_service
260 => p_rec.offer_postal_service
261 ,p_offer_shipping_date
262 => p_rec.offer_shipping_date
263 ,p_vacancy_id
264 => p_rec.vacancy_id
265 ,p_applicant_assignment_id
266 => p_rec.applicant_assignment_id
267 ,p_offer_assignment_id
268 => p_rec.offer_assignment_id
269 ,p_address_id
270 => p_rec.address_id
271 ,p_template_id
272 => p_rec.template_id
273 ,p_offer_letter_file_type
274 => p_rec.offer_letter_file_type
275 ,p_offer_letter_file_name
276 => p_rec.offer_letter_file_name
277 ,p_attribute_category
278 => p_rec.attribute_category
279 ,p_attribute1
280 => p_rec.attribute1
281 ,p_attribute2
282 => p_rec.attribute2
283 ,p_attribute3
284 => p_rec.attribute3
285 ,p_attribute4
286 => p_rec.attribute4
287 ,p_attribute5
288 => p_rec.attribute5
289 ,p_attribute6
290 => p_rec.attribute6
291 ,p_attribute7
292 => p_rec.attribute7
293 ,p_attribute8
294 => p_rec.attribute8
295 ,p_attribute9
296 => p_rec.attribute9
297 ,p_attribute10
298 => p_rec.attribute10
299 ,p_attribute11
300 => p_rec.attribute11
301 ,p_attribute12
302 => p_rec.attribute12
303 ,p_attribute13
304 => p_rec.attribute13
305 ,p_attribute14
306 => p_rec.attribute14
307 ,p_attribute15
308 => p_rec.attribute15
309 ,p_attribute16
310 => p_rec.attribute16
311 ,p_attribute17
312 => p_rec.attribute17
313 ,p_attribute18
314 => p_rec.attribute18
315 ,p_attribute19
316 => p_rec.attribute19
317 ,p_attribute20
318 => p_rec.attribute20
319 ,p_attribute21
320 => p_rec.attribute21
321 ,p_attribute22
322 => p_rec.attribute22
323 ,p_attribute23
324 => p_rec.attribute23
325 ,p_attribute24
326 => p_rec.attribute24
327 ,p_attribute25
328 => p_rec.attribute25
329 ,p_attribute26
330 => p_rec.attribute26
331 ,p_attribute27
332 => p_rec.attribute27
333 ,p_attribute28
334 => p_rec.attribute28
335 ,p_attribute29
336 => p_rec.attribute29
337 ,p_attribute30
338 => p_rec.attribute30
339 ,p_object_version_number
340 => p_rec.object_version_number
341 ,p_offer_version_o
342 => irc_iof_shd.g_old_rec.offer_version
343 ,p_latest_offer_o
344 => irc_iof_shd.g_old_rec.latest_offer
345 ,p_offer_status_o
346 => irc_iof_shd.g_old_rec.offer_status
347 ,p_discretionary_job_title_o
348 => irc_iof_shd.g_old_rec.discretionary_job_title
349 ,p_offer_extended_method_o
350 => irc_iof_shd.g_old_rec.offer_extended_method
351 ,p_respondent_id_o
352 => irc_iof_shd.g_old_rec.respondent_id
353 ,p_expiry_date_o
354 => irc_iof_shd.g_old_rec.expiry_date
355 ,p_proposed_start_date_o
356 => irc_iof_shd.g_old_rec.proposed_start_date
357 ,p_offer_letter_tracking_code_o
358 => irc_iof_shd.g_old_rec.offer_letter_tracking_code
359 ,p_offer_postal_service_o
360 => irc_iof_shd.g_old_rec.offer_postal_service
361 ,p_offer_shipping_date_o
362 => irc_iof_shd.g_old_rec.offer_shipping_date
363 ,p_vacancy_id_o
364 => irc_iof_shd.g_old_rec.vacancy_id
365 ,p_applicant_assignment_id_o
366 => irc_iof_shd.g_old_rec.applicant_assignment_id
367 ,p_offer_assignment_id_o
368 => irc_iof_shd.g_old_rec.offer_assignment_id
369 ,p_address_id_o
370 => irc_iof_shd.g_old_rec.address_id
371 ,p_template_id_o
372 => irc_iof_shd.g_old_rec.template_id
373 ,p_offer_letter_file_type_o
374 => irc_iof_shd.g_old_rec.offer_letter_file_type
375 ,p_offer_letter_file_name_o
376 => irc_iof_shd.g_old_rec.offer_letter_file_name
377 ,p_attribute_category_o
378 => irc_iof_shd.g_old_rec.attribute_category
379 ,p_attribute1_o
380 => irc_iof_shd.g_old_rec.attribute1
381 ,p_attribute2_o
382 => irc_iof_shd.g_old_rec.attribute2
383 ,p_attribute3_o
384 => irc_iof_shd.g_old_rec.attribute3
385 ,p_attribute4_o
386 => irc_iof_shd.g_old_rec.attribute4
387 ,p_attribute5_o
388 => irc_iof_shd.g_old_rec.attribute5
389 ,p_attribute6_o
390 => irc_iof_shd.g_old_rec.attribute6
391 ,p_attribute7_o
392 => irc_iof_shd.g_old_rec.attribute7
393 ,p_attribute8_o
394 => irc_iof_shd.g_old_rec.attribute8
395 ,p_attribute9_o
396 => irc_iof_shd.g_old_rec.attribute9
397 ,p_attribute10_o
398 => irc_iof_shd.g_old_rec.attribute10
399 ,p_attribute11_o
400 => irc_iof_shd.g_old_rec.attribute11
401 ,p_attribute12_o
402 => irc_iof_shd.g_old_rec.attribute12
403 ,p_attribute13_o
404 => irc_iof_shd.g_old_rec.attribute13
405 ,p_attribute14_o
406 => irc_iof_shd.g_old_rec.attribute14
407 ,p_attribute15_o
408 => irc_iof_shd.g_old_rec.attribute15
409 ,p_attribute16_o
410 => irc_iof_shd.g_old_rec.attribute16
411 ,p_attribute17_o
412 => irc_iof_shd.g_old_rec.attribute17
413 ,p_attribute18_o
414 => irc_iof_shd.g_old_rec.attribute18
415 ,p_attribute19_o
416 => irc_iof_shd.g_old_rec.attribute19
417 ,p_attribute20_o
418 => irc_iof_shd.g_old_rec.attribute20
419 ,p_attribute21_o
420 => irc_iof_shd.g_old_rec.attribute21
421 ,p_attribute22_o
422 => irc_iof_shd.g_old_rec.attribute22
423 ,p_attribute23_o
424 => irc_iof_shd.g_old_rec.attribute23
425 ,p_attribute24_o
426 => irc_iof_shd.g_old_rec.attribute24
427 ,p_attribute25_o
428 => irc_iof_shd.g_old_rec.attribute25
429 ,p_attribute26_o
430 => irc_iof_shd.g_old_rec.attribute26
431 ,p_attribute27_o
432 => irc_iof_shd.g_old_rec.attribute27
433 ,p_attribute28_o
434 => irc_iof_shd.g_old_rec.attribute28
435 ,p_attribute29_o
436 => irc_iof_shd.g_old_rec.attribute29
437 ,p_attribute30_o
438 => irc_iof_shd.g_old_rec.attribute30
439 ,p_object_version_number_o
440 => irc_iof_shd.g_old_rec.object_version_number
441 );
442 --
443 exception
444 --
445 when hr_api.cannot_find_prog_unit then
446 --
447 hr_api.cannot_find_prog_unit_error
448 (p_module_name => 'irc_offers'
449 ,p_hook_type => 'au');
450 --
451 end;
452 --
453 hr_utility.set_location(' leaving:'||l_proc, 10);
454 end post_update;
455 --
456 -- ----------------------------------------------------------------------------
457 -- |-----------------------------< convert_defs >-----------------------------|
458 -- ----------------------------------------------------------------------------
459 -- {start of comments}
460 --
461 -- description:
462 -- the convert_defs procedure has one very important function:
463 -- it must return the record structure for the row with all system defaulted
464 -- values converted into its corresponding parameter value for update. when
465 -- we attempt to update a row through the upd process , certain
466 -- parameters can be defaulted which enables flexibility in the calling of
467 -- the upd process (e.g. only attributes which need to be updated need to be
468 -- specified). for the upd process to determine which attributes
469 -- have not been specified we need to check if the parameter has a reserved
470 -- system default value. therefore, for all parameters which have a
471 -- corresponding reserved system default mechanism specified we need to
472 -- check if a system default is being used. if a system default is being
473 -- used then we convert the defaulted value into its corresponding attribute
474 -- value held in the g_old_rec data structure.
475 --
476 -- prerequisites:
477 -- this private function can only be called from the upd process.
478 --
479 -- in parameters:
480 -- a pl/sql record structure.
481 --
482 -- post success:
483 -- the record structure will be returned with all system defaulted parameter
484 -- values converted into its current row attribute value.
485 --
486 -- post failure:
487 -- no direct error handling is required within this function. any possible
488 -- errors within this procedure will be a pl/sql value error due to
489 -- conversion of datatypes or data lengths.
490 --
491 -- developer implementation notes:
492 -- none.
493 --
494 -- access status:
495 -- internal row handler use only.
496 --
497 -- {end of comments}
498 -- ----------------------------------------------------------------------------
499 procedure convert_defs
500 (p_rec in out nocopy irc_iof_shd.g_rec_type
501 ) is
502 --
503 begin
504 --
505 -- we must now examine each argument value in the
506 -- p_rec plsql record structure
507 -- to see if a system default is being used. if a system default
508 -- is being used then we must set to the 'current' argument value.
509 --
510 if (p_rec.offer_version = hr_api.g_number) then
511 p_rec.offer_version :=
512 irc_iof_shd.g_old_rec.offer_version;
513 end if;
514 if (p_rec.latest_offer = hr_api.g_varchar2) then
515 p_rec.latest_offer :=
516 irc_iof_shd.g_old_rec.latest_offer;
517 end if;
518 if (p_rec.offer_status = hr_api.g_varchar2) then
519 p_rec.offer_status :=
520 irc_iof_shd.g_old_rec.offer_status;
521 end if;
522 if (p_rec.discretionary_job_title = hr_api.g_varchar2) then
523 p_rec.discretionary_job_title :=
524 irc_iof_shd.g_old_rec.discretionary_job_title;
525 end if;
526 if (p_rec.offer_extended_method = hr_api.g_varchar2) then
527 p_rec.offer_extended_method :=
528 irc_iof_shd.g_old_rec.offer_extended_method;
529 end if;
530 if (p_rec.respondent_id = hr_api.g_number) then
531 p_rec.respondent_id :=
532 irc_iof_shd.g_old_rec.respondent_id;
533 end if;
534 if (p_rec.expiry_date = hr_api.g_date) then
535 p_rec.expiry_date :=
536 irc_iof_shd.g_old_rec.expiry_date;
537 end if;
538 if (p_rec.proposed_start_date = hr_api.g_date) then
539 p_rec.proposed_start_date :=
540 irc_iof_shd.g_old_rec.proposed_start_date;
541 end if;
542 if (p_rec.offer_letter_tracking_code = hr_api.g_varchar2) then
543 p_rec.offer_letter_tracking_code :=
544 irc_iof_shd.g_old_rec.offer_letter_tracking_code;
545 end if;
546 if (p_rec.offer_postal_service = hr_api.g_varchar2) then
547 p_rec.offer_postal_service :=
548 irc_iof_shd.g_old_rec.offer_postal_service;
549 end if;
550 if (p_rec.offer_shipping_date = hr_api.g_date) then
551 p_rec.offer_shipping_date :=
552 irc_iof_shd.g_old_rec.offer_shipping_date;
553 end if;
554 if (p_rec.vacancy_id = hr_api.g_number) then
555 p_rec.vacancy_id :=
556 irc_iof_shd.g_old_rec.vacancy_id;
557 end if;
558 if (p_rec.applicant_assignment_id = hr_api.g_number) then
559 p_rec.applicant_assignment_id :=
560 irc_iof_shd.g_old_rec.applicant_assignment_id;
561 end if;
562 if (p_rec.offer_assignment_id = hr_api.g_number) then
563 p_rec.offer_assignment_id :=
564 irc_iof_shd.g_old_rec.offer_assignment_id;
565 end if;
566 if (p_rec.address_id = hr_api.g_number) then
567 p_rec.address_id :=
568 irc_iof_shd.g_old_rec.address_id;
569 end if;
570 if (p_rec.template_id = hr_api.g_number) then
571 p_rec.template_id :=
572 irc_iof_shd.g_old_rec.template_id;
573 end if;
574 if (p_rec.offer_letter_file_type = hr_api.g_varchar2) then
575 p_rec.offer_letter_file_type :=
576 irc_iof_shd.g_old_rec.offer_letter_file_type;
577 end if;
578 if (p_rec.offer_letter_file_name = hr_api.g_varchar2) then
579 p_rec.offer_letter_file_name :=
580 irc_iof_shd.g_old_rec.offer_letter_file_name;
581 end if;
582 if (p_rec.attribute_category = hr_api.g_varchar2) then
583 p_rec.attribute_category :=
584 irc_iof_shd.g_old_rec.attribute_category;
585 end if;
586 if (p_rec.attribute1 = hr_api.g_varchar2) then
587 p_rec.attribute1 :=
588 irc_iof_shd.g_old_rec.attribute1;
589 end if;
590 if (p_rec.attribute2 = hr_api.g_varchar2) then
591 p_rec.attribute2 :=
592 irc_iof_shd.g_old_rec.attribute2;
593 end if;
594 if (p_rec.attribute3 = hr_api.g_varchar2) then
595 p_rec.attribute3 :=
596 irc_iof_shd.g_old_rec.attribute3;
597 end if;
598 if (p_rec.attribute4 = hr_api.g_varchar2) then
599 p_rec.attribute4 :=
600 irc_iof_shd.g_old_rec.attribute4;
601 end if;
602 if (p_rec.attribute5 = hr_api.g_varchar2) then
603 p_rec.attribute5 :=
604 irc_iof_shd.g_old_rec.attribute5;
605 end if;
606 if (p_rec.attribute6 = hr_api.g_varchar2) then
607 p_rec.attribute6 :=
608 irc_iof_shd.g_old_rec.attribute6;
609 end if;
610 if (p_rec.attribute7 = hr_api.g_varchar2) then
611 p_rec.attribute7 :=
612 irc_iof_shd.g_old_rec.attribute7;
613 end if;
614 if (p_rec.attribute8 = hr_api.g_varchar2) then
615 p_rec.attribute8 :=
616 irc_iof_shd.g_old_rec.attribute8;
617 end if;
618 if (p_rec.attribute9 = hr_api.g_varchar2) then
619 p_rec.attribute9 :=
620 irc_iof_shd.g_old_rec.attribute9;
621 end if;
622 if (p_rec.attribute10 = hr_api.g_varchar2) then
623 p_rec.attribute10 :=
624 irc_iof_shd.g_old_rec.attribute10;
625 end if;
626 if (p_rec.attribute11 = hr_api.g_varchar2) then
627 p_rec.attribute11 :=
628 irc_iof_shd.g_old_rec.attribute11;
629 end if;
630 if (p_rec.attribute12 = hr_api.g_varchar2) then
631 p_rec.attribute12 :=
632 irc_iof_shd.g_old_rec.attribute12;
633 end if;
634 if (p_rec.attribute13 = hr_api.g_varchar2) then
635 p_rec.attribute13 :=
636 irc_iof_shd.g_old_rec.attribute13;
637 end if;
638 if (p_rec.attribute14 = hr_api.g_varchar2) then
639 p_rec.attribute14 :=
640 irc_iof_shd.g_old_rec.attribute14;
641 end if;
642 if (p_rec.attribute15 = hr_api.g_varchar2) then
643 p_rec.attribute15 :=
644 irc_iof_shd.g_old_rec.attribute15;
645 end if;
646 if (p_rec.attribute16 = hr_api.g_varchar2) then
647 p_rec.attribute16 :=
648 irc_iof_shd.g_old_rec.attribute16;
649 end if;
650 if (p_rec.attribute17 = hr_api.g_varchar2) then
651 p_rec.attribute17 :=
652 irc_iof_shd.g_old_rec.attribute17;
653 end if;
654 if (p_rec.attribute18 = hr_api.g_varchar2) then
655 p_rec.attribute18 :=
656 irc_iof_shd.g_old_rec.attribute18;
657 end if;
658 if (p_rec.attribute19 = hr_api.g_varchar2) then
659 p_rec.attribute19 :=
660 irc_iof_shd.g_old_rec.attribute19;
661 end if;
662 if (p_rec.attribute20 = hr_api.g_varchar2) then
663 p_rec.attribute20 :=
664 irc_iof_shd.g_old_rec.attribute20;
665 end if;
666 if (p_rec.attribute21 = hr_api.g_varchar2) then
667 p_rec.attribute21 :=
668 irc_iof_shd.g_old_rec.attribute21;
669 end if;
670 if (p_rec.attribute22 = hr_api.g_varchar2) then
671 p_rec.attribute22 :=
672 irc_iof_shd.g_old_rec.attribute22;
673 end if;
674 if (p_rec.attribute23 = hr_api.g_varchar2) then
675 p_rec.attribute23 :=
676 irc_iof_shd.g_old_rec.attribute23;
677 end if;
678 if (p_rec.attribute24 = hr_api.g_varchar2) then
679 p_rec.attribute24 :=
680 irc_iof_shd.g_old_rec.attribute24;
681 end if;
682 if (p_rec.attribute25 = hr_api.g_varchar2) then
683 p_rec.attribute25 :=
684 irc_iof_shd.g_old_rec.attribute25;
685 end if;
686 if (p_rec.attribute26 = hr_api.g_varchar2) then
687 p_rec.attribute26 :=
688 irc_iof_shd.g_old_rec.attribute26;
689 end if;
690 if (p_rec.attribute27 = hr_api.g_varchar2) then
691 p_rec.attribute27 :=
692 irc_iof_shd.g_old_rec.attribute27;
693 end if;
694 if (p_rec.attribute28 = hr_api.g_varchar2) then
695 p_rec.attribute28 :=
696 irc_iof_shd.g_old_rec.attribute28;
697 end if;
698 if (p_rec.attribute29 = hr_api.g_varchar2) then
699 p_rec.attribute29 :=
700 irc_iof_shd.g_old_rec.attribute29;
701 end if;
702 if (p_rec.attribute30 = hr_api.g_varchar2) then
703 p_rec.attribute30 :=
704 irc_iof_shd.g_old_rec.attribute30;
705 end if;
706 --
707 end convert_defs;
708 --
709 -- ----------------------------------------------------------------------------
710 -- |---------------------------------< upd >----------------------------------|
711 -- ----------------------------------------------------------------------------
712 procedure upd
713 (p_effective_date in date
714 ,p_rec in out nocopy irc_iof_shd.g_rec_type
715 ) is
716 --
717 l_proc varchar2(72) := g_package||'upd';
718 --
719 begin
720 hr_utility.set_location('entering:'||l_proc, 5);
721 --
722 -- we must lock the row which we need to update.
723 --
724 irc_iof_shd.lck
725 (p_rec.offer_id
726 ,p_rec.object_version_number
727 );
728 --
729 -- 1. during an update system defaults are used to determine if
730 -- arguments have been defaulted or not. we must therefore
731 -- derive the full record structure values to be updated.
732 --
733 -- 2. call the supporting update validate operations.
734 --
735 convert_defs(p_rec);
736 irc_iof_bus.update_validate
737 (p_effective_date
738 ,p_rec
739 );
740 --
741 -- call to raise any errors on multi-message list
742 hr_multi_message.end_validation_set;
743 --
744 -- call the supporting pre-update operation
745 --
746 irc_iof_upd.pre_update(p_rec);
747 --
748 -- update the row.
749 --
750 irc_iof_upd.update_dml(p_rec);
751 --
752 -- call the supporting post-update operation
753 --
754 irc_iof_upd.post_update
755 (p_effective_date
756 ,p_rec
757 );
758 --
759 -- call to raise any errors on multi-message list
760 hr_multi_message.end_validation_set;
761 end upd;
762 --
763 -- ----------------------------------------------------------------------------
764 -- |---------------------------------< upd >----------------------------------|
765 -- ----------------------------------------------------------------------------
766 procedure upd
767 (p_effective_date in date
768 ,p_offer_id in number
769 ,p_object_version_number in out nocopy number
770 ,p_offer_version out nocopy number
771 ,p_latest_offer in varchar2 default hr_api.g_varchar2
772 ,p_applicant_assignment_id in number default hr_api.g_number
773 ,p_offer_assignment_id in number default hr_api.g_number
774 ,p_offer_status in varchar2 default hr_api.g_varchar2
775 ,p_discretionary_job_title in varchar2 default hr_api.g_varchar2
776 ,p_offer_extended_method in varchar2 default hr_api.g_varchar2
777 ,p_respondent_id in number default hr_api.g_number
778 ,p_expiry_date in date default hr_api.g_date
779 ,p_proposed_start_date in date default hr_api.g_date
780 ,p_offer_letter_tracking_code in varchar2 default hr_api.g_varchar2
781 ,p_offer_postal_service in varchar2 default hr_api.g_varchar2
782 ,p_offer_shipping_date in date default hr_api.g_date
783 ,p_address_id in number default hr_api.g_number
784 ,p_template_id in number default hr_api.g_number
785 ,p_offer_letter_file_type in varchar2 default hr_api.g_varchar2
786 ,p_offer_letter_file_name in varchar2 default hr_api.g_varchar2
787 ,p_attribute_category in varchar2 default hr_api.g_varchar2
788 ,p_attribute1 in varchar2 default hr_api.g_varchar2
789 ,p_attribute2 in varchar2 default hr_api.g_varchar2
790 ,p_attribute3 in varchar2 default hr_api.g_varchar2
791 ,p_attribute4 in varchar2 default hr_api.g_varchar2
792 ,p_attribute5 in varchar2 default hr_api.g_varchar2
793 ,p_attribute6 in varchar2 default hr_api.g_varchar2
794 ,p_attribute7 in varchar2 default hr_api.g_varchar2
795 ,p_attribute8 in varchar2 default hr_api.g_varchar2
796 ,p_attribute9 in varchar2 default hr_api.g_varchar2
797 ,p_attribute10 in varchar2 default hr_api.g_varchar2
798 ,p_attribute11 in varchar2 default hr_api.g_varchar2
799 ,p_attribute12 in varchar2 default hr_api.g_varchar2
800 ,p_attribute13 in varchar2 default hr_api.g_varchar2
801 ,p_attribute14 in varchar2 default hr_api.g_varchar2
802 ,p_attribute15 in varchar2 default hr_api.g_varchar2
803 ,p_attribute16 in varchar2 default hr_api.g_varchar2
804 ,p_attribute17 in varchar2 default hr_api.g_varchar2
805 ,p_attribute18 in varchar2 default hr_api.g_varchar2
806 ,p_attribute19 in varchar2 default hr_api.g_varchar2
807 ,p_attribute20 in varchar2 default hr_api.g_varchar2
808 ,p_attribute21 in varchar2 default hr_api.g_varchar2
809 ,p_attribute22 in varchar2 default hr_api.g_varchar2
810 ,p_attribute23 in varchar2 default hr_api.g_varchar2
811 ,p_attribute24 in varchar2 default hr_api.g_varchar2
812 ,p_attribute25 in varchar2 default hr_api.g_varchar2
813 ,p_attribute26 in varchar2 default hr_api.g_varchar2
814 ,p_attribute27 in varchar2 default hr_api.g_varchar2
815 ,p_attribute28 in varchar2 default hr_api.g_varchar2
816 ,p_attribute29 in varchar2 default hr_api.g_varchar2
817 ,p_attribute30 in varchar2 default hr_api.g_varchar2
818 ) is
819 --
820 l_rec irc_iof_shd.g_rec_type;
821 l_proc varchar2(72) := g_package||'upd';
822 --
823 begin
824 hr_utility.set_location('entering:'||l_proc, 5);
825 --
826 -- call conversion function to turn arguments into the
827 -- l_rec structure.
828 --
829 l_rec :=
830 irc_iof_shd.convert_args
831 (p_offer_id
832 ,hr_api.g_number -- offer_version
833 ,p_latest_offer
834 ,p_offer_status
835 ,p_discretionary_job_title
836 ,p_offer_extended_method
837 ,p_respondent_id
838 ,p_expiry_date
839 ,p_proposed_start_date
840 ,p_offer_letter_tracking_code
841 ,p_offer_postal_service
842 ,p_offer_shipping_date
843 ,hr_api.g_number -- vacancy_id
844 ,p_applicant_assignment_id
845 ,p_offer_assignment_id
846 ,p_address_id
847 ,p_template_id
848 ,p_offer_letter_file_type
849 ,p_offer_letter_file_name
850 ,p_attribute_category
851 ,p_attribute1
852 ,p_attribute2
853 ,p_attribute3
854 ,p_attribute4
855 ,p_attribute5
856 ,p_attribute6
857 ,p_attribute7
858 ,p_attribute8
859 ,p_attribute9
860 ,p_attribute10
861 ,p_attribute11
862 ,p_attribute12
863 ,p_attribute13
864 ,p_attribute14
865 ,p_attribute15
866 ,p_attribute16
867 ,p_attribute17
868 ,p_attribute18
869 ,p_attribute19
870 ,p_attribute20
871 ,p_attribute21
872 ,p_attribute22
873 ,p_attribute23
874 ,p_attribute24
875 ,p_attribute25
876 ,p_attribute26
877 ,p_attribute27
878 ,p_attribute28
879 ,p_attribute29
880 ,p_attribute30
881 ,p_object_version_number
882 );
883 --
884 -- having converted the arguments into the
885 -- plsql record structure we call the corresponding record
886 -- business process.
887 --
888 irc_iof_upd.upd
889 (p_effective_date
890 ,l_rec
891 );
892 --
893 p_object_version_number := l_rec.object_version_number;
894 p_offer_version := l_rec.offer_version;
895 --
896 hr_utility.set_location(' leaving:'||l_proc, 10);
897 end upd;
898 --
899 end irc_iof_upd;