DBA Data[Home] [Help]

PACKAGE BODY: APPS.IRC_IPD_UPD

Source


1 Package Body irc_ipd_upd as
2 /* $Header: iripdrhi.pkb 120.0 2005/07/26 15:09:42 mbocutt noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package  varchar2(33) := '  irc_ipd_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_ipd_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   --
64   --
65   --
66   -- Update the irc_pending_data Row
67   --
68   update irc_pending_data
69     set
70      pending_data_id                 = p_rec.pending_data_id
71     ,email_address                   = p_rec.email_address
72     ,last_name                       = p_rec.last_name
73     ,first_name                      = p_rec.first_name
74     ,user_password                   = p_rec.user_password
75     ,resume_file_name                = p_rec.resume_file_name
76     ,resume_description              = p_rec.resume_description
77     ,resume_mime_type                = p_rec.resume_mime_type
78     ,source_type                     = p_rec.source_type
79     ,job_post_source_name            = p_rec.job_post_source_name
80     ,posting_content_id              = p_rec.posting_content_id
81     ,person_id                       = p_rec.person_id
82     ,processed                       = p_rec.processed
83     ,sex                             = p_rec.sex
84     ,date_of_birth                   = p_rec.date_of_birth
85     ,per_information_category        = p_rec.per_information_category
86     ,per_information1                = p_rec.per_information1
87     ,per_information2                = p_rec.per_information2
88     ,per_information3                = p_rec.per_information3
89     ,per_information4                = p_rec.per_information4
90     ,per_information5                = p_rec.per_information5
91     ,per_information6                = p_rec.per_information6
92     ,per_information7                = p_rec.per_information7
93     ,per_information8                = p_rec.per_information8
94     ,per_information9                = p_rec.per_information9
95     ,per_information10               = p_rec.per_information10
96     ,per_information11               = p_rec.per_information11
97     ,per_information12               = p_rec.per_information12
98     ,per_information13               = p_rec.per_information13
99     ,per_information14               = p_rec.per_information14
100     ,per_information15               = p_rec.per_information15
101     ,per_information16               = p_rec.per_information16
102     ,per_information17               = p_rec.per_information17
103     ,per_information18               = p_rec.per_information18
104     ,per_information19               = p_rec.per_information19
105     ,per_information20               = p_rec.per_information20
106     ,per_information21               = p_rec.per_information21
107     ,per_information22               = p_rec.per_information22
108     ,per_information23               = p_rec.per_information23
109     ,per_information24               = p_rec.per_information24
110     ,per_information25               = p_rec.per_information25
111     ,per_information26               = p_rec.per_information26
112     ,per_information27               = p_rec.per_information27
113     ,per_information28               = p_rec.per_information28
114     ,per_information29               = p_rec.per_information29
115     ,per_information30               = p_rec.per_information30
116     ,error_message                   = p_rec.error_message
117     ,last_update_date                = p_rec.last_update_date
118     ,allow_access                    = p_rec.allow_access
119     ,user_guid                       = p_rec.user_guid
120     ,visitor_resp_key                = p_rec.visitor_resp_key
121     ,visitor_resp_appl_id            = p_rec.visitor_resp_appl_id
122     ,security_group_key              = p_rec.security_group_key
123     where pending_data_id = p_rec.pending_data_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_ipd_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_ipd_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_ipd_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_ipd_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_rec                          in irc_ipd_shd.g_rec_type
228   ) is
229 --
230   l_proc  varchar2(72) := g_package||'post_update';
231 --
232 Begin
233   hr_utility.set_location('Entering:'||l_proc, 5);
234   begin
235     --
236     irc_ipd_rku.after_update
237       (p_pending_data_id
238       => p_rec.pending_data_id
239       ,p_email_address
240       => p_rec.email_address
241       ,p_last_name
242       => p_rec.last_name
243       ,p_first_name
244       => p_rec.first_name
245       ,p_user_password
246       => p_rec.user_password
247       ,p_resume_file_name
248       => p_rec.resume_file_name
249       ,p_resume_description
250       => p_rec.resume_description
251       ,p_resume_mime_type
252       => p_rec.resume_mime_type
253       ,p_source_type
254       => p_rec.source_type
255       ,p_job_post_source_name
256       => p_rec.job_post_source_name
257       ,p_posting_content_id
258       => p_rec.posting_content_id
259       ,p_person_id
260       => p_rec.person_id
261       ,p_processed
262       => p_rec.processed
263       ,p_sex
264       => p_rec.sex
265       ,p_date_of_birth
266       => p_rec.date_of_birth
267       ,p_per_information_category
268       => p_rec.per_information_category
269       ,p_per_information1
270       => p_rec.per_information1
271       ,p_per_information2
272       => p_rec.per_information2
273       ,p_per_information3
274       => p_rec.per_information3
275       ,p_per_information4
276       => p_rec.per_information4
277       ,p_per_information5
278       => p_rec.per_information5
279       ,p_per_information6
280       => p_rec.per_information6
281       ,p_per_information7
282       => p_rec.per_information7
283       ,p_per_information8
284       => p_rec.per_information8
285       ,p_per_information9
286       => p_rec.per_information9
287       ,p_per_information10
288       => p_rec.per_information10
289       ,p_per_information11
290       => p_rec.per_information11
291       ,p_per_information12
292       => p_rec.per_information12
293       ,p_per_information13
294       => p_rec.per_information13
295       ,p_per_information14
296       => p_rec.per_information14
297       ,p_per_information15
298       => p_rec.per_information15
299       ,p_per_information16
300       => p_rec.per_information16
301       ,p_per_information17
302       => p_rec.per_information17
303       ,p_per_information18
304       => p_rec.per_information18
305       ,p_per_information19
306       => p_rec.per_information19
307       ,p_per_information20
308       => p_rec.per_information20
309       ,p_per_information21
310       => p_rec.per_information21
311       ,p_per_information22
312       => p_rec.per_information22
313       ,p_per_information23
314       => p_rec.per_information23
315       ,p_per_information24
316       => p_rec.per_information24
317       ,p_per_information25
318       => p_rec.per_information25
319       ,p_per_information26
320       => p_rec.per_information26
321       ,p_per_information27
322       => p_rec.per_information27
323       ,p_per_information28
324       => p_rec.per_information28
325       ,p_per_information29
326       => p_rec.per_information29
327       ,p_per_information30
328       => p_rec.per_information30
329       ,p_error_message
330       => p_rec.error_message
331       ,p_last_update_date
332       => p_rec.last_update_date
333       ,p_allow_access
334       => p_rec.allow_access
335       ,p_visitor_resp_key
336       => p_rec.visitor_resp_key
337       ,p_visitor_resp_appl_id
338       => p_rec.visitor_resp_appl_id
339       ,p_security_group_key
340       => p_rec.security_group_key
341       ,p_email_address_o
342       => irc_ipd_shd.g_old_rec.email_address
343       ,p_vacancy_id_o
344       => irc_ipd_shd.g_old_rec.vacancy_id
345       ,p_last_name_o
346       => irc_ipd_shd.g_old_rec.last_name
347       ,p_first_name_o
348       => irc_ipd_shd.g_old_rec.first_name
349       ,p_user_password_o
350       => irc_ipd_shd.g_old_rec.user_password
351       ,p_resume_file_name_o
352       => irc_ipd_shd.g_old_rec.resume_file_name
353       ,p_resume_description_o
354       => irc_ipd_shd.g_old_rec.resume_description
355       ,p_resume_mime_type_o
356       => irc_ipd_shd.g_old_rec.resume_mime_type
357       ,p_source_type_o
358       => irc_ipd_shd.g_old_rec.source_type
359       ,p_job_post_source_name_o
360       => irc_ipd_shd.g_old_rec.job_post_source_name
361       ,p_posting_content_id_o
362       => irc_ipd_shd.g_old_rec.posting_content_id
363       ,p_person_id_o
364       => irc_ipd_shd.g_old_rec.person_id
365       ,p_processed_o
366       => irc_ipd_shd.g_old_rec.processed
367       ,p_sex_o
368       => irc_ipd_shd.g_old_rec.sex
369       ,p_date_of_birth_o
370       => irc_ipd_shd.g_old_rec.date_of_birth
371       ,p_per_information_category_o
372       => irc_ipd_shd.g_old_rec.per_information_category
373       ,p_per_information1_o
374       => irc_ipd_shd.g_old_rec.per_information1
375       ,p_per_information2_o
376       => irc_ipd_shd.g_old_rec.per_information2
377       ,p_per_information3_o
378       => irc_ipd_shd.g_old_rec.per_information3
379       ,p_per_information4_o
380       => irc_ipd_shd.g_old_rec.per_information4
381       ,p_per_information5_o
382       => irc_ipd_shd.g_old_rec.per_information5
383       ,p_per_information6_o
384       => irc_ipd_shd.g_old_rec.per_information6
385       ,p_per_information7_o
386       => irc_ipd_shd.g_old_rec.per_information7
387       ,p_per_information8_o
388       => irc_ipd_shd.g_old_rec.per_information8
389       ,p_per_information9_o
390       => irc_ipd_shd.g_old_rec.per_information9
391       ,p_per_information10_o
392       => irc_ipd_shd.g_old_rec.per_information10
393       ,p_per_information11_o
394       => irc_ipd_shd.g_old_rec.per_information11
395       ,p_per_information12_o
396       => irc_ipd_shd.g_old_rec.per_information12
397       ,p_per_information13_o
398       => irc_ipd_shd.g_old_rec.per_information13
399       ,p_per_information14_o
400       => irc_ipd_shd.g_old_rec.per_information14
401       ,p_per_information15_o
402       => irc_ipd_shd.g_old_rec.per_information15
403       ,p_per_information16_o
404       => irc_ipd_shd.g_old_rec.per_information16
405       ,p_per_information17_o
406       => irc_ipd_shd.g_old_rec.per_information17
407       ,p_per_information18_o
408       => irc_ipd_shd.g_old_rec.per_information18
409       ,p_per_information19_o
410       => irc_ipd_shd.g_old_rec.per_information19
411       ,p_per_information20_o
412       => irc_ipd_shd.g_old_rec.per_information20
413       ,p_per_information21_o
414       => irc_ipd_shd.g_old_rec.per_information21
415       ,p_per_information22_o
416       => irc_ipd_shd.g_old_rec.per_information22
417       ,p_per_information23_o
418       => irc_ipd_shd.g_old_rec.per_information23
419       ,p_per_information24_o
420       => irc_ipd_shd.g_old_rec.per_information24
421       ,p_per_information25_o
422       => irc_ipd_shd.g_old_rec.per_information25
423       ,p_per_information26_o
424       => irc_ipd_shd.g_old_rec.per_information26
425       ,p_per_information27_o
426       => irc_ipd_shd.g_old_rec.per_information27
427       ,p_per_information28_o
428       => irc_ipd_shd.g_old_rec.per_information28
429       ,p_per_information29_o
430       => irc_ipd_shd.g_old_rec.per_information29
431       ,p_per_information30_o
432       => irc_ipd_shd.g_old_rec.per_information30
433       ,p_error_message_o
434       => irc_ipd_shd.g_old_rec.error_message
435       ,p_creation_date_o
436       => irc_ipd_shd.g_old_rec.creation_date
437       ,p_last_update_date_o
438       => irc_ipd_shd.g_old_rec.last_update_date
439       ,p_allow_access_o
440       => irc_ipd_shd.g_old_rec.allow_access
441 	  ,p_visitor_resp_key_o
442       => irc_ipd_shd.g_old_rec.visitor_resp_key
443       ,p_visitor_resp_appl_id_o
444       => irc_ipd_shd.g_old_rec.visitor_resp_appl_id
445       ,p_security_group_key_o
446       => irc_ipd_shd.g_old_rec.security_group_key
447       );
448     --
449   exception
450     --
451     when hr_api.cannot_find_prog_unit then
452       --
453       hr_api.cannot_find_prog_unit_error
454         (p_module_name => 'IRC_PENDING_DATA'
455         ,p_hook_type   => 'AU');
456       --
457   end;
458   --
459   hr_utility.set_location(' Leaving:'||l_proc, 10);
460 End post_update;
461 --
462 -- ----------------------------------------------------------------------------
463 -- |-----------------------------< convert_defs >-----------------------------|
464 -- ----------------------------------------------------------------------------
465 -- {Start Of Comments}
466 --
467 -- Description:
468 --   The Convert_Defs procedure has one very important function:
469 --   It must return the record structure for the row with all system defaulted
470 --   values converted into its corresponding parameter value for update. When
471 --   we attempt to update a row through the Upd process , certain
472 --   parameters can be defaulted which enables flexibility in the calling of
473 --   the upd process (e.g. only attributes which need to be updated need to be
474 --   specified). For the upd process to determine which attributes
475 --   have NOT been specified we need to check if the parameter has a reserved
476 --   system default value. Therefore, for all parameters which have a
477 --   corresponding reserved system default mechanism specified we need to
478 --   check if a system default is being used. If a system default is being
479 --   used then we convert the defaulted value into its corresponding attribute
480 --   value held in the g_old_rec data structure.
481 --
482 -- Prerequisites:
483 --   This private function can only be called from the upd process.
484 --
485 -- In Parameters:
486 --   A Pl/Sql record structure.
487 --
488 -- Post Success:
489 --   The record structure will be returned with all system defaulted parameter
490 --   values converted into its current row attribute value.
491 --
492 -- Post Failure:
493 --   No direct error handling is required within this function. Any possible
494 --   errors within this procedure will be a PL/SQL value error due to
495 --   conversion of datatypes or data lengths.
496 --
497 -- Developer Implementation Notes:
498 --   None.
499 --
500 -- Access Status:
501 --   Internal Row Handler Use Only.
502 --
503 -- {End Of Comments}
504 -- ----------------------------------------------------------------------------
505 Procedure convert_defs
506   (p_rec in out nocopy irc_ipd_shd.g_rec_type
507   ) is
508 --
509 Begin
510   --
511   -- We must now examine each argument value in the
512   -- p_rec plsql record structure
513   -- to see if a system default is being used. If a system default
514   -- is being used then we must set to the 'current' argument value.
515   --
516   If (p_rec.email_address = hr_api.g_varchar2) then
517     p_rec.email_address :=
518     irc_ipd_shd.g_old_rec.email_address;
519   End If;
520   If (p_rec.vacancy_id = hr_api.g_number) then
521     p_rec.vacancy_id :=
522     irc_ipd_shd.g_old_rec.vacancy_id;
523   End If;
524   If (p_rec.last_name = hr_api.g_varchar2) then
525     p_rec.last_name :=
526     irc_ipd_shd.g_old_rec.last_name;
527   End If;
528   If (p_rec.first_name = hr_api.g_varchar2) then
529     p_rec.first_name :=
530     irc_ipd_shd.g_old_rec.first_name;
531   End If;
532   If (p_rec.user_password = hr_api.g_varchar2) then
533     p_rec.user_password :=
534     irc_ipd_shd.g_old_rec.user_password;
535   End If;
536   If (p_rec.resume_file_name = hr_api.g_varchar2) then
537     p_rec.resume_file_name :=
538     irc_ipd_shd.g_old_rec.resume_file_name;
539   End If;
540   If (p_rec.resume_description = hr_api.g_varchar2) then
541     p_rec.resume_description :=
542     irc_ipd_shd.g_old_rec.resume_description;
543   End If;
544   If (p_rec.resume_mime_type = hr_api.g_varchar2) then
545     p_rec.resume_mime_type :=
546     irc_ipd_shd.g_old_rec.resume_mime_type;
547   End If;
548   If (p_rec.source_type = hr_api.g_varchar2) then
549     p_rec.source_type :=
550     irc_ipd_shd.g_old_rec.source_type;
551   End If;
552   If (p_rec.job_post_source_name = hr_api.g_varchar2) then
553     p_rec.job_post_source_name :=
554     irc_ipd_shd.g_old_rec.job_post_source_name;
555   End If;
556   If (p_rec.posting_content_id = hr_api.g_number) then
557     p_rec.posting_content_id :=
558     irc_ipd_shd.g_old_rec.posting_content_id;
559   End If;
560   If (p_rec.person_id = hr_api.g_number) then
561     p_rec.person_id :=
562     irc_ipd_shd.g_old_rec.person_id;
563   End If;
564   If (p_rec.processed = hr_api.g_varchar2) then
565     p_rec.processed :=
566     irc_ipd_shd.g_old_rec.processed;
567   End If;
568   If (p_rec.sex = hr_api.g_varchar2) then
569     p_rec.sex :=
570     irc_ipd_shd.g_old_rec.sex;
571   End If;
572   If (p_rec.date_of_birth = hr_api.g_date) then
573     p_rec.date_of_birth :=
574     irc_ipd_shd.g_old_rec.date_of_birth;
575   End If;
576   If (p_rec.per_information_category = hr_api.g_varchar2) then
577     p_rec.per_information_category :=
578     irc_ipd_shd.g_old_rec.per_information_category;
579   End If;
580   If (p_rec.per_information1 = hr_api.g_varchar2) then
581     p_rec.per_information1 :=
582     irc_ipd_shd.g_old_rec.per_information1;
583   End If;
584   If (p_rec.per_information2 = hr_api.g_varchar2) then
585     p_rec.per_information2 :=
586     irc_ipd_shd.g_old_rec.per_information2;
587   End If;
588   If (p_rec.per_information3 = hr_api.g_varchar2) then
589     p_rec.per_information3 :=
590     irc_ipd_shd.g_old_rec.per_information3;
591   End If;
592   If (p_rec.per_information4 = hr_api.g_varchar2) then
593     p_rec.per_information4 :=
594     irc_ipd_shd.g_old_rec.per_information4;
595   End If;
596   If (p_rec.per_information5 = hr_api.g_varchar2) then
597     p_rec.per_information5 :=
598     irc_ipd_shd.g_old_rec.per_information5;
599   End If;
600   If (p_rec.per_information6 = hr_api.g_varchar2) then
601     p_rec.per_information6 :=
602     irc_ipd_shd.g_old_rec.per_information6;
603   End If;
604   If (p_rec.per_information7 = hr_api.g_varchar2) then
605     p_rec.per_information7 :=
606     irc_ipd_shd.g_old_rec.per_information7;
607   End If;
608   If (p_rec.per_information8 = hr_api.g_varchar2) then
609     p_rec.per_information8 :=
610     irc_ipd_shd.g_old_rec.per_information8;
611   End If;
612   If (p_rec.per_information9 = hr_api.g_varchar2) then
613     p_rec.per_information9 :=
614     irc_ipd_shd.g_old_rec.per_information9;
615   End If;
616   If (p_rec.per_information10 = hr_api.g_varchar2) then
617     p_rec.per_information10 :=
618     irc_ipd_shd.g_old_rec.per_information10;
619   End If;
620   If (p_rec.per_information11 = hr_api.g_varchar2) then
621     p_rec.per_information11 :=
622     irc_ipd_shd.g_old_rec.per_information11;
623   End If;
624   If (p_rec.per_information12 = hr_api.g_varchar2) then
625     p_rec.per_information12 :=
626     irc_ipd_shd.g_old_rec.per_information12;
627   End If;
628   If (p_rec.per_information13 = hr_api.g_varchar2) then
629     p_rec.per_information13 :=
630     irc_ipd_shd.g_old_rec.per_information13;
631   End If;
632   If (p_rec.per_information14 = hr_api.g_varchar2) then
633     p_rec.per_information14 :=
634     irc_ipd_shd.g_old_rec.per_information14;
635   End If;
636   If (p_rec.per_information15 = hr_api.g_varchar2) then
637     p_rec.per_information15 :=
638     irc_ipd_shd.g_old_rec.per_information15;
639   End If;
640   If (p_rec.per_information16 = hr_api.g_varchar2) then
641     p_rec.per_information16 :=
642     irc_ipd_shd.g_old_rec.per_information16;
643   End If;
644   If (p_rec.per_information17 = hr_api.g_varchar2) then
645     p_rec.per_information17 :=
646     irc_ipd_shd.g_old_rec.per_information17;
647   End If;
648   If (p_rec.per_information18 = hr_api.g_varchar2) then
649     p_rec.per_information18 :=
650     irc_ipd_shd.g_old_rec.per_information18;
651   End If;
652   If (p_rec.per_information19 = hr_api.g_varchar2) then
653     p_rec.per_information19 :=
654     irc_ipd_shd.g_old_rec.per_information19;
655   End If;
656   If (p_rec.per_information20 = hr_api.g_varchar2) then
657     p_rec.per_information20 :=
658     irc_ipd_shd.g_old_rec.per_information20;
659   End If;
660   If (p_rec.per_information21 = hr_api.g_varchar2) then
661     p_rec.per_information21 :=
662     irc_ipd_shd.g_old_rec.per_information21;
663   End If;
664   If (p_rec.per_information22 = hr_api.g_varchar2) then
665     p_rec.per_information22 :=
666     irc_ipd_shd.g_old_rec.per_information22;
667   End If;
668   If (p_rec.per_information23 = hr_api.g_varchar2) then
669     p_rec.per_information23 :=
670     irc_ipd_shd.g_old_rec.per_information23;
671   End If;
672   If (p_rec.per_information24 = hr_api.g_varchar2) then
673     p_rec.per_information24 :=
674     irc_ipd_shd.g_old_rec.per_information24;
675   End If;
676   If (p_rec.per_information25 = hr_api.g_varchar2) then
677     p_rec.per_information25 :=
678     irc_ipd_shd.g_old_rec.per_information25;
679   End If;
680   If (p_rec.per_information26 = hr_api.g_varchar2) then
681     p_rec.per_information26 :=
682     irc_ipd_shd.g_old_rec.per_information26;
683   End If;
684   If (p_rec.per_information27 = hr_api.g_varchar2) then
685     p_rec.per_information27 :=
686     irc_ipd_shd.g_old_rec.per_information27;
687   End If;
688   If (p_rec.per_information28 = hr_api.g_varchar2) then
689     p_rec.per_information28 :=
690     irc_ipd_shd.g_old_rec.per_information28;
691   End If;
692   If (p_rec.per_information29 = hr_api.g_varchar2) then
693     p_rec.per_information29 :=
694     irc_ipd_shd.g_old_rec.per_information29;
695   End If;
696   If (p_rec.per_information30 = hr_api.g_varchar2) then
697     p_rec.per_information30 :=
698     irc_ipd_shd.g_old_rec.per_information30;
699   End If;
700   If (p_rec.error_message = hr_api.g_varchar2) then
701     p_rec.error_message :=
702     irc_ipd_shd.g_old_rec.error_message;
703   End If;
704   If (p_rec.creation_date= hr_api.g_date) then
705     p_rec.creation_date :=
706     irc_ipd_shd.g_old_rec.creation_date;
707   End If;
708   If (p_rec.last_update_date = hr_api.g_date) then
709     p_rec.last_update_date :=
710     irc_ipd_shd.g_old_rec.last_update_date;
711   End If;
712   If (p_rec.allow_access = hr_api.g_varchar2) then
713     p_rec.allow_access :=
714     irc_ipd_shd.g_old_rec.allow_access;
715   End If;
716   -- don't handle USER_GUID as we don't have a default value for RAW
717   If (p_rec.visitor_resp_key = hr_api.g_varchar2) then
718     p_rec.visitor_resp_key :=
719     irc_ipd_shd.g_old_rec.visitor_resp_key;
720   End If;
721   If (p_rec.visitor_resp_appl_id = hr_api.g_number) then
722     p_rec.visitor_resp_appl_id :=
723     irc_ipd_shd.g_old_rec.visitor_resp_appl_id;
724   End If;
725   If (p_rec.security_group_key = hr_api.g_varchar2) then
726     p_rec.security_group_key :=
727     irc_ipd_shd.g_old_rec.security_group_key;
728   End If;
729   --
730 End convert_defs;
731 --
732 -- ----------------------------------------------------------------------------
733 -- |---------------------------------< upd >----------------------------------|
734 -- ----------------------------------------------------------------------------
735 Procedure upd
736   (p_rec                          in out nocopy irc_ipd_shd.g_rec_type
737   ) is
738 --
739   l_proc  varchar2(72) := g_package||'upd';
740 --
741 Begin
742   hr_utility.set_location('Entering:'||l_proc, 5);
743   --
744   -- We must lock the row which we need to update.
745   --
746   irc_ipd_shd.lck
747     (p_rec.pending_data_id
748     );
749   --
750   -- 1. During an update system defaults are used to determine if
751   --    arguments have been defaulted or not. We must therefore
752   --    derive the full record structure values to be updated.
753   --
754   -- 2. Call the supporting update validate operations.
755   --
756   convert_defs(p_rec);
757   irc_ipd_bus.update_validate
758      (p_rec
759      );
760   --
761   -- Call to raise any errors on multi-message list
762   hr_multi_message.end_validation_set;
763   --
764   -- Call the supporting pre-update operation
765   --
766   irc_ipd_upd.pre_update(p_rec);
767   --
768   -- Update the row.
769   --
770   irc_ipd_upd.update_dml(p_rec);
771   --
772   -- Call the supporting post-update operation
773   --
774   irc_ipd_upd.post_update
775      (p_rec
776      );
777   --
778   -- Call to raise any errors on multi-message list
779   hr_multi_message.end_validation_set;
780 End upd;
781 --
782 -- ----------------------------------------------------------------------------
783 -- |---------------------------------< upd >----------------------------------|
784 -- ----------------------------------------------------------------------------
785 Procedure upd
786   (p_pending_data_id              in     number
787   ,p_email_address                in     varchar2  default hr_api.g_varchar2
788   ,p_last_name                    in     varchar2  default hr_api.g_varchar2
789   ,p_first_name                   in     varchar2  default hr_api.g_varchar2
790   ,p_user_password                in     varchar2  default hr_api.g_varchar2
791   ,p_resume_file_name             in     varchar2  default hr_api.g_varchar2
792   ,p_resume_description           in     varchar2  default hr_api.g_varchar2
793   ,p_resume_mime_type             in     varchar2  default hr_api.g_varchar2
794   ,p_source_type                  in     varchar2  default hr_api.g_varchar2
795   ,p_job_post_source_name         in     varchar2  default hr_api.g_varchar2
796   ,p_posting_content_id           in     number    default hr_api.g_number
797   ,p_person_id                    in     number    default hr_api.g_number
798   ,p_processed                    in     varchar2  default hr_api.g_varchar2
799   ,p_sex                          in     varchar2  default hr_api.g_varchar2
800   ,p_date_of_birth                in     date      default hr_api.g_date
801   ,p_per_information_category     in     varchar2  default hr_api.g_varchar2
802   ,p_per_information1             in     varchar2  default hr_api.g_varchar2
803   ,p_per_information2             in     varchar2  default hr_api.g_varchar2
804   ,p_per_information3             in     varchar2  default hr_api.g_varchar2
805   ,p_per_information4             in     varchar2  default hr_api.g_varchar2
806   ,p_per_information5             in     varchar2  default hr_api.g_varchar2
807   ,p_per_information6             in     varchar2  default hr_api.g_varchar2
808   ,p_per_information7             in     varchar2  default hr_api.g_varchar2
809   ,p_per_information8             in     varchar2  default hr_api.g_varchar2
810   ,p_per_information9             in     varchar2  default hr_api.g_varchar2
811   ,p_per_information10            in     varchar2  default hr_api.g_varchar2
812   ,p_per_information11            in     varchar2  default hr_api.g_varchar2
813   ,p_per_information12            in     varchar2  default hr_api.g_varchar2
814   ,p_per_information13            in     varchar2  default hr_api.g_varchar2
815   ,p_per_information14            in     varchar2  default hr_api.g_varchar2
816   ,p_per_information15            in     varchar2  default hr_api.g_varchar2
817   ,p_per_information16            in     varchar2  default hr_api.g_varchar2
818   ,p_per_information17            in     varchar2  default hr_api.g_varchar2
819   ,p_per_information18            in     varchar2  default hr_api.g_varchar2
820   ,p_per_information19            in     varchar2  default hr_api.g_varchar2
821   ,p_per_information20            in     varchar2  default hr_api.g_varchar2
822   ,p_per_information21            in     varchar2  default hr_api.g_varchar2
823   ,p_per_information22            in     varchar2  default hr_api.g_varchar2
824   ,p_per_information23            in     varchar2  default hr_api.g_varchar2
825   ,p_per_information24            in     varchar2  default hr_api.g_varchar2
826   ,p_per_information25            in     varchar2  default hr_api.g_varchar2
827   ,p_per_information26            in     varchar2  default hr_api.g_varchar2
828   ,p_per_information27            in     varchar2  default hr_api.g_varchar2
829   ,p_per_information28            in     varchar2  default hr_api.g_varchar2
830   ,p_per_information29            in     varchar2  default hr_api.g_varchar2
831   ,p_per_information30            in     varchar2  default hr_api.g_varchar2
832   ,p_error_message                in     varchar2  default hr_api.g_varchar2
833   ,p_last_update_date             in     date      default hr_api.g_date
834   ,p_allow_access                 in     varchar2  default hr_api.g_varchar2
835   ,p_user_guid                    in     raw       default NULL
836   ,p_visitor_resp_key             in     varchar2  default hr_api.g_varchar2
837   ,p_visitor_resp_appl_id         in     number    default hr_api.g_number
838   ,p_security_group_key           in     varchar2  default hr_api.g_varchar2
839   ) is
840 --
841   l_rec   irc_ipd_shd.g_rec_type;
842   l_proc  varchar2(72) := g_package||'upd';
843 --
844 Begin
845   hr_utility.set_location('Entering:'||l_proc, 5);
846   --
847   -- Call conversion function to turn arguments into the
848   -- l_rec structure.
849   --
850   l_rec :=
851   irc_ipd_shd.convert_args
852   (p_pending_data_id
853   ,p_email_address
854   ,hr_api.g_number
855   ,p_last_name
856   ,p_first_name
857   ,p_user_password
858   ,p_resume_file_name
859   ,p_resume_description
860   ,p_resume_mime_type
861   ,p_source_type
862   ,p_job_post_source_name
863   ,p_posting_content_id
864   ,p_person_id
865   ,p_processed
866   ,p_sex
867   ,p_date_of_birth
868   ,p_per_information_category
869   ,p_per_information1
870   ,p_per_information2
871   ,p_per_information3
872   ,p_per_information4
873   ,p_per_information5
874   ,p_per_information6
875   ,p_per_information7
876   ,p_per_information8
877   ,p_per_information9
878   ,p_per_information10
879   ,p_per_information11
880   ,p_per_information12
881   ,p_per_information13
882   ,p_per_information14
883   ,p_per_information15
884   ,p_per_information16
885   ,p_per_information17
886   ,p_per_information18
887   ,p_per_information19
888   ,p_per_information20
889   ,p_per_information21
890   ,p_per_information22
891   ,p_per_information23
892   ,p_per_information24
893   ,p_per_information25
894   ,p_per_information26
895   ,p_per_information27
896   ,p_per_information28
897   ,p_per_information29
898   ,p_per_information30
899   ,p_error_message
900   ,hr_api.g_date
901   ,p_last_update_date
902   ,p_allow_access
903   ,p_user_guid
904   ,p_visitor_resp_key
905   ,p_visitor_resp_appl_id
906   ,p_security_group_key
907   );
908   --
909   -- Having converted the arguments into the
910   -- plsql record structure we call the corresponding record
911   -- business process.
912   --
913   irc_ipd_upd.upd
914      (l_rec
915      );
916   --
917   --
918   hr_utility.set_location(' Leaving:'||l_proc, 10);
919 End upd;
920 --
921 end irc_ipd_upd;