DBA Data[Home] [Help]

PACKAGE BODY: APPS.IRC_IID_UPD

Source


1 Package Body irc_iid_upd as
2 /* $Header: iriidrhi.pkb 120.3.12010000.2 2008/11/06 13:49:47 mkjayara ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package  varchar2(33) := '  irc_iid_upd.';  -- Global package name
9 --
10 -- ----------------------------------------------------------------------------
11 -- |----------------------------< dt_update_dml >-----------------------------|
12 -- ----------------------------------------------------------------------------
13 -- {Start Of Comments}
14 --
15 -- Description:
16 --   This procedure controls the execution of dml from the datetrack mode
17 --   of CORRECTION only. It is important to note that the object version
18 --   number is only increment by 1 because the datetrack correction is
19 --   soley for one datetracked row.
20 --   This procedure controls the actual dml update logic. The functions of
21 --   this procedure are as follows:
22 --   1) Get the next object_version_number.
23 --   2) To set and unset the g_api_dml status as required (as we are about to
24 --      perform dml).
25 --   3) To update the specified row in the schema using the primary key in
26 --      the predicates.
27 --   4) To trap any constraint violations that may have occurred.
28 --   5) To raise any other errors.
29 --
30 -- Prerequisites:
31 --   This is an internal private procedure which must be called from the
32 --   update_dml procedure.
33 --
34 -- In Parameters:
35 --   A Pl/Sql record structure.
36 --
37 -- Post Success:
38 --   The specified row will be updated in the schema.
39 --
40 -- Post Failure:
41 --   On the update dml failure it is important to note that we always reset the
42 --   g_api_dml status to false.
43 --   If a check or unique integrity constraint violation is raised the
44 --   constraint_error procedure will be called.
45 --   If any other error is reported, the error will be raised after the
46 --   g_api_dml status is reset.
47 --
48 -- Developer Implementation Notes:
49 --   The update 'set' arguments list should be modified if any of your
50 --   attributes are not updateable.
51 --
52 -- Access Status:
53 --   Internal Row Handler Use Only.
54 --
55 -- {End Of Comments}
56 -- ----------------------------------------------------------------------------
57 Procedure dt_update_dml
58   (p_rec                   in out nocopy irc_iid_shd.g_rec_type
59   ,p_effective_date        in date
60   ,p_datetrack_mode        in varchar2
61   ,p_validation_start_date in date
62   ,p_validation_end_date   in date
63   ) is
64 --
65   l_proc        varchar2(72) := g_package||'dt_update_dml';
66 --
67 Begin
68   hr_utility.set_location('Entering:'||l_proc, 5);
69   --
70   If (p_datetrack_mode = hr_api.g_correction) then
71     hr_utility.set_location(l_proc, 10);
72     --
73     -- Because we are updating a row we must get the next object
74     -- version number.
75     --
76     p_rec.object_version_number :=
77      irc_iid_shd.get_object_version_number
78         (p_interview_details_id =>  p_rec.interview_details_id
79       );
80     --
81     --
82     --
83     -- Update the irc_interview_details Row
84     --
85     update  irc_interview_details
86     set
87      interview_details_id                 = p_rec.interview_details_id
88     ,status                               = p_rec.status
89     ,feedback                             = p_rec.feedback
90     ,notes                                = p_rec.notes
91     ,notes_to_candidate                   = p_rec.notes_to_candidate
92     ,category                             = p_rec.category
93     ,result                               = p_rec.result
94     ,iid_information_category             = p_rec.iid_information_category
95     ,iid_information1                     = p_rec.iid_information1
96     ,iid_information2                     = p_rec.iid_information2
97     ,iid_information3                     = p_rec.iid_information3
98     ,iid_information4                     = p_rec.iid_information4
99     ,iid_information5                     = p_rec.iid_information5
100     ,iid_information6                     = p_rec.iid_information6
101     ,iid_information7                     = p_rec.iid_information7
102     ,iid_information8                     = p_rec.iid_information8
103     ,iid_information9                     = p_rec.iid_information9
104     ,iid_information10                    = p_rec.iid_information10
105     ,iid_information11                    = p_rec.iid_information11
106     ,iid_information12                    = p_rec.iid_information12
107     ,iid_information13                    = p_rec.iid_information13
108     ,iid_information14                    = p_rec.iid_information14
109     ,iid_information15                    = p_rec.iid_information15
110     ,iid_information16                    = p_rec.iid_information16
111     ,iid_information17                    = p_rec.iid_information17
112     ,iid_information18                    = p_rec.iid_information18
113     ,iid_information19                    = p_rec.iid_information19
114     ,iid_information20                    = p_rec.iid_information20
115     ,start_date                           = p_rec.start_date
116     ,end_date                             = p_rec.end_date
117     ,event_id                             = p_rec.event_id
118     ,object_version_number                = p_rec.object_version_number
119     where   interview_details_id  =   p_rec.interview_details_id
120     and     start_date = p_validation_start_date
121     and     ((p_validation_end_date is null and end_date is null) or
122               (end_date  = p_validation_end_date));
123     --
124     --
125     --
126     -- Set the effective start and end dates
127     --
128     p_rec.start_date := p_validation_start_date;
129     p_rec.end_date   := p_validation_end_date;
130   End If;
131 --
132 hr_utility.set_location(' Leaving:'||l_proc, 15);
133 Exception
134   When hr_api.check_integrity_violated Then
135     -- A check constraint has been violated
136     --
137     irc_iid_shd.constraint_error
138       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
139   When hr_api.unique_integrity_violated Then
140     -- Unique integrity has been violated
141     --
142     irc_iid_shd.constraint_error
143       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
144   When Others Then
145     --
146     Raise;
147 End dt_update_dml;
148 --
149 -- ----------------------------------------------------------------------------
150 -- |------------------------------< update_dml >------------------------------|
151 -- ----------------------------------------------------------------------------
152 -- {Start Of Comments}
153 --
154 -- Description:
155 --   This procedure calls the dt_update_dml control logic which handles
156 --   the actual datetrack dml.
157 --
158 -- Prerequisites:
159 --   This is an internal private procedure which must be called from the upd
160 --   procedure.
161 --
162 -- In Parameters:
163 --   A Pl/Sql record structre.
164 --
165 -- Post Success:
166 --   Processing contines.
167 --
168 -- Post Failure:
169 --   No specific error handling is required within this procedure.
170 --
171 -- Developer Implementation Notes:
172 --   The update 'set' arguments list should be modified if any of your
173 --   attributes are not updateable.
174 --
175 -- Access Status:
176 --   Internal Row Handler Use Only.
177 --
178 -- {End Of Comments}
179 -- ----------------------------------------------------------------------------
180 Procedure update_dml
181   (p_rec                      in out nocopy irc_iid_shd.g_rec_type
182   ,p_effective_date           in date
183   ,p_datetrack_mode           in varchar2
184   ,p_validation_start_date    in date
185   ,p_validation_end_date      in date
186   ) is
187 --
188   l_proc        varchar2(72) := g_package||'update_dml';
189 --
190 Begin
191   hr_utility.set_location('Entering:'||l_proc, 5);
192   --
193   irc_iid_upd.dt_update_dml
194     (p_rec                   => p_rec
195     ,p_effective_date        => p_effective_date
196     ,p_datetrack_mode        => p_datetrack_mode
197     ,p_validation_start_date => p_validation_start_date
198     ,p_validation_end_date   => p_validation_end_date
199     );
200   --
201   hr_utility.set_location(' Leaving:'||l_proc, 10);
202 End update_dml;
203 --
204 -- ----------------------------------------------------------------------------
205 -- |----------------------------< dt_pre_update >-----------------------------|
206 -- ----------------------------------------------------------------------------
207 -- {Start Of Comments}
208 --
209 -- Description:
210 --   The dt_pre_update procedure controls the execution
211 --   of dml for the datetrack modes of: UPDATE, UPDATE_OVERRIDE
212 --   and UPDATE_CHANGE_INSERT only. The execution required is as
213 --   follows:
214 --
215 --   1) Providing the datetrack update mode is not 'CORRECTION'
216 --      then set the effective end date of the current row (this
217 --      will be the validation_start_date - 1).
218 --   2) If the datetrack mode is 'UPDATE_OVERRIDE' then call the
219 --      corresponding delete_dml process to delete any future rows
220 --      where the effective_start_date is greater than or equal to
221 --      the validation_start_date.
222 --   3) Call the insert_dml process to insert the new updated row
223 --      details.
224 --
225 -- Prerequisites:
226 --   This is an internal procedure which is called from the
227 --   pre_update procedure.
228 --
229 -- In Parameters:
230 --
231 -- Post Success:
232 --   Processing continues.
233 --
234 -- Post Failure:
235 --   If an error has occurred, an error message and exception will be raised
236 --   but not handled.
237 --
238 -- Developer Implementation Notes:
239 --   This is an internal procedure which is required by Datetrack. Don't
240 --   remove or modify.
241 --
242 -- Access Status:
243 --   Internal Row Handler Use Only.
244 --
245 -- {End Of Comments}
246 -- ----------------------------------------------------------------------------
247 Procedure dt_pre_update
248   (p_rec                     in out  nocopy   irc_iid_shd.g_rec_type
249   ,p_effective_date          in date
250   ,p_datetrack_mode          in varchar2
251   ,p_validation_start_date   in date
252   ,p_validation_end_date     in date
253   ) is
254 --
255   l_proc                 varchar2(72) := g_package||'dt_pre_update';
256   l_dummy_version_number number;
257 --
258 Begin
259   hr_utility.set_location('Entering:'||l_proc, 5);
260   If (p_datetrack_mode <> hr_api.g_correction) then
261     --
262     -- Update the current effective end date
263     --
264     irc_iid_shd.upd_end_date
265       (p_effective_date         => p_effective_date
266       ,p_interview_details_id =>  p_rec.interview_details_id
267       ,p_new_end_date           => p_validation_start_date
268       ,p_object_version_number  => l_dummy_version_number
269       );
270     --
271     If (p_datetrack_mode = hr_api.g_update_override) then
272       --
273       -- As the datetrack mode is 'UPDATE_OVERRIDE' then we must
274       -- delete any future rows
275       --
276       irc_iid_del.delete_dml
277         (p_rec                   => p_rec
278         ,p_effective_date        => p_effective_date
279         ,p_datetrack_mode        => p_datetrack_mode
280         ,p_validation_start_date => p_validation_start_date
281         ,p_validation_end_date   => p_validation_end_date
282         );
283     End If;
284     --
285     -- We must now insert the updated row
286     --
287     irc_iid_ins.insert_dml
288       (p_rec                    => p_rec
289       ,p_effective_date         => p_effective_date
290       ,p_datetrack_mode         => p_datetrack_mode
291       ,p_validation_start_date  => p_validation_start_date
292       ,p_validation_end_date    => p_validation_end_date
293       );
294   End If;
295   hr_utility.set_location(' Leaving:'||l_proc, 20);
296 End dt_pre_update;
297 --
298 -- ----------------------------------------------------------------------------
299 -- |------------------------------< pre_update >------------------------------|
300 -- ----------------------------------------------------------------------------
301 -- {Start Of Comments}
302 --
303 -- Description:
304 --   This private procedure contains any processing which is required before
305 --   the update dml.
306 --
307 -- Prerequisites:
308 --   This is an internal procedure which is called from the upd procedure.
309 --
310 -- In Parameters:
311 --   A Pl/Sql record structure.
312 --
313 -- Post Success:
314 --   Processing continues.
315 --
316 -- Post Failure:
317 --   If an error has occurred, an error message and exception will be raised
318 --   but not handled.
319 -- Developer Implementation Notes:
320 --   Any pre-processing required before the update dml is issued should be
321 --   coded within this procedure. It is important to note that any 3rd party
322 --   maintenance should be reviewed before placing in this procedure. The call
323 --   to the dt_update_dml procedure should NOT be removed.
324 --
325 -- Access Status:
326 --   Internal Row Handler Use Only.
327 --
328 -- {End Of Comments}
329 -- ----------------------------------------------------------------------------
330 Procedure pre_update
331   (p_rec                   in out nocopy irc_iid_shd.g_rec_type
332   ,p_effective_date        in date
333   ,p_datetrack_mode        in varchar2
334   ,p_validation_start_date in date
335   ,p_validation_end_date   in date
336   ) is
337 --
338   l_proc        varchar2(72) := g_package||'pre_update';
339 --
340 Begin
341   hr_utility.set_location('Entering:'||l_proc, 5);
342   --
343   --
344   --
345   dt_pre_update
346     (p_rec                   => p_rec
347     ,p_effective_date        => p_effective_date
348     ,p_datetrack_mode        => p_datetrack_mode
349     ,p_validation_start_date => p_validation_start_date
350     ,p_validation_end_date   => p_validation_end_date
351     );
352   --
353   hr_utility.set_location(' Leaving:'||l_proc, 10);
354 End pre_update;
355 --
356 -- ----------------------------------------------------------------------------
357 -- |----------------------------< post_update >-------------------------------|
358 -- ----------------------------------------------------------------------------
359 -- {Start Of Comments}
360 --
361 -- Description:
362 --   This private procedure contains any processing which is required after
363 --   the update dml.
364 --
365 -- Prerequisites:
366 --   This is an internal procedure which is called from the upd procedure.
367 --
368 -- In Parameters:
369 --   A Pl/Sql record structure.
370 --
371 -- Post Success:
372 --   Processing continues.
373 --
374 -- Post Failure:
375 --   If an error has occurred, an error message and exception will be raised
376 --   but not handled.
377 --
378 -- Developer Implementation Notes:
379 --   Any post-processing required after the update dml is issued should be
380 --   coded within this procedure. It is important to note that any 3rd party
381 --   maintenance should be reviewed before placing in this procedure.
382 --
383 -- Access Status:
384 --   Internal Row Handler Use Only.
385 --
386 -- {End Of Comments}
387 -- ----------------------------------------------------------------------------
388 Procedure post_update
389   (p_rec                   in irc_iid_shd.g_rec_type
390   ,p_effective_date        in date
391   ,p_datetrack_mode        in varchar2
392   ,p_validation_start_date in date
393   ,p_validation_end_date   in date
394   ) is
395 --
396   l_proc        varchar2(72) := g_package||'post_update';
397 --
398 Begin
399   hr_utility.set_location('Entering:'||l_proc, 5);
400   begin
401     --
402     irc_iid_rku.after_update
403       (p_effective_date
404       => p_effective_date
405       ,p_datetrack_mode
406       => p_datetrack_mode
407       ,p_validation_start_date
408       => p_validation_start_date
409       ,p_validation_end_date
410       => p_validation_end_date
411       ,p_interview_details_id
412       => p_rec.interview_details_id
413       ,p_status
414       => p_rec.status
415       ,p_feedback
416       => p_rec.feedback
417       ,p_notes
418       => p_rec.notes
419       ,p_notes_to_candidate
420       => p_rec.notes_to_candidate
421       ,p_category
422       => p_rec.category
423       ,p_result
424       => p_rec.result
425       ,p_start_date
426       => p_rec.start_date
427       ,p_iid_information_category
428       => p_rec.iid_information_category
429       ,p_iid_information1
430       => p_rec.iid_information1
431       ,p_iid_information2
432       => p_rec.iid_information2
433       ,p_iid_information3
434       => p_rec.iid_information3
435       ,p_iid_information4
436       => p_rec.iid_information4
437       ,p_iid_information5
438       => p_rec.iid_information5
439       ,p_iid_information6
440       => p_rec.iid_information6
441       ,p_iid_information7
442       => p_rec.iid_information7
443       ,p_iid_information8
444       => p_rec.iid_information8
445       ,p_iid_information9
446       => p_rec.iid_information9
447       ,p_iid_information10
448       => p_rec.iid_information10
449       ,p_iid_information11
450       => p_rec.iid_information11
451       ,p_iid_information12
452       => p_rec.iid_information12
453       ,p_iid_information13
454       => p_rec.iid_information13
455       ,p_iid_information14
456       => p_rec.iid_information14
457       ,p_iid_information15
458       => p_rec.iid_information15
459       ,p_iid_information16
460       => p_rec.iid_information16
461       ,p_iid_information17
462       => p_rec.iid_information17
463       ,p_iid_information18
464       => p_rec.iid_information18
465       ,p_iid_information19
466       => p_rec.iid_information19
467       ,p_iid_information20
468       => p_rec.iid_information20
469       ,p_end_date
470       => p_rec.end_date
471       ,p_event_id
472       => p_rec.event_id
473       ,p_object_version_number
474       => p_rec.object_version_number
475       ,p_status_o
476       => irc_iid_shd.g_old_rec.status
477       ,p_feedback_o
478       => irc_iid_shd.g_old_rec.feedback
479       ,p_notes_o
480       => irc_iid_shd.g_old_rec.notes
481       ,p_notes_to_candidate_o
482       => irc_iid_shd.g_old_rec.notes_to_candidate
483       ,p_category_o
484       => irc_iid_shd.g_old_rec.category
485       ,p_result_o
486       => irc_iid_shd.g_old_rec.result
487       ,p_iid_information_category_o
488       => irc_iid_shd.g_old_rec.iid_information_category
489       ,p_iid_information1_o
490       => irc_iid_shd.g_old_rec.iid_information1
491       ,p_iid_information2_o
492       => irc_iid_shd.g_old_rec.iid_information2
493       ,p_iid_information3_o
494       => irc_iid_shd.g_old_rec.iid_information3
495       ,p_iid_information4_o
496       => irc_iid_shd.g_old_rec.iid_information4
497       ,p_iid_information5_o
498       => irc_iid_shd.g_old_rec.iid_information5
499       ,p_iid_information6_o
500       => irc_iid_shd.g_old_rec.iid_information6
501       ,p_iid_information7_o
502       => irc_iid_shd.g_old_rec.iid_information7
503       ,p_iid_information8_o
504       => irc_iid_shd.g_old_rec.iid_information8
505       ,p_iid_information9_o
506       => irc_iid_shd.g_old_rec.iid_information9
507       ,p_iid_information10_o
508       => irc_iid_shd.g_old_rec.iid_information10
509       ,p_iid_information11_o
510       => irc_iid_shd.g_old_rec.iid_information11
511       ,p_iid_information12_o
512       => irc_iid_shd.g_old_rec.iid_information12
513       ,p_iid_information13_o
514       => irc_iid_shd.g_old_rec.iid_information13
515       ,p_iid_information14_o
516       => irc_iid_shd.g_old_rec.iid_information14
517       ,p_iid_information15_o
518       => irc_iid_shd.g_old_rec.iid_information15
519       ,p_iid_information16_o
520       => irc_iid_shd.g_old_rec.iid_information16
521       ,p_iid_information17_o
522       => irc_iid_shd.g_old_rec.iid_information17
523       ,p_iid_information18_o
524       => irc_iid_shd.g_old_rec.iid_information18
525       ,p_iid_information19_o
526       => irc_iid_shd.g_old_rec.iid_information19
527       ,p_iid_information20_o
528       => irc_iid_shd.g_old_rec.iid_information20
529       ,p_start_date_o
530       => irc_iid_shd.g_old_rec.start_date
531       ,p_end_date_o
532       => irc_iid_shd.g_old_rec.end_date
533       ,p_event_id_o
534       => irc_iid_shd.g_old_rec.event_id
535       ,p_object_version_number_o
536       => irc_iid_shd.g_old_rec.object_version_number
537       );
538     --
539   exception
540     --
541     when hr_api.cannot_find_prog_unit then
542       --
543       hr_api.cannot_find_prog_unit_error
544         (p_module_name => 'IRC_INTERVIEW_DETAILS'
545         ,p_hook_type   => 'AU');
546       --
547   end;
548   --
549   hr_utility.set_location(' Leaving:'||l_proc, 10);
550 End post_update;
551 --
552 -- ----------------------------------------------------------------------------
553 -- |-----------------------------< convert_defs >-----------------------------|
554 -- ----------------------------------------------------------------------------
555 -- {Start Of Comments}
556 --
557 -- Description:
558 --   The Convert_Defs procedure has one very important function:
559 --   It must return the record structure for the row with all system defaulted
560 --   values converted into its corresponding parameter value for update. When
561 --   we attempt to update a row through the Upd process , certain
562 --   parameters can be defaulted which enables flexibility in the calling of
563 --   the upd process (e.g. only attributes which need to be updated need to be
564 --   specified). For the upd process to determine which attributes
565 --   have NOT been specified we need to check if the parameter has a reserved
566 --   system default value. Therefore, for all parameters which have a
567 --   corresponding reserved system default mechanism specified we need to
568 --   check if a system default is being used. If a system default is being
569 --   used then we convert the defaulted value into its corresponding attribute
570 --   value held in the g_old_rec data structure.
571 --
572 -- Prerequisites:
573 --   This private function can only be called from the upd process.
574 --
575 -- In Parameters:
576 --   A Pl/Sql record structure.
577 --
578 -- Post Success:
579 --   The record structure will be returned with all system defaulted parameter
580 --   values converted into its current row attribute value.
581 --
582 -- Post Failure:
583 --   No direct error handling is required within this function. Any possible
584 --   errors within this procedure will be a PL/SQL value error due to
585 --   conversion of datatypes or data lengths.
586 --
587 -- Developer Implementation Notes:
588 --   None.
589 --
590 -- Access Status:
591 --   Internal Row Handler Use Only.
592 --
593 -- {End Of Comments}
594 -- ----------------------------------------------------------------------------
595 Procedure convert_defs
596   (p_rec in out nocopy irc_iid_shd.g_rec_type
597   ) is
598 --
599 Begin
600   --
601   -- We must now examine each argument value in the
602   -- p_rec plsql record structure
603   -- to see if a system default is being used. If a system default
604   -- is being used then we must set to the 'current' argument value.
605   --
606   If (p_rec.status = hr_api.g_varchar2) then
607     p_rec.status :=
608     irc_iid_shd.g_old_rec.status;
609   End If;
610   If (p_rec.feedback = hr_api.g_varchar2) then
611     p_rec.feedback :=
612     irc_iid_shd.g_old_rec.feedback;
613   End If;
614   If (p_rec.notes = hr_api.g_varchar2) then
615     p_rec.notes :=
616     irc_iid_shd.g_old_rec.notes;
617   End If;
618   If (p_rec.notes_to_candidate = hr_api.g_varchar2) then
619     p_rec.notes_to_candidate :=
620     irc_iid_shd.g_old_rec.notes_to_candidate;
621   End If;
622   If (p_rec.category = hr_api.g_varchar2) then
623     p_rec.category :=
624     irc_iid_shd.g_old_rec.category;
625   End If;
626   If (p_rec.result = hr_api.g_varchar2) then
627     p_rec.result :=
628     irc_iid_shd.g_old_rec.result;
629   End If;
630   If (p_rec.iid_information_category = hr_api.g_varchar2) then
631     p_rec.iid_information_category :=
632     irc_iid_shd.g_old_rec.iid_information_category;
633   End If;
634   If (p_rec.iid_information1 = hr_api.g_varchar2) then
635     p_rec.iid_information1 :=
636     irc_iid_shd.g_old_rec.iid_information1;
637   End If;
638   If (p_rec.iid_information2 = hr_api.g_varchar2) then
639     p_rec.iid_information2 :=
640     irc_iid_shd.g_old_rec.iid_information2;
641   End If;
642   If (p_rec.iid_information3 = hr_api.g_varchar2) then
643     p_rec.iid_information3 :=
644     irc_iid_shd.g_old_rec.iid_information3;
645   End If;
646   If (p_rec.iid_information4 = hr_api.g_varchar2) then
647     p_rec.iid_information4 :=
648     irc_iid_shd.g_old_rec.iid_information4;
649   End If;
650   If (p_rec.iid_information5 = hr_api.g_varchar2) then
651     p_rec.iid_information5 :=
652     irc_iid_shd.g_old_rec.iid_information5;
653   End If;
654   If (p_rec.iid_information6 = hr_api.g_varchar2) then
655     p_rec.iid_information6 :=
656     irc_iid_shd.g_old_rec.iid_information6;
657   End If;
658   If (p_rec.iid_information7 = hr_api.g_varchar2) then
659     p_rec.iid_information7 :=
660     irc_iid_shd.g_old_rec.iid_information7;
661   End If;
662   If (p_rec.iid_information8 = hr_api.g_varchar2) then
663     p_rec.iid_information8 :=
664     irc_iid_shd.g_old_rec.iid_information8;
665   End If;
666   If (p_rec.iid_information9 = hr_api.g_varchar2) then
667     p_rec.iid_information9 :=
668     irc_iid_shd.g_old_rec.iid_information9;
669   End If;
670   If (p_rec.iid_information10 = hr_api.g_varchar2) then
671     p_rec.iid_information10 :=
672     irc_iid_shd.g_old_rec.iid_information10;
673   End If;
674   If (p_rec.iid_information11 = hr_api.g_varchar2) then
675     p_rec.iid_information11 :=
676     irc_iid_shd.g_old_rec.iid_information11;
677   End If;
678   If (p_rec.iid_information12 = hr_api.g_varchar2) then
679     p_rec.iid_information12 :=
680     irc_iid_shd.g_old_rec.iid_information12;
681   End If;
682   If (p_rec.iid_information13 = hr_api.g_varchar2) then
683     p_rec.iid_information13 :=
684     irc_iid_shd.g_old_rec.iid_information13;
685   End If;
686   If (p_rec.iid_information14 = hr_api.g_varchar2) then
687     p_rec.iid_information14 :=
688     irc_iid_shd.g_old_rec.iid_information14;
689   End If;
690   If (p_rec.iid_information15 = hr_api.g_varchar2) then
691     p_rec.iid_information15 :=
692     irc_iid_shd.g_old_rec.iid_information15;
693   End If;
694   If (p_rec.iid_information16 = hr_api.g_varchar2) then
695     p_rec.iid_information16 :=
696     irc_iid_shd.g_old_rec.iid_information16;
697   End If;
698   If (p_rec.iid_information17 = hr_api.g_varchar2) then
699     p_rec.iid_information17 :=
700     irc_iid_shd.g_old_rec.iid_information17;
701   End If;
702   If (p_rec.iid_information18 = hr_api.g_varchar2) then
703     p_rec.iid_information18 :=
704     irc_iid_shd.g_old_rec.iid_information18;
705   End If;
706   If (p_rec.iid_information19 = hr_api.g_varchar2) then
707     p_rec.iid_information19 :=
708     irc_iid_shd.g_old_rec.iid_information19;
709   End If;
710   If (p_rec.iid_information20 = hr_api.g_varchar2) then
711     p_rec.iid_information20 :=
712     irc_iid_shd.g_old_rec.iid_information20;
713   End If;
714   If (p_rec.start_date = hr_api.g_date) then
715     p_rec.start_date :=
716     irc_iid_shd.g_old_rec.start_date;
717   End If;
718   If (p_rec.end_date = hr_api.g_date) then
719     p_rec.end_date :=
720     irc_iid_shd.g_old_rec.end_date;
721   End If;
722   If (p_rec.event_id = hr_api.g_number) then
723     p_rec.event_id :=
724     irc_iid_shd.g_old_rec.event_id;
725   End If;
726   --
727 End convert_defs;
728 --
729 -- ----------------------------------------------------------------------------
730 -- |---------------------------------< upd >----------------------------------|
731 -- ----------------------------------------------------------------------------
732 Procedure upd
733   (p_effective_date in     date
734   ,p_datetrack_mode in     varchar2
735   ,p_rec            in out nocopy irc_iid_shd.g_rec_type
736   ) is
737 --
738   l_proc                        varchar2(72) := g_package||'upd';
739   l_validation_start_date       date;
740   l_validation_end_date         date;
741 --
742 Begin
743   hr_utility.set_location('Entering:'||l_proc, 5);
744   --
745   -- Ensure that the DateTrack update mode is valid
746   --
747   dt_api.validate_dt_upd_mode(p_datetrack_mode => p_datetrack_mode);
748   --
749   -- We must lock the row which we need to update.
750   --
751   irc_iid_shd.lck
752     (p_effective_date                   => p_effective_date
753     ,p_datetrack_mode                   => p_datetrack_mode
754     ,p_interview_details_id =>  p_rec.interview_details_id
755     ,p_object_version_number            => p_rec.object_version_number
756     ,p_validation_start_date            => l_validation_start_date
757     ,p_validation_end_date              => l_validation_end_date
758     );
759   --
760   -- 1. During an update system defaults are used to determine if
761   --    arguments have been defaulted or not. We must therefore
762   --    derive the full record structure values to be updated.
763   --
764   -- 2. Call the supporting update validate operations.
765   --
766   irc_iid_upd.convert_defs(p_rec);
767   --
768   irc_iid_bus.update_validate
769     (p_rec                              => p_rec
770     ,p_effective_date                   => p_effective_date
771     ,p_datetrack_mode                   => p_datetrack_mode
772     ,p_validation_start_date            => l_validation_start_date
773     ,p_validation_end_date              => l_validation_end_date
774     );
775   --
776   -- Call to raise any errors on multi-message list
777   hr_multi_message.end_validation_set;
778   --
779   -- Call the supporting pre-update operation
780   --
781   pre_update
782     (p_rec                              => p_rec
783     ,p_effective_date                   => p_effective_date
784     ,p_datetrack_mode                   => p_datetrack_mode
785     ,p_validation_start_date            => l_validation_start_date
786     ,p_validation_end_date              => l_validation_end_date
787     );
788   --
789   -- Update the row.
790   --
791   update_dml
792     (p_rec                              => p_rec
793     ,p_effective_date                   => p_effective_date
794     ,p_datetrack_mode                   => p_datetrack_mode
795     ,p_validation_start_date            => l_validation_start_date
796     ,p_validation_end_date                  => l_validation_end_date
797     );
798   --
799   -- Call the supporting post-update operation
800   --
801   post_update
802     (p_rec                              => p_rec
803     ,p_effective_date                   => p_effective_date
804     ,p_datetrack_mode                   => p_datetrack_mode
805     ,p_validation_start_date            => l_validation_start_date
806     ,p_validation_end_date              => l_validation_end_date
807     );
808   --
809   -- Call to raise any errors on multi-message list
810   hr_multi_message.end_validation_set;
811 End upd;
812 --
813 -- ----------------------------------------------------------------------------
814 -- |------------------------------< upd >-------------------------------------|
815 -- ----------------------------------------------------------------------------
816 Procedure upd
817   (p_effective_date               in     date
818   ,p_datetrack_mode               in     varchar2
819   ,p_interview_details_id         in     number
820   ,p_object_version_number        in out nocopy number
821   ,p_status                       in     varchar2  default hr_api.g_varchar2
822   ,p_feedback                     in     varchar2  default hr_api.g_varchar2
823   ,p_notes                        in     varchar2  default hr_api.g_varchar2
824   ,p_notes_to_candidate           in     varchar2  default hr_api.g_varchar2
825   ,p_category                     in     varchar2  default hr_api.g_varchar2
826   ,p_result                       in     varchar2  default hr_api.g_varchar2
827   ,p_iid_information_category     in     varchar2  default hr_api.g_varchar2
828   ,p_iid_information1             in     varchar2  default hr_api.g_varchar2
829   ,p_iid_information2             in     varchar2  default hr_api.g_varchar2
830   ,p_iid_information3             in     varchar2  default hr_api.g_varchar2
831   ,p_iid_information4             in     varchar2  default hr_api.g_varchar2
832   ,p_iid_information5             in     varchar2  default hr_api.g_varchar2
833   ,p_iid_information6             in     varchar2  default hr_api.g_varchar2
834   ,p_iid_information7             in     varchar2  default hr_api.g_varchar2
835   ,p_iid_information8             in     varchar2  default hr_api.g_varchar2
836   ,p_iid_information9             in     varchar2  default hr_api.g_varchar2
837   ,p_iid_information10            in     varchar2  default hr_api.g_varchar2
838   ,p_iid_information11            in     varchar2  default hr_api.g_varchar2
839   ,p_iid_information12            in     varchar2  default hr_api.g_varchar2
840   ,p_iid_information13            in     varchar2  default hr_api.g_varchar2
841   ,p_iid_information14            in     varchar2  default hr_api.g_varchar2
842   ,p_iid_information15            in     varchar2  default hr_api.g_varchar2
843   ,p_iid_information16            in     varchar2  default hr_api.g_varchar2
844   ,p_iid_information17            in     varchar2  default hr_api.g_varchar2
845   ,p_iid_information18            in     varchar2  default hr_api.g_varchar2
846   ,p_iid_information19            in     varchar2  default hr_api.g_varchar2
847   ,p_iid_information20            in     varchar2  default hr_api.g_varchar2
848   ,p_event_id                     in     number    default hr_api.g_number
849   ,p_start_date                      out nocopy date
850   ,p_end_date                        out nocopy date
851   ) is
852 --
853   l_rec         irc_iid_shd.g_rec_type;
854   l_proc        varchar2(72) := g_package||'upd';
855 --
856 Begin
857   hr_utility.set_location('Entering:'||l_proc, 5);
858   --
859   -- Call conversion function to turn arguments into the
860   -- l_rec structure.
861   --
862   l_rec :=
863   irc_iid_shd.convert_args
864   (p_interview_details_id
865   ,p_status
866   ,p_feedback
867   ,p_notes
868   ,p_notes_to_candidate
869   ,p_category
870   ,p_result
871   ,p_iid_information_category
872   ,p_iid_information1
873   ,p_iid_information2
874   ,p_iid_information3
875   ,p_iid_information4
876   ,p_iid_information5
877   ,p_iid_information6
878   ,p_iid_information7
879   ,p_iid_information8
880   ,p_iid_information9
881   ,p_iid_information10
882   ,p_iid_information11
883   ,p_iid_information12
884   ,p_iid_information13
885   ,p_iid_information14
886   ,p_iid_information15
887   ,p_iid_information16
888   ,p_iid_information17
889   ,p_iid_information18
890   ,p_iid_information19
891   ,p_iid_information20
892   ,p_start_date
893   ,p_end_date
894   ,p_event_id
895   ,p_object_version_number
896   );
897   --
898   -- Having converted the arguments into the
899   -- plsql record structure we call the corresponding record
900   -- business process.
901   --
902   irc_iid_upd.upd
903     (p_effective_date
904     ,p_datetrack_mode
905     ,l_rec
906     );
907   --
908   -- Set the out parameters
909   --
910   p_object_version_number            := l_rec.object_version_number;
911   p_start_date             := l_rec.start_date;
912   p_end_date               := l_rec.end_date;
913   --
914   --
915   hr_utility.set_location(' Leaving:'||l_proc, 10);
916 End upd;
917 --
918 end irc_iid_upd;