DBA Data[Home] [Help]

PACKAGE BODY: APPS.PQH_LOS_UPD

Source


1 Package Body pqh_los_upd as
2 /* $Header: pqlosrhi.pkb 120.0 2005/05/29 02:11:26 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                     Private Global Definitions                           |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package  varchar2(33) := '  pqh_los_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 pqh_los_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 pqh_situations Row
69   --
70   update pqh_situations
71     set
72      situation_id                    = p_rec.situation_id
73     ,situation                       = p_rec.situation
74     ,effective_start_date            = p_rec.effective_start_date
75     ,effective_end_date              = p_rec.effective_end_date
76     ,business_group_id               = p_rec.business_group_id
77     ,situation_type                  = p_rec.situation_type
78     ,length_of_service               = p_rec.length_of_service
79     ,employee_type                   = p_rec.employee_type
80     ,entitlement_flag                = p_rec.entitlement_flag
81     ,worktime_proportional           = p_rec.worktime_proportional
82     ,entitlement_value               = p_rec.entitlement_value
83     ,information_category            = p_rec.information_category
84     ,information1                    = p_rec.information1
85     ,information2                    = p_rec.information2
86     ,information3                    = p_rec.information3
87     ,information4                    = p_rec.information4
88     ,information5                    = p_rec.information5
89     ,information6                    = p_rec.information6
90     ,information7                    = p_rec.information7
91     ,information8                    = p_rec.information8
92     ,information9                    = p_rec.information9
93     ,information10                   = p_rec.information10
94     ,information11                   = p_rec.information11
95     ,information12                   = p_rec.information12
96     ,information13                   = p_rec.information13
97     ,information14                   = p_rec.information14
98     ,information15                   = p_rec.information15
99     ,information16                   = p_rec.information16
100     ,information17                   = p_rec.information17
101     ,information18                   = p_rec.information18
102     ,information19                   = p_rec.information19
103     ,information20                   = p_rec.information20
104     ,information21                   = p_rec.information21
105     ,information22                   = p_rec.information22
106     ,information23                   = p_rec.information23
107     ,information24                   = p_rec.information24
108     ,information25                   = p_rec.information25
109     ,information26                   = p_rec.information26
110     ,information27                   = p_rec.information27
111     ,information28                   = p_rec.information28
112     ,information29                   = p_rec.information29
113     ,information30                   = p_rec.information30
114     ,attribute_category              = p_rec.attribute_category
115     ,attribute1                      = p_rec.attribute1
116     ,attribute2                      = p_rec.attribute2
117     ,attribute3                      = p_rec.attribute3
118     ,attribute4                      = p_rec.attribute4
119     ,attribute5                      = p_rec.attribute5
120     ,attribute6                      = p_rec.attribute6
121     ,attribute7                      = p_rec.attribute7
122     ,attribute8                      = p_rec.attribute8
123     ,attribute9                      = p_rec.attribute9
124     ,attribute10                     = p_rec.attribute10
125     ,attribute11                     = p_rec.attribute11
126     ,attribute12                     = p_rec.attribute12
127     ,attribute13                     = p_rec.attribute13
128     ,attribute14                     = p_rec.attribute14
129     ,attribute15                     = p_rec.attribute15
130     ,attribute16                     = p_rec.attribute16
131     ,attribute17                     = p_rec.attribute17
132     ,attribute18                     = p_rec.attribute18
133     ,attribute19                     = p_rec.attribute19
134     ,attribute20                     = p_rec.attribute20
135     ,attribute21                     = p_rec.attribute21
136     ,attribute22                     = p_rec.attribute22
137     ,attribute23                     = p_rec.attribute23
138     ,attribute24                     = p_rec.attribute24
139     ,attribute25                     = p_rec.attribute25
140     ,attribute26                     = p_rec.attribute26
141     ,attribute27                     = p_rec.attribute27
142     ,attribute28                     = p_rec.attribute28
143     ,attribute29                     = p_rec.attribute29
144     ,attribute30                     = p_rec.attribute30
145     ,object_version_number           = p_rec.object_version_number
146     where situation_id = p_rec.situation_id;
147   --
148   --
149   --
150   hr_utility.set_location(' Leaving:'||l_proc, 10);
151 --
152 Exception
153   When hr_api.check_integrity_violated Then
154     -- A check constraint has been violated
155     --
156     pqh_los_shd.constraint_error
157       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
158   When hr_api.parent_integrity_violated Then
159     -- Parent integrity has been violated
160     --
161     pqh_los_shd.constraint_error
162       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
163   When hr_api.unique_integrity_violated Then
164     -- Unique integrity has been violated
165     --
166     pqh_los_shd.constraint_error
167       (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
168   When Others Then
169     --
170     Raise;
171 End update_dml;
172 --
173 -- ----------------------------------------------------------------------------
174 -- |------------------------------< pre_update >------------------------------|
175 -- ----------------------------------------------------------------------------
176 -- {Start Of Comments}
177 --
178 -- Description:
179 --   This private procedure contains any processing which is required before
180 --   the update dml.
181 --
182 -- Prerequisites:
183 --   This is an internal procedure which is called from the upd procedure.
184 --
185 -- In Parameters:
186 --   A Pl/Sql record structure.
187 --
188 -- Post Success:
189 --   Processing continues.
190 --
191 -- Post Failure:
192 --   If an error has occurred, an error message and exception wil be raised
193 --   but not handled.
194 --
195 -- Developer Implementation Notes:
196 --   Any pre-processing required before the update dml is issued should be
197 --   coded within this procedure. It is important to note that any 3rd party
198 --   maintenance should be reviewed before placing in this procedure.
199 --
200 -- Access Status:
201 --   Internal Row Handler Use Only.
202 --
203 -- {End Of Comments}
204 -- ----------------------------------------------------------------------------
205 Procedure pre_update
206   (p_rec in pqh_los_shd.g_rec_type
207   ) is
208 --
209   l_proc  varchar2(72) := g_package||'pre_update';
210 --
211 Begin
212   hr_utility.set_location('Entering:'||l_proc, 5);
213   --
214   hr_utility.set_location(' Leaving:'||l_proc, 10);
215 End pre_update;
216 --
217 -- ----------------------------------------------------------------------------
218 -- |-----------------------------< post_update >------------------------------|
219 -- ----------------------------------------------------------------------------
220 -- {Start Of Comments}
221 --
222 -- Description:
223 --   This private procedure contains any processing which is required after
224 --   the update dml.
225 --
226 -- Prerequisites:
227 --   This is an internal procedure which is called from the upd procedure.
228 --
229 -- In Parameters:
230 --   A Pl/Sql record structure.
231 --
232 -- Post Success:
233 --   Processing continues.
234 --
235 -- Post Failure:
236 --   If an error has occurred, an error message and exception will be raised
237 --   but not handled.
238 --
239 -- Developer Implementation Notes:
240 --   Any post-processing required after the update dml is issued should be
241 --   coded within this procedure. It is important to note that any 3rd party
242 --   maintenance should be reviewed before placing in this procedure.
243 --
244 -- Access Status:
245 --   Internal Row Handler Use Only.
246 --
247 -- {End Of Comments}
248 -- ----------------------------------------------------------------------------
249 Procedure post_update
250   (p_effective_date               in date
251   ,p_rec                          in pqh_los_shd.g_rec_type
252   ) is
253 --
254   l_proc  varchar2(72) := g_package||'post_update';
255 --
256 Begin
257   hr_utility.set_location('Entering:'||l_proc, 5);
258   begin
259     --
260     pqh_los_rku.after_update
261       (p_effective_date              => p_effective_date
262       ,p_situation_id
263       => p_rec.situation_id
264       ,p_situation
265       => p_rec.situation
266       ,p_effective_start_date
267       => p_rec.effective_start_date
268       ,p_effective_end_date
269       => p_rec.effective_end_date
270       ,p_business_group_id
271       => p_rec.business_group_id
272       ,p_situation_type
273       => p_rec.situation_type
274       ,p_length_of_service
275       => p_rec.length_of_service
276       ,p_employee_type
277       => p_rec.employee_type
278       ,p_entitlement_flag
279       => p_rec.entitlement_flag
280       ,p_worktime_proportional
281       => p_rec.worktime_proportional
282       ,p_entitlement_value
283       => p_rec.entitlement_value
284       ,p_information_category
285       => p_rec.information_category
286       ,p_information1
287       => p_rec.information1
288       ,p_information2
289       => p_rec.information2
290       ,p_information3
291       => p_rec.information3
292       ,p_information4
293       => p_rec.information4
294       ,p_information5
295       => p_rec.information5
296       ,p_information6
297       => p_rec.information6
298       ,p_information7
299       => p_rec.information7
300       ,p_information8
301       => p_rec.information8
302       ,p_information9
303       => p_rec.information9
304       ,p_information10
305       => p_rec.information10
306       ,p_information11
307       => p_rec.information11
308       ,p_information12
309       => p_rec.information12
310       ,p_information13
311       => p_rec.information13
312       ,p_information14
313       => p_rec.information14
314       ,p_information15
315       => p_rec.information15
316       ,p_information16
317       => p_rec.information16
318       ,p_information17
319       => p_rec.information17
320       ,p_information18
321       => p_rec.information18
322       ,p_information19
323       => p_rec.information19
324       ,p_information20
325       => p_rec.information20
326       ,p_information21
327       => p_rec.information21
328       ,p_information22
329       => p_rec.information22
330       ,p_information23
331       => p_rec.information23
332       ,p_information24
333       => p_rec.information24
334       ,p_information25
335       => p_rec.information25
336       ,p_information26
337       => p_rec.information26
338       ,p_information27
339       => p_rec.information27
340       ,p_information28
341       => p_rec.information28
342       ,p_information29
343       => p_rec.information29
344       ,p_information30
345       => p_rec.information30
346       ,p_attribute_category
347       => p_rec.attribute_category
348       ,p_attribute1
349       => p_rec.attribute1
350       ,p_attribute2
351       => p_rec.attribute2
352       ,p_attribute3
353       => p_rec.attribute3
354       ,p_attribute4
355       => p_rec.attribute4
356       ,p_attribute5
357       => p_rec.attribute5
358       ,p_attribute6
359       => p_rec.attribute6
360       ,p_attribute7
361       => p_rec.attribute7
362       ,p_attribute8
363       => p_rec.attribute8
364       ,p_attribute9
365       => p_rec.attribute9
366       ,p_attribute10
367       => p_rec.attribute10
368       ,p_attribute11
369       => p_rec.attribute11
370       ,p_attribute12
371       => p_rec.attribute12
372       ,p_attribute13
373       => p_rec.attribute13
374       ,p_attribute14
375       => p_rec.attribute14
376       ,p_attribute15
377       => p_rec.attribute15
378       ,p_attribute16
379       => p_rec.attribute16
380       ,p_attribute17
381       => p_rec.attribute17
382       ,p_attribute18
383       => p_rec.attribute18
384       ,p_attribute19
385       => p_rec.attribute19
386       ,p_attribute20
387       => p_rec.attribute20
388       ,p_attribute21
389       => p_rec.attribute21
390       ,p_attribute22
391       => p_rec.attribute22
392       ,p_attribute23
393       => p_rec.attribute23
394       ,p_attribute24
395       => p_rec.attribute24
396       ,p_attribute25
397       => p_rec.attribute25
398       ,p_attribute26
399       => p_rec.attribute26
400       ,p_attribute27
401       => p_rec.attribute27
402       ,p_attribute28
403       => p_rec.attribute28
404       ,p_attribute29
405       => p_rec.attribute29
406       ,p_attribute30
407       => p_rec.attribute30
408       ,p_object_version_number
409       => p_rec.object_version_number
410       ,p_situation_o
414       ,p_effective_end_date_o
411       => pqh_los_shd.g_old_rec.situation
412       ,p_effective_start_date_o
413       => pqh_los_shd.g_old_rec.effective_start_date
415       => pqh_los_shd.g_old_rec.effective_end_date
416       ,p_business_group_id_o
417       => pqh_los_shd.g_old_rec.business_group_id
418       ,p_situation_type_o
419       => pqh_los_shd.g_old_rec.situation_type
420       ,p_length_of_service_o
421       => pqh_los_shd.g_old_rec.length_of_service
422       ,p_employee_type_o
423       => pqh_los_shd.g_old_rec.employee_type
424       ,p_entitlement_flag_o
425       => pqh_los_shd.g_old_rec.entitlement_flag
426       ,p_worktime_proportional_o
427       => pqh_los_shd.g_old_rec.worktime_proportional
428       ,p_entitlement_value_o
429       => pqh_los_shd.g_old_rec.entitlement_value
430       ,p_information_category_o
431       => pqh_los_shd.g_old_rec.information_category
432       ,p_information1_o
433       => pqh_los_shd.g_old_rec.information1
434       ,p_information2_o
435       => pqh_los_shd.g_old_rec.information2
436       ,p_information3_o
437       => pqh_los_shd.g_old_rec.information3
438       ,p_information4_o
439       => pqh_los_shd.g_old_rec.information4
440       ,p_information5_o
441       => pqh_los_shd.g_old_rec.information5
442       ,p_information6_o
443       => pqh_los_shd.g_old_rec.information6
444       ,p_information7_o
445       => pqh_los_shd.g_old_rec.information7
446       ,p_information8_o
447       => pqh_los_shd.g_old_rec.information8
448       ,p_information9_o
449       => pqh_los_shd.g_old_rec.information9
450       ,p_information10_o
451       => pqh_los_shd.g_old_rec.information10
452       ,p_information11_o
453       => pqh_los_shd.g_old_rec.information11
454       ,p_information12_o
455       => pqh_los_shd.g_old_rec.information12
456       ,p_information13_o
457       => pqh_los_shd.g_old_rec.information13
458       ,p_information14_o
459       => pqh_los_shd.g_old_rec.information14
460       ,p_information15_o
461       => pqh_los_shd.g_old_rec.information15
462       ,p_information16_o
463       => pqh_los_shd.g_old_rec.information16
464       ,p_information17_o
465       => pqh_los_shd.g_old_rec.information17
466       ,p_information18_o
467       => pqh_los_shd.g_old_rec.information18
468       ,p_information19_o
469       => pqh_los_shd.g_old_rec.information19
470       ,p_information20_o
471       => pqh_los_shd.g_old_rec.information20
472       ,p_information21_o
473       => pqh_los_shd.g_old_rec.information21
474       ,p_information22_o
475       => pqh_los_shd.g_old_rec.information22
476       ,p_information23_o
477       => pqh_los_shd.g_old_rec.information23
478       ,p_information24_o
479       => pqh_los_shd.g_old_rec.information24
480       ,p_information25_o
481       => pqh_los_shd.g_old_rec.information25
482       ,p_information26_o
483       => pqh_los_shd.g_old_rec.information26
484       ,p_information27_o
485       => pqh_los_shd.g_old_rec.information27
486       ,p_information28_o
487       => pqh_los_shd.g_old_rec.information28
488       ,p_information29_o
489       => pqh_los_shd.g_old_rec.information29
490       ,p_information30_o
491       => pqh_los_shd.g_old_rec.information30
492       ,p_attribute_category_o
493       => pqh_los_shd.g_old_rec.attribute_category
494       ,p_attribute1_o
495       => pqh_los_shd.g_old_rec.attribute1
496       ,p_attribute2_o
497       => pqh_los_shd.g_old_rec.attribute2
498       ,p_attribute3_o
499       => pqh_los_shd.g_old_rec.attribute3
500       ,p_attribute4_o
501       => pqh_los_shd.g_old_rec.attribute4
502       ,p_attribute5_o
503       => pqh_los_shd.g_old_rec.attribute5
504       ,p_attribute6_o
505       => pqh_los_shd.g_old_rec.attribute6
506       ,p_attribute7_o
507       => pqh_los_shd.g_old_rec.attribute7
508       ,p_attribute8_o
509       => pqh_los_shd.g_old_rec.attribute8
510       ,p_attribute9_o
511       => pqh_los_shd.g_old_rec.attribute9
512       ,p_attribute10_o
513       => pqh_los_shd.g_old_rec.attribute10
514       ,p_attribute11_o
515       => pqh_los_shd.g_old_rec.attribute11
516       ,p_attribute12_o
517       => pqh_los_shd.g_old_rec.attribute12
518       ,p_attribute13_o
519       => pqh_los_shd.g_old_rec.attribute13
520       ,p_attribute14_o
521       => pqh_los_shd.g_old_rec.attribute14
522       ,p_attribute15_o
523       => pqh_los_shd.g_old_rec.attribute15
524       ,p_attribute16_o
525       => pqh_los_shd.g_old_rec.attribute16
526       ,p_attribute17_o
527       => pqh_los_shd.g_old_rec.attribute17
528       ,p_attribute18_o
529       => pqh_los_shd.g_old_rec.attribute18
530       ,p_attribute19_o
531       => pqh_los_shd.g_old_rec.attribute19
532       ,p_attribute20_o
533       => pqh_los_shd.g_old_rec.attribute20
534       ,p_attribute21_o
535       => pqh_los_shd.g_old_rec.attribute21
536       ,p_attribute22_o
537       => pqh_los_shd.g_old_rec.attribute22
538       ,p_attribute23_o
539       => pqh_los_shd.g_old_rec.attribute23
540       ,p_attribute24_o
541       => pqh_los_shd.g_old_rec.attribute24
542       ,p_attribute25_o
543       => pqh_los_shd.g_old_rec.attribute25
544       ,p_attribute26_o
548       ,p_attribute28_o
545       => pqh_los_shd.g_old_rec.attribute26
546       ,p_attribute27_o
547       => pqh_los_shd.g_old_rec.attribute27
549       => pqh_los_shd.g_old_rec.attribute28
550       ,p_attribute29_o
551       => pqh_los_shd.g_old_rec.attribute29
552       ,p_attribute30_o
553       => pqh_los_shd.g_old_rec.attribute30
554       ,p_object_version_number_o
555       => pqh_los_shd.g_old_rec.object_version_number
556       );
557     --
558   exception
559     --
560     when hr_api.cannot_find_prog_unit then
561       --
562       hr_api.cannot_find_prog_unit_error
563         (p_module_name => 'PQH_SITUATIONS'
564         ,p_hook_type   => 'AU');
565       --
566   end;
567   --
568   hr_utility.set_location(' Leaving:'||l_proc, 10);
569 End post_update;
570 --
571 -- ----------------------------------------------------------------------------
572 -- |-----------------------------< convert_defs >-----------------------------|
573 -- ----------------------------------------------------------------------------
574 -- {Start Of Comments}
575 --
576 -- Description:
577 --   The Convert_Defs procedure has one very important function:
578 --   It must return the record structure for the row with all system defaulted
579 --   values converted into its corresponding parameter value for update. When
580 --   we attempt to update a row through the Upd process , certain
581 --   parameters can be defaulted which enables flexibility in the calling of
582 --   the upd process (e.g. only attributes which need to be updated need to be
583 --   specified). For the upd process to determine which attributes
584 --   have NOT been specified we need to check if the parameter has a reserved
585 --   system default value. Therefore, for all parameters which have a
586 --   corresponding reserved system default mechanism specified we need to
587 --   check if a system default is being used. If a system default is being
588 --   used then we convert the defaulted value into its corresponding attribute
589 --   value held in the g_old_rec data structure.
590 --
591 -- Prerequisites:
592 --   This private function can only be called from the upd process.
593 --
594 -- In Parameters:
595 --   A Pl/Sql record structure.
596 --
597 -- Post Success:
598 --   The record structure will be returned with all system defaulted parameter
599 --   values converted into its current row attribute value.
600 --
601 -- Post Failure:
602 --   No direct error handling is required within this function. Any possible
603 --   errors within this procedure will be a PL/SQL value error due to
604 --   conversion of datatypes or data lengths.
605 --
606 -- Developer Implementation Notes:
607 --   None.
608 --
609 -- Access Status:
610 --   Internal Row Handler Use Only.
611 --
612 -- {End Of Comments}
613 -- ----------------------------------------------------------------------------
614 Procedure convert_defs
615   (p_rec in out nocopy pqh_los_shd.g_rec_type
616   ) is
617 --
618 Begin
619   --
620   -- We must now examine each argument value in the
621   -- p_rec plsql record structure
622   -- to see if a system default is being used. If a system default
623   -- is being used then we must set to the 'current' argument value.
624   --
625   If (p_rec.situation = hr_api.g_varchar2) then
626     p_rec.situation :=
627     pqh_los_shd.g_old_rec.situation;
628   End If;
629   If (p_rec.effective_start_date = hr_api.g_date) then
630     p_rec.effective_start_date :=
631     pqh_los_shd.g_old_rec.effective_start_date;
632   End If;
633   If (p_rec.effective_end_date = hr_api.g_date) then
634     p_rec.effective_end_date :=
635     pqh_los_shd.g_old_rec.effective_end_date;
636   End If;
637   If (p_rec.business_group_id = hr_api.g_number) then
638     p_rec.business_group_id :=
639     pqh_los_shd.g_old_rec.business_group_id;
640   End If;
641   If (p_rec.situation_type = hr_api.g_varchar2) then
642     p_rec.situation_type :=
643     pqh_los_shd.g_old_rec.situation_type;
644   End If;
645   If (p_rec.length_of_service = hr_api.g_varchar2) then
646     p_rec.length_of_service :=
647     pqh_los_shd.g_old_rec.length_of_service;
648   End If;
649   If (p_rec.employee_type = hr_api.g_varchar2) then
650     p_rec.employee_type :=
651     pqh_los_shd.g_old_rec.employee_type;
652   End If;
653   If (p_rec.entitlement_flag = hr_api.g_varchar2) then
654     p_rec.entitlement_flag :=
655     pqh_los_shd.g_old_rec.entitlement_flag;
656   End If;
657   If (p_rec.worktime_proportional = hr_api.g_varchar2) then
658     p_rec.worktime_proportional :=
659     pqh_los_shd.g_old_rec.worktime_proportional;
660   End If;
661   If (p_rec.entitlement_value = hr_api.g_number) then
662     p_rec.entitlement_value :=
663     pqh_los_shd.g_old_rec.entitlement_value;
664   End If;
665   If (p_rec.information_category = hr_api.g_varchar2) then
666     p_rec.information_category :=
667     pqh_los_shd.g_old_rec.information_category;
668   End If;
669   If (p_rec.information1 = hr_api.g_varchar2) then
670     p_rec.information1 :=
671     pqh_los_shd.g_old_rec.information1;
672   End If;
673   If (p_rec.information2 = hr_api.g_varchar2) then
674     p_rec.information2 :=
675     pqh_los_shd.g_old_rec.information2;
676   End If;
680   End If;
677   If (p_rec.information3 = hr_api.g_varchar2) then
678     p_rec.information3 :=
679     pqh_los_shd.g_old_rec.information3;
681   If (p_rec.information4 = hr_api.g_varchar2) then
682     p_rec.information4 :=
683     pqh_los_shd.g_old_rec.information4;
684   End If;
685   If (p_rec.information5 = hr_api.g_varchar2) then
686     p_rec.information5 :=
687     pqh_los_shd.g_old_rec.information5;
688   End If;
689   If (p_rec.information6 = hr_api.g_varchar2) then
690     p_rec.information6 :=
691     pqh_los_shd.g_old_rec.information6;
692   End If;
693   If (p_rec.information7 = hr_api.g_varchar2) then
694     p_rec.information7 :=
695     pqh_los_shd.g_old_rec.information7;
696   End If;
697   If (p_rec.information8 = hr_api.g_varchar2) then
698     p_rec.information8 :=
699     pqh_los_shd.g_old_rec.information8;
700   End If;
701   If (p_rec.information9 = hr_api.g_varchar2) then
702     p_rec.information9 :=
703     pqh_los_shd.g_old_rec.information9;
704   End If;
705   If (p_rec.information10 = hr_api.g_varchar2) then
706     p_rec.information10 :=
707     pqh_los_shd.g_old_rec.information10;
708   End If;
709   If (p_rec.information11 = hr_api.g_varchar2) then
710     p_rec.information11 :=
711     pqh_los_shd.g_old_rec.information11;
712   End If;
713   If (p_rec.information12 = hr_api.g_varchar2) then
714     p_rec.information12 :=
715     pqh_los_shd.g_old_rec.information12;
716   End If;
717   If (p_rec.information13 = hr_api.g_varchar2) then
718     p_rec.information13 :=
719     pqh_los_shd.g_old_rec.information13;
720   End If;
721   If (p_rec.information14 = hr_api.g_varchar2) then
722     p_rec.information14 :=
723     pqh_los_shd.g_old_rec.information14;
724   End If;
725   If (p_rec.information15 = hr_api.g_varchar2) then
726     p_rec.information15 :=
727     pqh_los_shd.g_old_rec.information15;
728   End If;
729   If (p_rec.information16 = hr_api.g_varchar2) then
730     p_rec.information16 :=
731     pqh_los_shd.g_old_rec.information16;
732   End If;
733   If (p_rec.information17 = hr_api.g_varchar2) then
734     p_rec.information17 :=
735     pqh_los_shd.g_old_rec.information17;
736   End If;
737   If (p_rec.information18 = hr_api.g_varchar2) then
738     p_rec.information18 :=
739     pqh_los_shd.g_old_rec.information18;
740   End If;
741   If (p_rec.information19 = hr_api.g_varchar2) then
742     p_rec.information19 :=
743     pqh_los_shd.g_old_rec.information19;
744   End If;
745   If (p_rec.information20 = hr_api.g_varchar2) then
746     p_rec.information20 :=
747     pqh_los_shd.g_old_rec.information20;
748   End If;
749   If (p_rec.information21 = hr_api.g_varchar2) then
750     p_rec.information21 :=
751     pqh_los_shd.g_old_rec.information21;
752   End If;
753   If (p_rec.information22 = hr_api.g_varchar2) then
754     p_rec.information22 :=
755     pqh_los_shd.g_old_rec.information22;
756   End If;
757   If (p_rec.information23 = hr_api.g_varchar2) then
758     p_rec.information23 :=
759     pqh_los_shd.g_old_rec.information23;
760   End If;
761   If (p_rec.information24 = hr_api.g_varchar2) then
762     p_rec.information24 :=
763     pqh_los_shd.g_old_rec.information24;
764   End If;
765   If (p_rec.information25 = hr_api.g_varchar2) then
766     p_rec.information25 :=
767     pqh_los_shd.g_old_rec.information25;
768   End If;
769   If (p_rec.information26 = hr_api.g_varchar2) then
770     p_rec.information26 :=
771     pqh_los_shd.g_old_rec.information26;
772   End If;
773   If (p_rec.information27 = hr_api.g_varchar2) then
774     p_rec.information27 :=
775     pqh_los_shd.g_old_rec.information27;
776   End If;
777   If (p_rec.information28 = hr_api.g_varchar2) then
778     p_rec.information28 :=
779     pqh_los_shd.g_old_rec.information28;
780   End If;
781   If (p_rec.information29 = hr_api.g_varchar2) then
782     p_rec.information29 :=
783     pqh_los_shd.g_old_rec.information29;
784   End If;
785   If (p_rec.information30 = hr_api.g_varchar2) then
786     p_rec.information30 :=
787     pqh_los_shd.g_old_rec.information30;
788   End If;
789   If (p_rec.attribute_category = hr_api.g_varchar2) then
790     p_rec.attribute_category :=
791     pqh_los_shd.g_old_rec.attribute_category;
792   End If;
793   If (p_rec.attribute1 = hr_api.g_varchar2) then
794     p_rec.attribute1 :=
795     pqh_los_shd.g_old_rec.attribute1;
796   End If;
797   If (p_rec.attribute2 = hr_api.g_varchar2) then
798     p_rec.attribute2 :=
799     pqh_los_shd.g_old_rec.attribute2;
800   End If;
801   If (p_rec.attribute3 = hr_api.g_varchar2) then
802     p_rec.attribute3 :=
803     pqh_los_shd.g_old_rec.attribute3;
804   End If;
805   If (p_rec.attribute4 = hr_api.g_varchar2) then
806     p_rec.attribute4 :=
807     pqh_los_shd.g_old_rec.attribute4;
808   End If;
809   If (p_rec.attribute5 = hr_api.g_varchar2) then
810     p_rec.attribute5 :=
811     pqh_los_shd.g_old_rec.attribute5;
812   End If;
813   If (p_rec.attribute6 = hr_api.g_varchar2) then
814     p_rec.attribute6 :=
815     pqh_los_shd.g_old_rec.attribute6;
816   End If;
817   If (p_rec.attribute7 = hr_api.g_varchar2) then
818     p_rec.attribute7 :=
819     pqh_los_shd.g_old_rec.attribute7;
820   End If;
821   If (p_rec.attribute8 = hr_api.g_varchar2) then
822     p_rec.attribute8 :=
823     pqh_los_shd.g_old_rec.attribute8;
824   End If;
825   If (p_rec.attribute9 = hr_api.g_varchar2) then
826     p_rec.attribute9 :=
827     pqh_los_shd.g_old_rec.attribute9;
828   End If;
829   If (p_rec.attribute10 = hr_api.g_varchar2) then
830     p_rec.attribute10 :=
831     pqh_los_shd.g_old_rec.attribute10;
832   End If;
833   If (p_rec.attribute11 = hr_api.g_varchar2) then
834     p_rec.attribute11 :=
835     pqh_los_shd.g_old_rec.attribute11;
836   End If;
837   If (p_rec.attribute12 = hr_api.g_varchar2) then
838     p_rec.attribute12 :=
839     pqh_los_shd.g_old_rec.attribute12;
840   End If;
841   If (p_rec.attribute13 = hr_api.g_varchar2) then
842     p_rec.attribute13 :=
843     pqh_los_shd.g_old_rec.attribute13;
844   End If;
845   If (p_rec.attribute14 = hr_api.g_varchar2) then
846     p_rec.attribute14 :=
847     pqh_los_shd.g_old_rec.attribute14;
848   End If;
849   If (p_rec.attribute15 = hr_api.g_varchar2) then
850     p_rec.attribute15 :=
851     pqh_los_shd.g_old_rec.attribute15;
852   End If;
853   If (p_rec.attribute16 = hr_api.g_varchar2) then
854     p_rec.attribute16 :=
855     pqh_los_shd.g_old_rec.attribute16;
856   End If;
857   If (p_rec.attribute17 = hr_api.g_varchar2) then
858     p_rec.attribute17 :=
859     pqh_los_shd.g_old_rec.attribute17;
860   End If;
861   If (p_rec.attribute18 = hr_api.g_varchar2) then
862     p_rec.attribute18 :=
863     pqh_los_shd.g_old_rec.attribute18;
864   End If;
865   If (p_rec.attribute19 = hr_api.g_varchar2) then
866     p_rec.attribute19 :=
867     pqh_los_shd.g_old_rec.attribute19;
868   End If;
869   If (p_rec.attribute20 = hr_api.g_varchar2) then
870     p_rec.attribute20 :=
871     pqh_los_shd.g_old_rec.attribute20;
872   End If;
873   If (p_rec.attribute21 = hr_api.g_varchar2) then
874     p_rec.attribute21 :=
875     pqh_los_shd.g_old_rec.attribute21;
876   End If;
877   If (p_rec.attribute22 = hr_api.g_varchar2) then
878     p_rec.attribute22 :=
879     pqh_los_shd.g_old_rec.attribute22;
880   End If;
881   If (p_rec.attribute23 = hr_api.g_varchar2) then
882     p_rec.attribute23 :=
883     pqh_los_shd.g_old_rec.attribute23;
884   End If;
885   If (p_rec.attribute24 = hr_api.g_varchar2) then
886     p_rec.attribute24 :=
887     pqh_los_shd.g_old_rec.attribute24;
888   End If;
889   If (p_rec.attribute25 = hr_api.g_varchar2) then
890     p_rec.attribute25 :=
891     pqh_los_shd.g_old_rec.attribute25;
892   End If;
893   If (p_rec.attribute26 = hr_api.g_varchar2) then
894     p_rec.attribute26 :=
895     pqh_los_shd.g_old_rec.attribute26;
896   End If;
897   If (p_rec.attribute27 = hr_api.g_varchar2) then
898     p_rec.attribute27 :=
899     pqh_los_shd.g_old_rec.attribute27;
900   End If;
901   If (p_rec.attribute28 = hr_api.g_varchar2) then
902     p_rec.attribute28 :=
903     pqh_los_shd.g_old_rec.attribute28;
904   End If;
905   If (p_rec.attribute29 = hr_api.g_varchar2) then
906     p_rec.attribute29 :=
907     pqh_los_shd.g_old_rec.attribute29;
908   End If;
909   If (p_rec.attribute30 = hr_api.g_varchar2) then
910     p_rec.attribute30 :=
911     pqh_los_shd.g_old_rec.attribute30;
912   End If;
913   --
914 End convert_defs;
915 --
916 -- ----------------------------------------------------------------------------
917 -- |---------------------------------< upd >----------------------------------|
921   ,p_rec                          in out nocopy pqh_los_shd.g_rec_type
918 -- ----------------------------------------------------------------------------
919 Procedure upd
920   (p_effective_date               in date
922   ) is
923 --
924   l_proc  varchar2(72) := g_package||'upd';
925 --
926 Begin
927   hr_utility.set_location('Entering:'||l_proc, 5);
928   --
929   -- We must lock the row which we need to update.
930   --
931   pqh_los_shd.lck
932     (p_rec.situation_id
933     ,p_rec.object_version_number
934     );
935   --
936   -- 1. During an update system defaults are used to determine if
937   --    arguments have been defaulted or not. We must therefore
938   --    derive the full record structure values to be updated.
939   --
940   -- 2. Call the supporting update validate operations.
941   --
942   convert_defs(p_rec);
943   pqh_los_bus.update_validate
944      (p_effective_date
945      ,p_rec
946      );
947   --
948   -- Call to raise any errors on multi-message list
949   hr_multi_message.end_validation_set;
950   --
951   -- Call the supporting pre-update operation
952   --
953   pqh_los_upd.pre_update(p_rec);
954   --
955   -- Update the row.
956   --
957   pqh_los_upd.update_dml(p_rec);
958   --
959   -- Call the supporting post-update operation
960   --
961   pqh_los_upd.post_update
962      (p_effective_date
963      ,p_rec
964      );
965   --
966   -- Call to raise any errors on multi-message list
967   hr_multi_message.end_validation_set;
968 End upd;
969 --
970 -- ----------------------------------------------------------------------------
971 -- |---------------------------------< upd >----------------------------------|
972 -- ----------------------------------------------------------------------------
973 Procedure upd
974   (p_effective_date               in     date
975   ,p_situation_id                 in     number
976   ,p_object_version_number        in out nocopy number
977   ,p_situation                    in     varchar2  default hr_api.g_varchar2
978   ,p_effective_start_date         in     date      default hr_api.g_date
979   ,p_business_group_id            in     number    default hr_api.g_number
980   ,p_situation_type               in     varchar2  default hr_api.g_varchar2
981   ,p_length_of_service            in     varchar2  default hr_api.g_varchar2
982   ,p_effective_end_date           in     date      default hr_api.g_date
983   ,p_employee_type                in     varchar2  default hr_api.g_varchar2
984   ,p_entitlement_flag             in     varchar2  default hr_api.g_varchar2
985   ,p_worktime_proportional        in     varchar2  default hr_api.g_varchar2
986   ,p_entitlement_value            in     number    default hr_api.g_number
987   ,p_information_category         in     varchar2  default hr_api.g_varchar2
988   ,p_information1                 in     varchar2  default hr_api.g_varchar2
989   ,p_information2                 in     varchar2  default hr_api.g_varchar2
990   ,p_information3                 in     varchar2  default hr_api.g_varchar2
991   ,p_information4                 in     varchar2  default hr_api.g_varchar2
992   ,p_information5                 in     varchar2  default hr_api.g_varchar2
993   ,p_information6                 in     varchar2  default hr_api.g_varchar2
994   ,p_information7                 in     varchar2  default hr_api.g_varchar2
995   ,p_information8                 in     varchar2  default hr_api.g_varchar2
996   ,p_information9                 in     varchar2  default hr_api.g_varchar2
997   ,p_information10                in     varchar2  default hr_api.g_varchar2
998   ,p_information11                in     varchar2  default hr_api.g_varchar2
999   ,p_information12                in     varchar2  default hr_api.g_varchar2
1000   ,p_information13                in     varchar2  default hr_api.g_varchar2
1001   ,p_information14                in     varchar2  default hr_api.g_varchar2
1002   ,p_information15                in     varchar2  default hr_api.g_varchar2
1003   ,p_information16                in     varchar2  default hr_api.g_varchar2
1004   ,p_information17                in     varchar2  default hr_api.g_varchar2
1005   ,p_information18                in     varchar2  default hr_api.g_varchar2
1006   ,p_information19                in     varchar2  default hr_api.g_varchar2
1007   ,p_information20                in     varchar2  default hr_api.g_varchar2
1008   ,p_information21                in     varchar2  default hr_api.g_varchar2
1009   ,p_information22                in     varchar2  default hr_api.g_varchar2
1010   ,p_information23                in     varchar2  default hr_api.g_varchar2
1011   ,p_information24                in     varchar2  default hr_api.g_varchar2
1012   ,p_information25                in     varchar2  default hr_api.g_varchar2
1013   ,p_information26                in     varchar2  default hr_api.g_varchar2
1014   ,p_information27                in     varchar2  default hr_api.g_varchar2
1015   ,p_information28                in     varchar2  default hr_api.g_varchar2
1016   ,p_information29                in     varchar2  default hr_api.g_varchar2
1017   ,p_information30                in     varchar2  default hr_api.g_varchar2
1018   ,p_attribute_category           in     varchar2  default hr_api.g_varchar2
1019   ,p_attribute1                   in     varchar2  default hr_api.g_varchar2
1020   ,p_attribute2                   in     varchar2  default hr_api.g_varchar2
1021   ,p_attribute3                   in     varchar2  default hr_api.g_varchar2
1022   ,p_attribute4                   in     varchar2  default hr_api.g_varchar2
1026   ,p_attribute8                   in     varchar2  default hr_api.g_varchar2
1023   ,p_attribute5                   in     varchar2  default hr_api.g_varchar2
1024   ,p_attribute6                   in     varchar2  default hr_api.g_varchar2
1025   ,p_attribute7                   in     varchar2  default hr_api.g_varchar2
1027   ,p_attribute9                   in     varchar2  default hr_api.g_varchar2
1028   ,p_attribute10                  in     varchar2  default hr_api.g_varchar2
1029   ,p_attribute11                  in     varchar2  default hr_api.g_varchar2
1030   ,p_attribute12                  in     varchar2  default hr_api.g_varchar2
1031   ,p_attribute13                  in     varchar2  default hr_api.g_varchar2
1032   ,p_attribute14                  in     varchar2  default hr_api.g_varchar2
1033   ,p_attribute15                  in     varchar2  default hr_api.g_varchar2
1034   ,p_attribute16                  in     varchar2  default hr_api.g_varchar2
1035   ,p_attribute17                  in     varchar2  default hr_api.g_varchar2
1036   ,p_attribute18                  in     varchar2  default hr_api.g_varchar2
1037   ,p_attribute19                  in     varchar2  default hr_api.g_varchar2
1038   ,p_attribute20                  in     varchar2  default hr_api.g_varchar2
1039   ,p_attribute21                  in     varchar2  default hr_api.g_varchar2
1040   ,p_attribute22                  in     varchar2  default hr_api.g_varchar2
1041   ,p_attribute23                  in     varchar2  default hr_api.g_varchar2
1042   ,p_attribute24                  in     varchar2  default hr_api.g_varchar2
1043   ,p_attribute25                  in     varchar2  default hr_api.g_varchar2
1044   ,p_attribute26                  in     varchar2  default hr_api.g_varchar2
1045   ,p_attribute27                  in     varchar2  default hr_api.g_varchar2
1046   ,p_attribute28                  in     varchar2  default hr_api.g_varchar2
1047   ,p_attribute29                  in     varchar2  default hr_api.g_varchar2
1048   ,p_attribute30                  in     varchar2  default hr_api.g_varchar2
1049   ) is
1050 --
1051   l_rec   pqh_los_shd.g_rec_type;
1052   l_proc  varchar2(72) := g_package||'upd';
1053 --
1054 Begin
1055   hr_utility.set_location('Entering:'||l_proc, 5);
1056   --
1057   -- Call conversion function to turn arguments into the
1058   -- l_rec structure.
1059   --
1060   l_rec :=
1061   pqh_los_shd.convert_args
1062   (p_situation_id
1063   ,p_situation
1064   ,p_effective_start_date
1065   ,p_effective_end_date
1066   ,p_business_group_id
1067   ,p_situation_type
1068   ,p_length_of_service
1069   ,p_employee_type
1070   ,p_entitlement_flag
1071   ,p_worktime_proportional
1072   ,p_entitlement_value
1073   ,p_information_category
1074   ,p_information1
1075   ,p_information2
1076   ,p_information3
1077   ,p_information4
1078   ,p_information5
1079   ,p_information6
1080   ,p_information7
1081   ,p_information8
1082   ,p_information9
1083   ,p_information10
1084   ,p_information11
1085   ,p_information12
1086   ,p_information13
1087   ,p_information14
1088   ,p_information15
1089   ,p_information16
1090   ,p_information17
1091   ,p_information18
1092   ,p_information19
1093   ,p_information20
1094   ,p_information21
1095   ,p_information22
1096   ,p_information23
1097   ,p_information24
1098   ,p_information25
1099   ,p_information26
1100   ,p_information27
1101   ,p_information28
1102   ,p_information29
1103   ,p_information30
1104   ,p_attribute_category
1105   ,p_attribute1
1106   ,p_attribute2
1107   ,p_attribute3
1108   ,p_attribute4
1109   ,p_attribute5
1110   ,p_attribute6
1111   ,p_attribute7
1112   ,p_attribute8
1113   ,p_attribute9
1114   ,p_attribute10
1115   ,p_attribute11
1116   ,p_attribute12
1117   ,p_attribute13
1118   ,p_attribute14
1119   ,p_attribute15
1120   ,p_attribute16
1121   ,p_attribute17
1122   ,p_attribute18
1123   ,p_attribute19
1124   ,p_attribute20
1125   ,p_attribute21
1126   ,p_attribute22
1127   ,p_attribute23
1128   ,p_attribute24
1129   ,p_attribute25
1130   ,p_attribute26
1131   ,p_attribute27
1132   ,p_attribute28
1133   ,p_attribute29
1134   ,p_attribute30
1135   ,p_object_version_number
1136   );
1137   --
1138   -- Having converted the arguments into the
1139   -- plsql record structure we call the corresponding record
1140   -- business process.
1141   --
1142   pqh_los_upd.upd
1143      (p_effective_date
1144      ,l_rec
1145      );
1146   p_object_version_number := l_rec.object_version_number;
1147   --
1148   hr_utility.set_location(' Leaving:'||l_proc, 10);
1149 End upd;
1150 --
1151 end pqh_los_upd;