DBA Data[Home] [Help]

PACKAGE BODY: APPS.HR_ITP_UPD

Source


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