DBA Data[Home] [Help]

PACKAGE BODY: APPS.IRC_INP_UPD

Source


1 Package Body irc_inp_upd as
2 /* $Header: irinprhi.pkb 120.2 2006/02/23 15:36:24 gjaggava noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package  varchar2(33) := '  irc_inp_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_inp_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   irc_inp_shd.g_api_dml := true;  -- Set the api dml status
67   --
68   -- Update the irc_notification_preferences Row
69   --
70   update irc_notification_preferences
71     set
72      party_id                        = p_rec.party_id
73     ,person_id                       = p_rec.person_id
74     ,matching_jobs                   = p_rec.matching_jobs
75     ,matching_job_freq               = p_rec.matching_job_freq
76     ,attribute_category              = p_rec.attribute_category
77     ,receive_info_mail               = p_rec.receive_info_mail
78     ,allow_access                    = p_rec.allow_access
79     ,address_id                      = p_rec.address_id
80     ,attribute1                      = p_rec.attribute1
81     ,attribute2                      = p_rec.attribute2
82     ,attribute3                      = p_rec.attribute3
83     ,attribute4                      = p_rec.attribute4
84     ,attribute5                      = p_rec.attribute5
85     ,attribute6                      = p_rec.attribute6
86     ,attribute7                      = p_rec.attribute7
87     ,attribute8                      = p_rec.attribute8
88     ,attribute9                      = p_rec.attribute9
89     ,attribute10                     = p_rec.attribute10
90     ,attribute11                     = p_rec.attribute11
91     ,attribute12                     = p_rec.attribute12
92     ,attribute13                     = p_rec.attribute13
93     ,attribute14                     = p_rec.attribute14
94     ,attribute15                     = p_rec.attribute15
95     ,attribute16                     = p_rec.attribute16
96     ,attribute17                     = p_rec.attribute17
97     ,attribute18                     = p_rec.attribute18
98     ,attribute19                     = p_rec.attribute19
99     ,attribute20                     = p_rec.attribute20
100     ,attribute21                     = p_rec.attribute21
101     ,attribute22                     = p_rec.attribute22
102     ,attribute23                     = p_rec.attribute23
103     ,attribute24                     = p_rec.attribute24
104     ,attribute25                     = p_rec.attribute25
105     ,attribute26                     = p_rec.attribute26
106     ,attribute27                     = p_rec.attribute27
107     ,attribute28                     = p_rec.attribute28
108     ,attribute29                     = p_rec.attribute29
109     ,attribute30                     = p_rec.attribute30
110     ,object_version_number           = p_rec.object_version_number
111     ,agency_id                       = p_rec.agency_id
112     ,attempt_id                      = p_rec.attempt_id
113     where notification_preference_id = p_rec.notification_preference_id;
114   --
115   irc_inp_shd.g_api_dml := false;  -- Unset the api dml status
116   --
117   hr_utility.set_location(' Leaving:'||l_proc, 10);
118 --
119 Exception
120   When hr_api.check_integrity_violated Then
121     -- A check constraint has been violated
122     irc_inp_shd.g_api_dml := false;  -- Unset the api dml status
123     --
124     irc_inp_shd.constraint_error
125       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
126   When hr_api.parent_integrity_violated Then
127     -- Parent integrity has been violated
128     irc_inp_shd.g_api_dml := false;  -- Unset the api dml status
129     --
130     irc_inp_shd.constraint_error
131       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
132   When hr_api.unique_integrity_violated Then
133     -- Unique integrity has been violated
134     irc_inp_shd.g_api_dml := false;  -- Unset the api dml status
135     --
136     irc_inp_shd.constraint_error
137       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
138   When Others Then
139     irc_inp_shd.g_api_dml := false;  -- Unset the api dml status
140     --
141     Raise;
142 End update_dml;
143 --
144 -- ----------------------------------------------------------------------------
145 -- |------------------------------< pre_update >------------------------------|
146 -- ----------------------------------------------------------------------------
147 -- {Start Of Comments}
148 --
149 -- Description:
150 --   This private procedure contains any processing which is required before
151 --   the update dml.
152 --
153 -- Prerequisites:
154 --   This is an internal procedure which is called from the upd procedure.
155 --
156 -- In Parameters:
157 --   A Pl/Sql record structure.
158 --
159 -- Post Success:
160 --   Processing continues.
161 --
162 -- Post Failure:
163 --   If an error has occurred, an error message and exception wil be raised
164 --   but not handled.
165 --
166 -- Developer Implementation Notes:
167 --   Any pre-processing required before the update dml is issued should be
168 --   coded within this procedure. It is important to note that any 3rd party
169 --   maintenance should be reviewed before placing in this procedure.
170 --
171 -- Access Status:
172 --   Internal Row Handler Use Only.
173 --
174 -- {End Of Comments}
175 -- ----------------------------------------------------------------------------
176 Procedure pre_update
177   (p_rec in irc_inp_shd.g_rec_type
178   ) is
179 --
180   l_proc  varchar2(72) := g_package||'pre_update';
181 --
182 Begin
183   hr_utility.set_location('Entering:'||l_proc, 5);
184   --
185   hr_utility.set_location(' Leaving:'||l_proc, 10);
186 End pre_update;
187 --
188 -- ----------------------------------------------------------------------------
189 -- |-----------------------------< post_update >------------------------------|
190 -- ----------------------------------------------------------------------------
191 -- {Start Of Comments}
192 --
193 -- Description:
194 --   This private procedure contains any processing which is required after
195 --   the update dml.
196 --
197 -- Prerequisites:
198 --   This is an internal procedure which is called from the upd procedure.
199 --
200 -- In Parameters:
201 --   A Pl/Sql record structure.
202 --
203 -- Post Success:
204 --   Processing continues.
205 --
206 -- Post Failure:
207 --   If an error has occurred, an error message and exception will be raised
208 --   but not handled.
209 --
210 -- Developer Implementation Notes:
211 --   Any post-processing required after the update dml is issued should be
212 --   coded within this procedure. It is important to note that any 3rd party
213 --   maintenance should be reviewed before placing in this procedure.
214 --
215 -- Access Status:
216 --   Internal Row Handler Use Only.
217 --
218 -- {End Of Comments}
219 -- ----------------------------------------------------------------------------
220 Procedure post_update
221   (p_effective_date               in date
222   ,p_rec                          in irc_inp_shd.g_rec_type
223   ) is
224 --
225   l_proc  varchar2(72) := g_package||'post_update';
226 --
227 Begin
228   hr_utility.set_location('Entering:'||l_proc, 5);
229   begin
230     --
231     irc_inp_rku.after_update
232       (p_effective_date              => p_effective_date
233       ,p_party_id
234       => p_rec.party_id
235       ,p_person_id => p_rec.person_id
236       ,p_notification_preference_id => p_rec.notification_preference_id
237       ,p_matching_jobs
238       => p_rec.matching_jobs
239       ,p_matching_job_freq
240       => p_rec.matching_job_freq
241       ,p_attribute_category
242       => p_rec.attribute_category
243       ,p_receive_info_mail
244       => p_rec.receive_info_mail
245       ,p_allow_access
246       => p_rec.allow_access
247       ,p_address_id
248       => p_rec.address_id
249       ,p_attribute1
250       => p_rec.attribute1
251       ,p_attribute2
252       => p_rec.attribute2
253       ,p_attribute3
254       => p_rec.attribute3
255       ,p_attribute4
256       => p_rec.attribute4
257       ,p_attribute5
258       => p_rec.attribute5
259       ,p_attribute6
260       => p_rec.attribute6
261       ,p_attribute7
262       => p_rec.attribute7
263       ,p_attribute8
264       => p_rec.attribute8
265       ,p_attribute9
266       => p_rec.attribute9
267       ,p_attribute10
268       => p_rec.attribute10
269       ,p_attribute11
270       => p_rec.attribute11
271       ,p_attribute12
272       => p_rec.attribute12
273       ,p_attribute13
274       => p_rec.attribute13
275       ,p_attribute14
276       => p_rec.attribute14
277       ,p_attribute15
278       => p_rec.attribute15
279       ,p_attribute16
280       => p_rec.attribute16
281       ,p_attribute17
282       => p_rec.attribute17
283       ,p_attribute18
284       => p_rec.attribute18
285       ,p_attribute19
286       => p_rec.attribute19
287       ,p_attribute20
288       => p_rec.attribute20
289       ,p_attribute21
290       => p_rec.attribute21
291       ,p_attribute22
292       => p_rec.attribute22
293       ,p_attribute23
294       => p_rec.attribute23
295       ,p_attribute24
296       => p_rec.attribute24
297       ,p_attribute25
298       => p_rec.attribute25
299       ,p_attribute26
300       => p_rec.attribute26
301       ,p_attribute27
302       => p_rec.attribute27
303       ,p_attribute28
304       => p_rec.attribute28
305       ,p_attribute29
306       => p_rec.attribute29
307       ,p_attribute30
308       => p_rec.attribute30
309       ,p_object_version_number
310       => p_rec.object_version_number
311       ,p_agency_id
312       => p_rec.agency_id
313       ,p_attempt_id
314       => p_rec.attempt_id
315       ,p_matching_jobs_o
316       => irc_inp_shd.g_old_rec.matching_jobs
317       ,p_matching_job_freq_o
318       => irc_inp_shd.g_old_rec.matching_job_freq
319       ,p_attribute_category_o
320       => irc_inp_shd.g_old_rec.attribute_category
321       ,p_receive_info_mail_o
322       => irc_inp_shd.g_old_rec.receive_info_mail
323       ,p_allow_access_o
324       => irc_inp_shd.g_old_rec.allow_access
325       ,p_address_id_o
326       => irc_inp_shd.g_old_rec.address_id
327       ,p_attribute1_o
328       => irc_inp_shd.g_old_rec.attribute1
329       ,p_attribute2_o
330       => irc_inp_shd.g_old_rec.attribute2
331       ,p_attribute3_o
332       => irc_inp_shd.g_old_rec.attribute3
333       ,p_attribute4_o
334       => irc_inp_shd.g_old_rec.attribute4
335       ,p_attribute5_o
336       => irc_inp_shd.g_old_rec.attribute5
337       ,p_attribute6_o
338       => irc_inp_shd.g_old_rec.attribute6
339       ,p_attribute7_o
340       => irc_inp_shd.g_old_rec.attribute7
341       ,p_attribute8_o
342       => irc_inp_shd.g_old_rec.attribute8
343       ,p_attribute9_o
344       => irc_inp_shd.g_old_rec.attribute9
345       ,p_attribute10_o
346       => irc_inp_shd.g_old_rec.attribute10
347       ,p_attribute11_o
348       => irc_inp_shd.g_old_rec.attribute11
349       ,p_attribute12_o
350       => irc_inp_shd.g_old_rec.attribute12
351       ,p_attribute13_o
352       => irc_inp_shd.g_old_rec.attribute13
353       ,p_attribute14_o
354       => irc_inp_shd.g_old_rec.attribute14
355       ,p_attribute15_o
356       => irc_inp_shd.g_old_rec.attribute15
357       ,p_attribute16_o
358       => irc_inp_shd.g_old_rec.attribute16
359       ,p_attribute17_o
360       => irc_inp_shd.g_old_rec.attribute17
361       ,p_attribute18_o
362       => irc_inp_shd.g_old_rec.attribute18
363       ,p_attribute19_o
364       => irc_inp_shd.g_old_rec.attribute19
365       ,p_attribute20_o
366       => irc_inp_shd.g_old_rec.attribute20
367       ,p_attribute21_o
368       => irc_inp_shd.g_old_rec.attribute21
369       ,p_attribute22_o
370       => irc_inp_shd.g_old_rec.attribute22
371       ,p_attribute23_o
372       => irc_inp_shd.g_old_rec.attribute23
373       ,p_attribute24_o
374       => irc_inp_shd.g_old_rec.attribute24
375       ,p_attribute25_o
376       => irc_inp_shd.g_old_rec.attribute25
377       ,p_attribute26_o
378       => irc_inp_shd.g_old_rec.attribute26
379       ,p_attribute27_o
380       => irc_inp_shd.g_old_rec.attribute27
381       ,p_attribute28_o
382       => irc_inp_shd.g_old_rec.attribute28
383       ,p_attribute29_o
384       => irc_inp_shd.g_old_rec.attribute29
385       ,p_attribute30_o
386       => irc_inp_shd.g_old_rec.attribute30
387       ,p_object_version_number_o
388       => irc_inp_shd.g_old_rec.object_version_number
389       ,p_party_id_o
390       =>  irc_inp_shd.g_old_rec.party_id
391       ,p_person_id_o => irc_inp_shd.g_old_rec.person_id
392       ,p_agency_id_o => irc_inp_shd.g_old_rec.agency_id
393       ,p_attempt_id_o
394       => irc_inp_shd.g_old_rec.attempt_id
395       );
396     --
397   exception
398     --
399     when hr_api.cannot_find_prog_unit then
400       --
401       hr_api.cannot_find_prog_unit_error
402         (p_module_name => 'IRC_NOTIFICATION_PREFERENCES'
403         ,p_hook_type   => 'AU');
404       --
405   end;
406   --
407   hr_utility.set_location(' Leaving:'||l_proc, 10);
408 End post_update;
409 --
410 -- ----------------------------------------------------------------------------
411 -- |-----------------------------< convert_defs >-----------------------------|
412 -- ----------------------------------------------------------------------------
413 -- {Start Of Comments}
414 --
415 -- Description:
416 --   The Convert_Defs procedure has one very important function:
417 --   It must return the record structure for the row with all system defaulted
418 --   values converted into its corresponding parameter value for update. When
419 --   we attempt to update a row through the Upd process , certain
420 --   parameters can be defaulted which enables flexibility in the calling of
421 --   the upd process (e.g. only attributes which need to be updated need to be
422 --   specified). For the upd process to determine which attributes
423 --   have NOT been specified we need to check if the parameter has a reserved
424 --   system default value. Therefore, for all parameters which have a
425 --   corresponding reserved system default mechanism specified we need to
426 --   check if a system default is being used. If a system default is being
427 --   used then we convert the defaulted value into its corresponding attribute
428 --   value held in the g_old_rec data structure.
429 --
430 -- Prerequisites:
431 --   This private function can only be called from the upd process.
432 --
433 -- In Parameters:
434 --   A Pl/Sql record structure.
435 --
436 -- Post Success:
437 --   The record structure will be returned with all system defaulted parameter
438 --   values converted into its current row attribute value.
439 --
440 -- Post Failure:
441 --   No direct error handling is required within this function. Any possible
442 --   errors within this procedure will be a PL/SQL value error due to
443 --   conversion of datatypes or data lengths.
444 --
445 -- Developer Implementation Notes:
446 --   None.
447 --
448 -- Access Status:
449 --   Internal Row Handler Use Only.
450 --
451 -- {End Of Comments}
452 -- ----------------------------------------------------------------------------
453 Procedure convert_defs
454   (p_rec in out nocopy irc_inp_shd.g_rec_type
455   ) is
456 --
457 Begin
458   --
459   -- We must now examine each argument value in the
460   -- p_rec plsql record structure
461   -- to see if a system default is being used. If a system default
462   -- is being used then we must set to the 'current' argument value.
463   --
464   If (p_rec.party_id = hr_api.g_number) then
465     p_rec.party_id :=
466     irc_inp_shd.g_old_rec.party_id;
467   End If;
468   If (p_rec.person_id = hr_api.g_number) then
469     p_rec.person_id :=
470     irc_inp_shd.g_old_rec.person_id;
471   End If;
472   If (p_rec.matching_jobs = hr_api.g_varchar2) then
473     p_rec.matching_jobs :=
474     irc_inp_shd.g_old_rec.matching_jobs;
475   End If;
476   If (p_rec.matching_job_freq = hr_api.g_varchar2) then
477     p_rec.matching_job_freq :=
478     irc_inp_shd.g_old_rec.matching_job_freq;
479   End If;
480   If (p_rec.attribute_category = hr_api.g_varchar2) then
481     p_rec.attribute_category :=
482     irc_inp_shd.g_old_rec.attribute_category;
483   End If;
484   If (p_rec.receive_info_mail = hr_api.g_varchar2) then
485     p_rec.receive_info_mail :=
486     irc_inp_shd.g_old_rec.receive_info_mail;
487   End If;
488   If (p_rec.allow_access = hr_api.g_varchar2) then
489     p_rec.allow_access :=
490     irc_inp_shd.g_old_rec.allow_access;
491   End If;
492   If (p_rec.address_id = hr_api.g_number) then
493     p_rec.address_id :=
494     irc_inp_shd.g_old_rec.address_id;
495   End If;
496   If (p_rec.attribute1 = hr_api.g_varchar2) then
497     p_rec.attribute1 :=
498     irc_inp_shd.g_old_rec.attribute1;
499   End If;
500   If (p_rec.attribute2 = hr_api.g_varchar2) then
501     p_rec.attribute2 :=
502     irc_inp_shd.g_old_rec.attribute2;
503   End If;
504   If (p_rec.attribute3 = hr_api.g_varchar2) then
505     p_rec.attribute3 :=
506     irc_inp_shd.g_old_rec.attribute3;
507   End If;
508   If (p_rec.attribute4 = hr_api.g_varchar2) then
509     p_rec.attribute4 :=
510     irc_inp_shd.g_old_rec.attribute4;
511   End If;
512   If (p_rec.attribute5 = hr_api.g_varchar2) then
513     p_rec.attribute5 :=
514     irc_inp_shd.g_old_rec.attribute5;
515   End If;
516   If (p_rec.attribute6 = hr_api.g_varchar2) then
517     p_rec.attribute6 :=
518     irc_inp_shd.g_old_rec.attribute6;
519   End If;
520   If (p_rec.attribute7 = hr_api.g_varchar2) then
521     p_rec.attribute7 :=
522     irc_inp_shd.g_old_rec.attribute7;
523   End If;
524   If (p_rec.attribute8 = hr_api.g_varchar2) then
525     p_rec.attribute8 :=
526     irc_inp_shd.g_old_rec.attribute8;
527   End If;
528   If (p_rec.attribute9 = hr_api.g_varchar2) then
529     p_rec.attribute9 :=
530     irc_inp_shd.g_old_rec.attribute9;
531   End If;
532   If (p_rec.attribute10 = hr_api.g_varchar2) then
533     p_rec.attribute10 :=
534     irc_inp_shd.g_old_rec.attribute10;
535   End If;
536   If (p_rec.attribute11 = hr_api.g_varchar2) then
537     p_rec.attribute11 :=
538     irc_inp_shd.g_old_rec.attribute11;
539   End If;
540   If (p_rec.attribute12 = hr_api.g_varchar2) then
541     p_rec.attribute12 :=
542     irc_inp_shd.g_old_rec.attribute12;
543   End If;
544   If (p_rec.attribute13 = hr_api.g_varchar2) then
545     p_rec.attribute13 :=
546     irc_inp_shd.g_old_rec.attribute13;
547   End If;
548   If (p_rec.attribute14 = hr_api.g_varchar2) then
549     p_rec.attribute14 :=
550     irc_inp_shd.g_old_rec.attribute14;
551   End If;
552   If (p_rec.attribute15 = hr_api.g_varchar2) then
553     p_rec.attribute15 :=
554     irc_inp_shd.g_old_rec.attribute15;
555   End If;
556   If (p_rec.attribute16 = hr_api.g_varchar2) then
557     p_rec.attribute16 :=
558     irc_inp_shd.g_old_rec.attribute16;
559   End If;
560   If (p_rec.attribute17 = hr_api.g_varchar2) then
561     p_rec.attribute17 :=
562     irc_inp_shd.g_old_rec.attribute17;
563   End If;
564   If (p_rec.attribute18 = hr_api.g_varchar2) then
565     p_rec.attribute18 :=
566     irc_inp_shd.g_old_rec.attribute18;
567   End If;
568   If (p_rec.attribute19 = hr_api.g_varchar2) then
569     p_rec.attribute19 :=
570     irc_inp_shd.g_old_rec.attribute19;
571   End If;
572   If (p_rec.attribute20 = hr_api.g_varchar2) then
573     p_rec.attribute20 :=
574     irc_inp_shd.g_old_rec.attribute20;
575   End If;
576   If (p_rec.attribute21 = hr_api.g_varchar2) then
577     p_rec.attribute21 :=
578     irc_inp_shd.g_old_rec.attribute21;
579   End If;
580   If (p_rec.attribute22 = hr_api.g_varchar2) then
581     p_rec.attribute22 :=
582     irc_inp_shd.g_old_rec.attribute22;
583   End If;
584   If (p_rec.attribute23 = hr_api.g_varchar2) then
585     p_rec.attribute23 :=
586     irc_inp_shd.g_old_rec.attribute23;
587   End If;
588   If (p_rec.attribute24 = hr_api.g_varchar2) then
589     p_rec.attribute24 :=
590     irc_inp_shd.g_old_rec.attribute24;
591   End If;
592   If (p_rec.attribute25 = hr_api.g_varchar2) then
593     p_rec.attribute25 :=
594     irc_inp_shd.g_old_rec.attribute25;
595   End If;
596   If (p_rec.attribute26 = hr_api.g_varchar2) then
597     p_rec.attribute26 :=
598     irc_inp_shd.g_old_rec.attribute26;
599   End If;
600   If (p_rec.attribute27 = hr_api.g_varchar2) then
601     p_rec.attribute27 :=
602     irc_inp_shd.g_old_rec.attribute27;
603   End If;
604   If (p_rec.attribute28 = hr_api.g_varchar2) then
605     p_rec.attribute28 :=
606     irc_inp_shd.g_old_rec.attribute28;
607   End If;
608   If (p_rec.attribute29 = hr_api.g_varchar2) then
609     p_rec.attribute29 :=
610     irc_inp_shd.g_old_rec.attribute29;
611   End If;
612   If (p_rec.attribute30 = hr_api.g_varchar2) then
613     p_rec.attribute30 :=
614     irc_inp_shd.g_old_rec.attribute30;
615   End If;
616   If (p_rec.agency_id = hr_api.g_number) then
617     p_rec.agency_id :=
618     irc_inp_shd.g_old_rec.agency_id;
619   End If;
620   If (p_rec.attempt_id = hr_api.g_number) then
621     p_rec.attempt_id :=
622     irc_inp_shd.g_old_rec.attempt_id;
623   End If;
624   --
625 End convert_defs;
626 --
627 -- ----------------------------------------------------------------------------
628 -- |---------------------------------< upd >----------------------------------|
629 -- ----------------------------------------------------------------------------
630 Procedure upd
631   (p_effective_date               in date
632   ,p_rec                          in out nocopy irc_inp_shd.g_rec_type
633   ) is
634 --
635   l_proc  varchar2(72) := g_package||'upd';
636 --
637 Begin
638   hr_utility.set_location('Entering:'||l_proc, 5);
639   --
640   -- We must lock the row which we need to update.
641   --
642   irc_inp_shd.lck
643     (p_rec.notification_preference_id
644     ,p_rec.object_version_number
645     );
646   --
647   -- 1. During an update system defaults are used to determine if
648   --    arguments have been defaulted or not. We must therefore
649   --    derive the full record structure values to be updated.
650   --
651   -- 2. Call the supporting update validate operations.
652   --
653   convert_defs(p_rec);
654   irc_inp_bus.update_validate
655      (p_effective_date
656      ,p_rec
657      );
658   --
659   -- If the Multiple Message Detection is enabled and atleast one error
660   -- has been found then abort processing.
661   --
662   hr_multi_message.end_validation_set;
663   --
664   -- Call the supporting pre-update operation
665   --
666   irc_inp_upd.pre_update(p_rec);
667   --
668   -- Update the row.
669   --
670   irc_inp_upd.update_dml(p_rec);
671   --
672   -- Call the supporting post-update operation
673   --
674   irc_inp_upd.post_update
675      (p_effective_date
676      ,p_rec
677      );
678   --
679   -- If the Multiple Message Detection is enabled and atleast one error
680   -- has been found then abort processing.
681   --
682   hr_multi_message.end_validation_set;
683   --
684 End upd;
685 --
686 -- ----------------------------------------------------------------------------
687 -- |---------------------------------< upd >----------------------------------|
688 -- ----------------------------------------------------------------------------
689 Procedure upd
690   (p_effective_date               in     date
691   ,p_party_id                     in     number    default hr_api.g_number
692   ,p_person_id                    in     number    default hr_api.g_number
693   ,p_notification_preference_id   in     number
694   ,p_object_version_number        in out nocopy number
695   ,p_matching_jobs                in     varchar2  default hr_api.g_varchar2
696   ,p_matching_job_freq            in     varchar2  default hr_api.g_varchar2
697   ,p_receive_info_mail            in     varchar2  default hr_api.g_varchar2
698   ,p_allow_access                 in     varchar2  default hr_api.g_varchar2
699   ,p_attribute_category           in     varchar2  default hr_api.g_varchar2
700   ,p_address_id                   in     number    default hr_api.g_number
701   ,p_attribute1                   in     varchar2  default hr_api.g_varchar2
702   ,p_attribute2                   in     varchar2  default hr_api.g_varchar2
703   ,p_attribute3                   in     varchar2  default hr_api.g_varchar2
704   ,p_attribute4                   in     varchar2  default hr_api.g_varchar2
705   ,p_attribute5                   in     varchar2  default hr_api.g_varchar2
706   ,p_attribute6                   in     varchar2  default hr_api.g_varchar2
707   ,p_attribute7                   in     varchar2  default hr_api.g_varchar2
708   ,p_attribute8                   in     varchar2  default hr_api.g_varchar2
709   ,p_attribute9                   in     varchar2  default hr_api.g_varchar2
710   ,p_attribute10                  in     varchar2  default hr_api.g_varchar2
711   ,p_attribute11                  in     varchar2  default hr_api.g_varchar2
712   ,p_attribute12                  in     varchar2  default hr_api.g_varchar2
713   ,p_attribute13                  in     varchar2  default hr_api.g_varchar2
714   ,p_attribute14                  in     varchar2  default hr_api.g_varchar2
715   ,p_attribute15                  in     varchar2  default hr_api.g_varchar2
716   ,p_attribute16                  in     varchar2  default hr_api.g_varchar2
717   ,p_attribute17                  in     varchar2  default hr_api.g_varchar2
718   ,p_attribute18                  in     varchar2  default hr_api.g_varchar2
719   ,p_attribute19                  in     varchar2  default hr_api.g_varchar2
720   ,p_attribute20                  in     varchar2  default hr_api.g_varchar2
721   ,p_attribute21                  in     varchar2  default hr_api.g_varchar2
722   ,p_attribute22                  in     varchar2  default hr_api.g_varchar2
723   ,p_attribute23                  in     varchar2  default hr_api.g_varchar2
724   ,p_attribute24                  in     varchar2  default hr_api.g_varchar2
725   ,p_attribute25                  in     varchar2  default hr_api.g_varchar2
726   ,p_attribute26                  in     varchar2  default hr_api.g_varchar2
727   ,p_attribute27                  in     varchar2  default hr_api.g_varchar2
728   ,p_attribute28                  in     varchar2  default hr_api.g_varchar2
729   ,p_attribute29                  in     varchar2  default hr_api.g_varchar2
730   ,p_attribute30                  in     varchar2  default hr_api.g_varchar2
731   ,p_agency_id                    in     number    default hr_api.g_number
732   ,p_attempt_id                   in     number    default hr_api.g_number
733   ) is
734 --
735   l_rec   irc_inp_shd.g_rec_type;
736   l_proc  varchar2(72) := g_package||'upd';
737 --
738 Begin
739   hr_utility.set_location('Entering:'||l_proc, 5);
740   --
741   -- Call conversion function to turn arguments into the
742   -- l_rec structure.
743   --
744   l_rec :=
745   irc_inp_shd.convert_args
746   (p_party_id
747   ,p_person_id
748   ,p_notification_preference_id
749   ,p_matching_jobs
750   ,p_matching_job_freq
751   ,p_attribute_category
752   ,p_receive_info_mail
753   ,p_allow_access
754   ,p_address_id
755   ,p_attribute1
756   ,p_attribute2
757   ,p_attribute3
758   ,p_attribute4
759   ,p_attribute5
760   ,p_attribute6
761   ,p_attribute7
762   ,p_attribute8
763   ,p_attribute9
764   ,p_attribute10
765   ,p_attribute11
766   ,p_attribute12
767   ,p_attribute13
768   ,p_attribute14
769   ,p_attribute15
770   ,p_attribute16
771   ,p_attribute17
772   ,p_attribute18
773   ,p_attribute19
774   ,p_attribute20
775   ,p_attribute21
776   ,p_attribute22
777   ,p_attribute23
778   ,p_attribute24
779   ,p_attribute25
780   ,p_attribute26
781   ,p_attribute27
782   ,p_attribute28
783   ,p_attribute29
784   ,p_attribute30
785   ,p_object_version_number
786   ,p_agency_id
787   ,p_attempt_id
788   );
789   --
790   -- Having converted the arguments into the
791   -- plsql record structure we call the corresponding record
792   -- business process.
793   --
794   irc_inp_upd.upd
795      (p_effective_date
796      ,l_rec
797      );
798   p_object_version_number := l_rec.object_version_number;
799   --
800   hr_utility.set_location(' Leaving:'||l_proc, 10);
801 End upd;
802 --
803 end irc_inp_upd;