DBA Data[Home] [Help]

PACKAGE BODY: APPS.IRC_RSE_UPD

Source


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