DBA Data[Home] [Help]

PACKAGE BODY: APPS.IRC_RSE_UPD

Source


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