DBA Data[Home] [Help]

PACKAGE BODY: APPS.IRC_IAV_UPD

Source


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