[Home] [Help]
PACKAGE BODY: APPS.PE_POI_UPD
Source
1 Package Body pe_poi_upd as
2 /* $Header: pepoirhi.pkb 120.0 2005/05/31 14:50:38 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' pe_poi_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 update the specified row in the schema using the primary key in
21 -- the predicates.
22 -- 3) To trap any constraint violations that may have occurred.
23 -- 4) To raise any other errors.
24 --
25 -- Pre Conditions:
26 -- This is an internal private procedure which must be called from the upd
27 -- procedure.
28 --
29 -- In Parameters:
30 -- A Pl/Sql record structre.
31 --
32 -- Post Success:
33 -- The specified row will be updated in the schema.
34 --
35 -- Post Failure:
36 -- If a check, unique or parent integrity constraint violation is raised the
37 -- constraint_error procedure will be called.
38 --
39 -- Developer Implementation Notes:
40 -- The update 'set' attribute list should be modified if any of your
41 -- attributes are not updateable.
42 --
43 -- Access Status:
44 -- Internal Table Handler Use Only.
45 --
46 -- {End Of Comments}
47 -- ----------------------------------------------------------------------------
48 Procedure update_dml(p_rec in out nocopy pe_poi_shd.g_rec_type) is
49 --
50 l_proc varchar2(72) := g_package||'update_dml';
51 --
52 Begin
53 hr_utility.set_location('Entering:'||l_proc, 5);
54 --
55 -- Increment the object version
56 --
57 p_rec.object_version_number := p_rec.object_version_number + 1;
58 --
59 -- Update the per_position_extra_info Row
60 --
61 update per_position_extra_info
62 set
63 position_extra_info_id = p_rec.position_extra_info_id,
64 request_id = p_rec.request_id,
65 program_application_id = p_rec.program_application_id,
66 program_id = p_rec.program_id,
67 program_update_date = p_rec.program_update_date,
68 poei_attribute_category = p_rec.poei_attribute_category,
69 poei_attribute1 = p_rec.poei_attribute1,
70 poei_attribute2 = p_rec.poei_attribute2,
71 poei_attribute3 = p_rec.poei_attribute3,
72 poei_attribute4 = p_rec.poei_attribute4,
73 poei_attribute5 = p_rec.poei_attribute5,
74 poei_attribute6 = p_rec.poei_attribute6,
75 poei_attribute7 = p_rec.poei_attribute7,
76 poei_attribute8 = p_rec.poei_attribute8,
77 poei_attribute9 = p_rec.poei_attribute9,
78 poei_attribute10 = p_rec.poei_attribute10,
79 poei_attribute11 = p_rec.poei_attribute11,
80 poei_attribute12 = p_rec.poei_attribute12,
81 poei_attribute13 = p_rec.poei_attribute13,
82 poei_attribute14 = p_rec.poei_attribute14,
83 poei_attribute15 = p_rec.poei_attribute15,
84 poei_attribute16 = p_rec.poei_attribute16,
85 poei_attribute17 = p_rec.poei_attribute17,
86 poei_attribute18 = p_rec.poei_attribute18,
87 poei_attribute19 = p_rec.poei_attribute19,
88 poei_attribute20 = p_rec.poei_attribute20,
89 poei_information_category = p_rec.poei_information_category,
90 poei_information1 = p_rec.poei_information1,
91 poei_information2 = p_rec.poei_information2,
92 poei_information3 = p_rec.poei_information3,
93 poei_information4 = p_rec.poei_information4,
94 poei_information5 = p_rec.poei_information5,
95 poei_information6 = p_rec.poei_information6,
96 poei_information7 = p_rec.poei_information7,
97 poei_information8 = p_rec.poei_information8,
98 poei_information9 = p_rec.poei_information9,
99 poei_information10 = p_rec.poei_information10,
100 poei_information11 = p_rec.poei_information11,
101 poei_information12 = p_rec.poei_information12,
102 poei_information13 = p_rec.poei_information13,
103 poei_information14 = p_rec.poei_information14,
104 poei_information15 = p_rec.poei_information15,
105 poei_information16 = p_rec.poei_information16,
106 poei_information17 = p_rec.poei_information17,
107 poei_information18 = p_rec.poei_information18,
108 poei_information19 = p_rec.poei_information19,
109 poei_information20 = p_rec.poei_information20,
110 poei_information21 = p_rec.poei_information21,
111 poei_information22 = p_rec.poei_information22,
112 poei_information23 = p_rec.poei_information23,
113 poei_information24 = p_rec.poei_information24,
114 poei_information25 = p_rec.poei_information25,
115 poei_information26 = p_rec.poei_information26,
116 poei_information27 = p_rec.poei_information27,
117 poei_information28 = p_rec.poei_information28,
118 poei_information29 = p_rec.poei_information29,
119 poei_information30 = p_rec.poei_information30,
120 object_version_number = p_rec.object_version_number
121 where position_extra_info_id = p_rec.position_extra_info_id;
122 --
123 hr_utility.set_location(' Leaving:'||l_proc, 10);
124 --
125 Exception
126 When hr_api.check_integrity_violated Then
127 -- A check constraint has been violated
128 pe_poi_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 pe_poi_shd.constraint_error
133 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
134 When hr_api.unique_integrity_violated Then
135 -- Unique integrity has been violated
136 pe_poi_shd.constraint_error
137 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
138 When Others Then
139 Raise;
140 End update_dml;
141 --
142 -- ----------------------------------------------------------------------------
143 -- |------------------------------< pre_update >------------------------------|
144 -- ----------------------------------------------------------------------------
145 -- {Start Of Comments}
146 --
147 -- Description:
148 -- This private procedure contains any processing which is required before
149 -- the update dml.
150 --
151 -- Pre Conditions:
152 -- This is an internal procedure which is called from the upd procedure.
153 --
154 -- In Parameters:
155 -- A Pl/Sql record structre.
156 --
157 -- Post Success:
158 -- Processing continues.
159 --
160 -- Post Failure:
161 -- If an error has occurred, an error message and exception will be raised
162 -- but not handled.
163 --
164 -- Developer Implementation Notes:
165 -- Any pre-processing required before the update dml is issued should be
166 -- coded within this procedure. It is important to note that any 3rd party
167 -- maintenance should be reviewed before placing in this procedure.
168 --
169 -- Access Status:
170 -- Internal Table Handler Use Only.
171 --
172 -- {End Of Comments}
173 -- ----------------------------------------------------------------------------
174 Procedure pre_update(p_rec in pe_poi_shd.g_rec_type) is
175 --
176 l_proc varchar2(72) := g_package||'pre_update';
177 --
178 Begin
179 hr_utility.set_location('Entering:'||l_proc, 5);
180 --
181 hr_utility.set_location(' Leaving:'||l_proc, 10);
182 End pre_update;
183 --
184 -- ----------------------------------------------------------------------------
185 -- |-----------------------------< post_update >------------------------------|
186 -- ----------------------------------------------------------------------------
187 -- {Start Of Comments}
188 --
189 -- Description:
190 -- This private procedure contains any processing which is required after the
191 -- update dml.
192 --
193 -- Pre Conditions:
194 -- This is an internal procedure which is called from the upd procedure.
195 --
196 -- In Parameters:
197 -- A Pl/Sql record structre.
198 --
199 -- Post Success:
200 -- Processing continues.
201 --
202 -- Post Failure:
203 -- If an error has occurred, an error message and exception will be raised
204 -- but not handled.
205 --
206 -- Developer Implementation Notes:
207 -- Any post-processing required after the update dml is issued should be
208 -- coded within this procedure. It is important to note that any 3rd party
209 -- maintenance should be reviewed before placing in this procedure.
210 --
211 -- Access Status:
212 -- Internal Table Handler Use Only.
213 --
214 -- {End Of Comments}
215 -- ----------------------------------------------------------------------------
216 Procedure post_update(p_rec in pe_poi_shd.g_rec_type) is
217 --
218 l_proc varchar2(72) := g_package||'post_update';
219 --
220 Begin
221 hr_utility.set_location('Entering:'||l_proc, 5);
222 --
223 -- This is a hook point and the user hook for post_update is called here.
224 --
225 begin
226 pe_poi_rku.after_update (
227 p_position_extra_info_id => p_rec.position_extra_info_id ,
228 p_position_id => p_rec.position_id ,
229 p_information_type => p_rec.information_type ,
230 p_request_id => p_rec.request_id ,
231 p_program_application_id => p_rec.program_application_id ,
232 p_program_id => p_rec.program_id ,
233 p_program_update_date => p_rec.program_update_date ,
234 p_poei_attribute_category => p_rec.poei_attribute_category ,
235 p_poei_attribute1 => p_rec.poei_attribute1 ,
236 p_poei_attribute2 => p_rec.poei_attribute2 ,
237 p_poei_attribute3 => p_rec.poei_attribute3 ,
238 p_poei_attribute4 => p_rec.poei_attribute4 ,
239 p_poei_attribute5 => p_rec.poei_attribute5 ,
240 p_poei_attribute6 => p_rec.poei_attribute6 ,
241 p_poei_attribute7 => p_rec.poei_attribute7 ,
242 p_poei_attribute8 => p_rec.poei_attribute8 ,
243 p_poei_attribute9 => p_rec.poei_attribute9 ,
244 p_poei_attribute10 => p_rec.poei_attribute10 ,
245 p_poei_attribute11 => p_rec.poei_attribute11 ,
246 p_poei_attribute12 => p_rec.poei_attribute12 ,
247 p_poei_attribute13 => p_rec.poei_attribute13 ,
248 p_poei_attribute14 => p_rec.poei_attribute14 ,
249 p_poei_attribute15 => p_rec.poei_attribute15 ,
250 p_poei_attribute16 => p_rec.poei_attribute16 ,
251 p_poei_attribute17 => p_rec.poei_attribute17 ,
252 p_poei_attribute18 => p_rec.poei_attribute18 ,
253 p_poei_attribute19 => p_rec.poei_attribute19 ,
254 p_poei_attribute20 => p_rec.poei_attribute20 ,
255 p_poei_information_category => p_rec.poei_information_category ,
256 p_poei_information1 => p_rec.poei_information1 ,
257 p_poei_information2 => p_rec.poei_information2 ,
258 p_poei_information3 => p_rec.poei_information3 ,
259 p_poei_information4 => p_rec.poei_information4 ,
260 p_poei_information5 => p_rec.poei_information5 ,
261 p_poei_information6 => p_rec.poei_information6 ,
262 p_poei_information7 => p_rec.poei_information7 ,
263 p_poei_information8 => p_rec.poei_information8 ,
264 p_poei_information9 => p_rec.poei_information9 ,
265 p_poei_information10 => p_rec.poei_information10 ,
266 p_poei_information11 => p_rec.poei_information11 ,
267 p_poei_information12 => p_rec.poei_information12 ,
268 p_poei_information13 => p_rec.poei_information13 ,
269 p_poei_information14 => p_rec.poei_information14 ,
270 p_poei_information15 => p_rec.poei_information15 ,
271 p_poei_information16 => p_rec.poei_information16 ,
272 p_poei_information17 => p_rec.poei_information17 ,
273 p_poei_information18 => p_rec.poei_information18 ,
274 p_poei_information19 => p_rec.poei_information19 ,
275 p_poei_information20 => p_rec.poei_information20 ,
276 p_poei_information21 => p_rec.poei_information21 ,
277 p_poei_information22 => p_rec.poei_information22 ,
278 p_poei_information23 => p_rec.poei_information23 ,
279 p_poei_information24 => p_rec.poei_information24 ,
280 p_poei_information25 => p_rec.poei_information25 ,
281 p_poei_information26 => p_rec.poei_information26 ,
282 p_poei_information27 => p_rec.poei_information27 ,
283 p_poei_information28 => p_rec.poei_information28 ,
284 p_poei_information29 => p_rec.poei_information29 ,
285 p_poei_information30 => p_rec.poei_information30 ,
286 p_position_id_o => pe_poi_shd.g_old_rec.position_id ,
287 p_information_type_o => pe_poi_shd.g_old_rec.information_type ,
288 p_request_id_o => pe_poi_shd.g_old_rec.request_id ,
289 p_program_application_id_o => pe_poi_shd.g_old_rec.program_application_id ,
290 p_program_id_o => pe_poi_shd.g_old_rec.program_id ,
291 p_program_update_date_o => pe_poi_shd.g_old_rec.program_update_date ,
292 p_poei_attribute_category_o => pe_poi_shd.g_old_rec.poei_attribute_category ,
293 p_poei_attribute1_o => pe_poi_shd.g_old_rec.poei_attribute1 ,
294 p_poei_attribute2_o => pe_poi_shd.g_old_rec.poei_attribute2 ,
295 p_poei_attribute3_o => pe_poi_shd.g_old_rec.poei_attribute3 ,
296 p_poei_attribute4_o => pe_poi_shd.g_old_rec.poei_attribute4 ,
297 p_poei_attribute5_o => pe_poi_shd.g_old_rec.poei_attribute5 ,
298 p_poei_attribute6_o => pe_poi_shd.g_old_rec.poei_attribute6 ,
299 p_poei_attribute7_o => pe_poi_shd.g_old_rec.poei_attribute7 ,
300 p_poei_attribute8_o => pe_poi_shd.g_old_rec.poei_attribute8 ,
301 p_poei_attribute9_o => pe_poi_shd.g_old_rec.poei_attribute9 ,
302 p_poei_attribute10_o => pe_poi_shd.g_old_rec.poei_attribute10 ,
303 p_poei_attribute11_o => pe_poi_shd.g_old_rec.poei_attribute11 ,
304 p_poei_attribute12_o => pe_poi_shd.g_old_rec.poei_attribute12 ,
305 p_poei_attribute13_o => pe_poi_shd.g_old_rec.poei_attribute13 ,
306 p_poei_attribute14_o => pe_poi_shd.g_old_rec.poei_attribute14 ,
307 p_poei_attribute15_o => pe_poi_shd.g_old_rec.poei_attribute15 ,
308 p_poei_attribute16_o => pe_poi_shd.g_old_rec.poei_attribute16 ,
309 p_poei_attribute17_o => pe_poi_shd.g_old_rec.poei_attribute17 ,
310 p_poei_attribute18_o => pe_poi_shd.g_old_rec.poei_attribute18 ,
311 p_poei_attribute19_o => pe_poi_shd.g_old_rec.poei_attribute19 ,
312 p_poei_attribute20_o => pe_poi_shd.g_old_rec.poei_attribute20 ,
313 p_poei_information_category_o => pe_poi_shd.g_old_rec.poei_information_category ,
314 p_poei_information1_o => pe_poi_shd.g_old_rec.poei_information1 ,
315 p_poei_information2_o => pe_poi_shd.g_old_rec.poei_information2 ,
316 p_poei_information3_o => pe_poi_shd.g_old_rec.poei_information3 ,
317 p_poei_information4_o => pe_poi_shd.g_old_rec.poei_information4 ,
318 p_poei_information5_o => pe_poi_shd.g_old_rec.poei_information5 ,
319 p_poei_information6_o => pe_poi_shd.g_old_rec.poei_information6 ,
320 p_poei_information7_o => pe_poi_shd.g_old_rec.poei_information7 ,
321 p_poei_information8_o => pe_poi_shd.g_old_rec.poei_information8 ,
322 p_poei_information9_o => pe_poi_shd.g_old_rec.poei_information9 ,
323 p_poei_information10_o => pe_poi_shd.g_old_rec.poei_information10 ,
324 p_poei_information11_o => pe_poi_shd.g_old_rec.poei_information11 ,
325 p_poei_information12_o => pe_poi_shd.g_old_rec.poei_information12 ,
326 p_poei_information13_o => pe_poi_shd.g_old_rec.poei_information13 ,
327 p_poei_information14_o => pe_poi_shd.g_old_rec.poei_information14 ,
328 p_poei_information15_o => pe_poi_shd.g_old_rec.poei_information15 ,
329 p_poei_information16_o => pe_poi_shd.g_old_rec.poei_information16 ,
330 p_poei_information17_o => pe_poi_shd.g_old_rec.poei_information17 ,
331 p_poei_information18_o => pe_poi_shd.g_old_rec.poei_information18 ,
332 p_poei_information19_o => pe_poi_shd.g_old_rec.poei_information19 ,
333 p_poei_information20_o => pe_poi_shd.g_old_rec.poei_information20 ,
334 p_poei_information21_o => pe_poi_shd.g_old_rec.poei_information21 ,
335 p_poei_information22_o => pe_poi_shd.g_old_rec.poei_information22 ,
336 p_poei_information23_o => pe_poi_shd.g_old_rec.poei_information23 ,
337 p_poei_information24_o => pe_poi_shd.g_old_rec.poei_information24 ,
338 p_poei_information25_o => pe_poi_shd.g_old_rec.poei_information25 ,
339 p_poei_information26_o => pe_poi_shd.g_old_rec.poei_information26 ,
340 p_poei_information27_o => pe_poi_shd.g_old_rec.poei_information27 ,
341 p_poei_information28_o => pe_poi_shd.g_old_rec.poei_information28 ,
342 p_poei_information29_o => pe_poi_shd.g_old_rec.poei_information29 ,
343 p_poei_information30_o => pe_poi_shd.g_old_rec.poei_information30
344 );
345 exception
346 when hr_api.cannot_find_prog_unit then
347 hr_api.cannot_find_prog_unit_error
348 ( p_module_name => 'PER_POSITION_EXTRA_INFO'
349 ,p_hook_type => 'AU'
350 );
351 end;
352 -- End of API User Hook for post_update.
353 --
354 hr_utility.set_location(' Leaving:'||l_proc, 10);
355 End post_update;
356 --
357 -- ----------------------------------------------------------------------------
358 -- |-----------------------------< convert_defs >-----------------------------|
359 -- ----------------------------------------------------------------------------
360 -- {Start Of Comments}
361 --
362 -- Description:
363 -- The Convert_Defs procedure has one very important function:
364 -- It must return the record structure for the row with all system defaulted
365 -- values converted into its corresponding parameter value for update. When
366 -- we attempt to update a row through the Upd process , certain
367 -- parameters can be defaulted which enables flexibility in the calling of
368 -- the upd process (e.g. only attributes which need to be updated need to be
369 -- specified). For the upd process to determine which attributes
370 -- have NOT been specified we need to check if the parameter has a reserved
371 -- system default value. Therefore, for all parameters which have a
372 -- corresponding reserved system default mechanism specified we need to
373 -- check if a system default is being used. If a system default is being
374 -- used then we convert the defaulted value into its corresponding attribute
375 -- value held in the g_old_rec data structure.
376 --
377 -- Pre Conditions:
378 -- This private function can only be called from the upd process.
379 --
380 -- In Parameters:
381 -- A Pl/Sql record structre.
382 --
383 -- Post Success:
384 -- The record structure will be returned with all system defaulted parameter
385 -- values converted into its current row attribute value.
386 --
387 -- Post Failure:
388 -- No direct error handling is required within this function. Any possible
389 -- errors within this procedure will be a PL/SQL value error due to conversion
390
391 -- of datatypes or data lengths.
392 --
393 -- Developer Implementation Notes:
394 -- None.
395 --
396 -- Access Status:
397 -- Internal Table Handler Use Only.
398 --
399 -- {End Of Comments}
400 -- ----------------------------------------------------------------------------
401 Procedure convert_defs(p_rec in out nocopy pe_poi_shd.g_rec_type) is
402 --
403 l_proc varchar2(72) := g_package||'convert_defs';
404 --
405 Begin
406 --
407 hr_utility.set_location('Entering:'||l_proc, 5);
408 --
409 -- We must now examine each argument value in the
410 -- p_rec plsql record structure
411 -- to see if a system default is being used. If a system default
412 -- is being used then we must set to the 'current' argument value.
413 --
414 If (p_rec.position_id = hr_api.g_number) then
415 p_rec.position_id :=
416 pe_poi_shd.g_old_rec.position_id;
417 End If;
418 If (p_rec.information_type = hr_api.g_varchar2) then
419 p_rec.information_type :=
420 pe_poi_shd.g_old_rec.information_type;
421 End If;
422 If (p_rec.request_id = hr_api.g_number) then
423 p_rec.request_id :=
424 pe_poi_shd.g_old_rec.request_id;
425 End If;
426 If (p_rec.program_application_id = hr_api.g_number) then
427 p_rec.program_application_id :=
428 pe_poi_shd.g_old_rec.program_application_id;
429 End If;
430 If (p_rec.program_id = hr_api.g_number) then
431 p_rec.program_id :=
432 pe_poi_shd.g_old_rec.program_id;
433 End If;
434 If (p_rec.program_update_date = hr_api.g_date) then
435 p_rec.program_update_date :=
436 pe_poi_shd.g_old_rec.program_update_date;
437 End If;
438 If (p_rec.poei_attribute_category = hr_api.g_varchar2) then
439 p_rec.poei_attribute_category :=
440 pe_poi_shd.g_old_rec.poei_attribute_category;
441 End If;
442 If (p_rec.poei_attribute1 = hr_api.g_varchar2) then
443 p_rec.poei_attribute1 :=
444 pe_poi_shd.g_old_rec.poei_attribute1;
445 End If;
446 If (p_rec.poei_attribute2 = hr_api.g_varchar2) then
447 p_rec.poei_attribute2 :=
448 pe_poi_shd.g_old_rec.poei_attribute2;
449 End If;
450 If (p_rec.poei_attribute3 = hr_api.g_varchar2) then
451 p_rec.poei_attribute3 :=
452 pe_poi_shd.g_old_rec.poei_attribute3;
453 End If;
454 If (p_rec.poei_attribute4 = hr_api.g_varchar2) then
455 p_rec.poei_attribute4 :=
456 pe_poi_shd.g_old_rec.poei_attribute4;
457 End If;
458 If (p_rec.poei_attribute5 = hr_api.g_varchar2) then
459 p_rec.poei_attribute5 :=
460 pe_poi_shd.g_old_rec.poei_attribute5;
461 End If;
462 If (p_rec.poei_attribute6 = hr_api.g_varchar2) then
463 p_rec.poei_attribute6 :=
464 pe_poi_shd.g_old_rec.poei_attribute6;
465 End If;
466 If (p_rec.poei_attribute7 = hr_api.g_varchar2) then
467 p_rec.poei_attribute7 :=
468 pe_poi_shd.g_old_rec.poei_attribute7;
469 End If;
470 If (p_rec.poei_attribute8 = hr_api.g_varchar2) then
471 p_rec.poei_attribute8 :=
472 pe_poi_shd.g_old_rec.poei_attribute8;
473 End If;
474 If (p_rec.poei_attribute9 = hr_api.g_varchar2) then
475 p_rec.poei_attribute9 :=
476 pe_poi_shd.g_old_rec.poei_attribute9;
477 End If;
478 If (p_rec.poei_attribute10 = hr_api.g_varchar2) then
479 p_rec.poei_attribute10 :=
480 pe_poi_shd.g_old_rec.poei_attribute10;
481 End If;
482 If (p_rec.poei_attribute11 = hr_api.g_varchar2) then
483 p_rec.poei_attribute11 :=
484 pe_poi_shd.g_old_rec.poei_attribute11;
485 End If;
486 If (p_rec.poei_attribute12 = hr_api.g_varchar2) then
487 p_rec.poei_attribute12 :=
488 pe_poi_shd.g_old_rec.poei_attribute12;
489 End If;
490 If (p_rec.poei_attribute13 = hr_api.g_varchar2) then
491 p_rec.poei_attribute13 :=
492 pe_poi_shd.g_old_rec.poei_attribute13;
493 End If;
494 If (p_rec.poei_attribute14 = hr_api.g_varchar2) then
495 p_rec.poei_attribute14 :=
496 pe_poi_shd.g_old_rec.poei_attribute14;
497 End If;
498 If (p_rec.poei_attribute15 = hr_api.g_varchar2) then
499 p_rec.poei_attribute15 :=
500 pe_poi_shd.g_old_rec.poei_attribute15;
501 End If;
502 If (p_rec.poei_attribute16 = hr_api.g_varchar2) then
503 p_rec.poei_attribute16 :=
504 pe_poi_shd.g_old_rec.poei_attribute16;
505 End If;
506 If (p_rec.poei_attribute17 = hr_api.g_varchar2) then
507 p_rec.poei_attribute17 :=
508 pe_poi_shd.g_old_rec.poei_attribute17;
509 End If;
510 If (p_rec.poei_attribute18 = hr_api.g_varchar2) then
511 p_rec.poei_attribute18 :=
512 pe_poi_shd.g_old_rec.poei_attribute18;
513 End If;
514 If (p_rec.poei_attribute19 = hr_api.g_varchar2) then
515 p_rec.poei_attribute19 :=
516 pe_poi_shd.g_old_rec.poei_attribute19;
517 End If;
518 If (p_rec.poei_attribute20 = hr_api.g_varchar2) then
519 p_rec.poei_attribute20 :=
520 pe_poi_shd.g_old_rec.poei_attribute20;
521 End If;
522 If (p_rec.poei_information_category = hr_api.g_varchar2) then
523 p_rec.poei_information_category :=
524 pe_poi_shd.g_old_rec.poei_information_category;
525 End If;
526 If (p_rec.poei_information1 = hr_api.g_varchar2) then
527 p_rec.poei_information1 :=
528 pe_poi_shd.g_old_rec.poei_information1;
529 End If;
530 If (p_rec.poei_information2 = hr_api.g_varchar2) then
531 p_rec.poei_information2 :=
532 pe_poi_shd.g_old_rec.poei_information2;
533 End If;
534 If (p_rec.poei_information3 = hr_api.g_varchar2) then
535 p_rec.poei_information3 :=
536 pe_poi_shd.g_old_rec.poei_information3;
537 End If;
538 If (p_rec.poei_information4 = hr_api.g_varchar2) then
539 p_rec.poei_information4 :=
540 pe_poi_shd.g_old_rec.poei_information4;
541 End If;
542 If (p_rec.poei_information5 = hr_api.g_varchar2) then
543 p_rec.poei_information5 :=
544 pe_poi_shd.g_old_rec.poei_information5;
545 End If;
546 If (p_rec.poei_information6 = hr_api.g_varchar2) then
547 p_rec.poei_information6 :=
548 pe_poi_shd.g_old_rec.poei_information6;
549 End If;
550 If (p_rec.poei_information7 = hr_api.g_varchar2) then
551 p_rec.poei_information7 :=
552 pe_poi_shd.g_old_rec.poei_information7;
553 End If;
554 If (p_rec.poei_information8 = hr_api.g_varchar2) then
555 p_rec.poei_information8 :=
556 pe_poi_shd.g_old_rec.poei_information8;
557 End If;
558 If (p_rec.poei_information9 = hr_api.g_varchar2) then
559 p_rec.poei_information9 :=
560 pe_poi_shd.g_old_rec.poei_information9;
561 End If;
562 If (p_rec.poei_information10 = hr_api.g_varchar2) then
563 p_rec.poei_information10 :=
564 pe_poi_shd.g_old_rec.poei_information10;
565 End If;
566 If (p_rec.poei_information11 = hr_api.g_varchar2) then
567 p_rec.poei_information11 :=
568 pe_poi_shd.g_old_rec.poei_information11;
569 End If;
570 If (p_rec.poei_information12 = hr_api.g_varchar2) then
571 p_rec.poei_information12 :=
572 pe_poi_shd.g_old_rec.poei_information12;
573 End If;
574 If (p_rec.poei_information13 = hr_api.g_varchar2) then
575 p_rec.poei_information13 :=
576 pe_poi_shd.g_old_rec.poei_information13;
577 End If;
578 If (p_rec.poei_information14 = hr_api.g_varchar2) then
579 p_rec.poei_information14 :=
580 pe_poi_shd.g_old_rec.poei_information14;
581 End If;
582 If (p_rec.poei_information15 = hr_api.g_varchar2) then
583 p_rec.poei_information15 :=
584 pe_poi_shd.g_old_rec.poei_information15;
585 End If;
586 If (p_rec.poei_information16 = hr_api.g_varchar2) then
587 p_rec.poei_information16 :=
588 pe_poi_shd.g_old_rec.poei_information16;
589 End If;
590 If (p_rec.poei_information17 = hr_api.g_varchar2) then
591 p_rec.poei_information17 :=
592 pe_poi_shd.g_old_rec.poei_information17;
593 End If;
594 If (p_rec.poei_information18 = hr_api.g_varchar2) then
595 p_rec.poei_information18 :=
596 pe_poi_shd.g_old_rec.poei_information18;
597 End If;
598 If (p_rec.poei_information19 = hr_api.g_varchar2) then
599 p_rec.poei_information19 :=
600 pe_poi_shd.g_old_rec.poei_information19;
601 End If;
602 If (p_rec.poei_information20 = hr_api.g_varchar2) then
603 p_rec.poei_information20 :=
604 pe_poi_shd.g_old_rec.poei_information20;
605 End If;
606 If (p_rec.poei_information21 = hr_api.g_varchar2) then
607 p_rec.poei_information21 :=
608 pe_poi_shd.g_old_rec.poei_information21;
609 End If;
610 If (p_rec.poei_information22 = hr_api.g_varchar2) then
611 p_rec.poei_information22 :=
612 pe_poi_shd.g_old_rec.poei_information22;
613 End If;
614 If (p_rec.poei_information23 = hr_api.g_varchar2) then
615 p_rec.poei_information23 :=
616 pe_poi_shd.g_old_rec.poei_information23;
617 End If;
618 If (p_rec.poei_information24 = hr_api.g_varchar2) then
619 p_rec.poei_information24 :=
620 pe_poi_shd.g_old_rec.poei_information24;
621 End If;
622 If (p_rec.poei_information25 = hr_api.g_varchar2) then
623 p_rec.poei_information25 :=
624 pe_poi_shd.g_old_rec.poei_information25;
625 End If;
626 If (p_rec.poei_information26 = hr_api.g_varchar2) then
627 p_rec.poei_information26 :=
628 pe_poi_shd.g_old_rec.poei_information26;
629 End If;
630 If (p_rec.poei_information27 = hr_api.g_varchar2) then
631 p_rec.poei_information27 :=
632 pe_poi_shd.g_old_rec.poei_information27;
633 End If;
634 If (p_rec.poei_information28 = hr_api.g_varchar2) then
635 p_rec.poei_information28 :=
636 pe_poi_shd.g_old_rec.poei_information28;
637 End If;
638 If (p_rec.poei_information29 = hr_api.g_varchar2) then
639 p_rec.poei_information29 :=
640 pe_poi_shd.g_old_rec.poei_information29;
641 End If;
642 If (p_rec.poei_information30 = hr_api.g_varchar2) then
643 p_rec.poei_information30 :=
644 pe_poi_shd.g_old_rec.poei_information30;
645 End If;
646
647 --
648 hr_utility.set_location(' Leaving:'||l_proc, 10);
649 --
650 End convert_defs;
651 --
652 -- ----------------------------------------------------------------------------
653 -- |---------------------------------< upd >----------------------------------|
654 -- ----------------------------------------------------------------------------
655 Procedure upd
656 (
657 p_rec in out nocopy pe_poi_shd.g_rec_type,
658 p_validate in boolean default false
659 ) is
660 --
661 l_proc varchar2(72) := g_package||'upd';
662 --
663 Begin
664 hr_utility.set_location('Entering:'||l_proc, 5);
665 --
666 -- Determine if the business process is to be validated.
667 --
668 If p_validate then
669 --
670 -- Issue the savepoint.
671 --
672 SAVEPOINT upd_pe_poi;
673 End If;
674 --
675 -- We must lock the row which we need to update.
676 --
677 pe_poi_shd.lck
678 (
679 p_rec.position_extra_info_id,
680 p_rec.object_version_number
681 );
682 --
683 -- 1. During an update system defaults are used to determine if
684 -- arguments have been defaulted or not. We must therefore
685 -- derive the full record structure values to be updated.
686 --
687 -- 2. Call the supporting update validate operations.
688 --
689 convert_defs(p_rec);
690 pe_poi_bus.update_validate(p_rec);
691 --
692 -- Call the supporting pre-update operation
693 --
694 pre_update(p_rec);
695 --
696 -- Update the row.
697 --
698 update_dml(p_rec);
699 --
700 -- Call the supporting post-update operation
701 --
702 post_update(p_rec);
703 --
704 -- If we are validating then raise the Validate_Enabled exception
705 --
706 If p_validate then
707 Raise HR_Api.Validate_Enabled;
708 End If;
709 --
710 hr_utility.set_location(' Leaving:'||l_proc, 10);
711 Exception
712 When HR_Api.Validate_Enabled Then
713 --
714 -- As the Validate_Enabled exception has been raised
715 -- we must rollback to the savepoint
716 --
717 ROLLBACK TO upd_pe_poi;
718 End upd;
719 --
720 -- ----------------------------------------------------------------------------
721 -- |---------------------------------< upd >----------------------------------|
722 -- ----------------------------------------------------------------------------
723 Procedure upd
724 (
725 p_position_extra_info_id in number,
726 p_request_id in number default hr_api.g_number,
727 p_program_application_id in number default hr_api.g_number,
728 p_program_id in number default hr_api.g_number,
729 p_program_update_date in date default hr_api.g_date,
730 p_poei_attribute_category in varchar2 default hr_api.g_varchar2,
731 p_poei_attribute1 in varchar2 default hr_api.g_varchar2,
732 p_poei_attribute2 in varchar2 default hr_api.g_varchar2,
733 p_poei_attribute3 in varchar2 default hr_api.g_varchar2,
734 p_poei_attribute4 in varchar2 default hr_api.g_varchar2,
735 p_poei_attribute5 in varchar2 default hr_api.g_varchar2,
736 p_poei_attribute6 in varchar2 default hr_api.g_varchar2,
737 p_poei_attribute7 in varchar2 default hr_api.g_varchar2,
738 p_poei_attribute8 in varchar2 default hr_api.g_varchar2,
739 p_poei_attribute9 in varchar2 default hr_api.g_varchar2,
740 p_poei_attribute10 in varchar2 default hr_api.g_varchar2,
741 p_poei_attribute11 in varchar2 default hr_api.g_varchar2,
742 p_poei_attribute12 in varchar2 default hr_api.g_varchar2,
743 p_poei_attribute13 in varchar2 default hr_api.g_varchar2,
744 p_poei_attribute14 in varchar2 default hr_api.g_varchar2,
745 p_poei_attribute15 in varchar2 default hr_api.g_varchar2,
746 p_poei_attribute16 in varchar2 default hr_api.g_varchar2,
747 p_poei_attribute17 in varchar2 default hr_api.g_varchar2,
748 p_poei_attribute18 in varchar2 default hr_api.g_varchar2,
749 p_poei_attribute19 in varchar2 default hr_api.g_varchar2,
750 p_poei_attribute20 in varchar2 default hr_api.g_varchar2,
751 p_poei_information_category in varchar2 default hr_api.g_varchar2,
752 p_poei_information1 in varchar2 default hr_api.g_varchar2,
753 p_poei_information2 in varchar2 default hr_api.g_varchar2,
754 p_poei_information3 in varchar2 default hr_api.g_varchar2,
755 p_poei_information4 in varchar2 default hr_api.g_varchar2,
756 p_poei_information5 in varchar2 default hr_api.g_varchar2,
757 p_poei_information6 in varchar2 default hr_api.g_varchar2,
758 p_poei_information7 in varchar2 default hr_api.g_varchar2,
759 p_poei_information8 in varchar2 default hr_api.g_varchar2,
760 p_poei_information9 in varchar2 default hr_api.g_varchar2,
761 p_poei_information10 in varchar2 default hr_api.g_varchar2,
762 p_poei_information11 in varchar2 default hr_api.g_varchar2,
763 p_poei_information12 in varchar2 default hr_api.g_varchar2,
764 p_poei_information13 in varchar2 default hr_api.g_varchar2,
765 p_poei_information14 in varchar2 default hr_api.g_varchar2,
766 p_poei_information15 in varchar2 default hr_api.g_varchar2,
767 p_poei_information16 in varchar2 default hr_api.g_varchar2,
768 p_poei_information17 in varchar2 default hr_api.g_varchar2,
769 p_poei_information18 in varchar2 default hr_api.g_varchar2,
770 p_poei_information19 in varchar2 default hr_api.g_varchar2,
771 p_poei_information20 in varchar2 default hr_api.g_varchar2,
772 p_poei_information21 in varchar2 default hr_api.g_varchar2,
773 p_poei_information22 in varchar2 default hr_api.g_varchar2,
774 p_poei_information23 in varchar2 default hr_api.g_varchar2,
775 p_poei_information24 in varchar2 default hr_api.g_varchar2,
776 p_poei_information25 in varchar2 default hr_api.g_varchar2,
777 p_poei_information26 in varchar2 default hr_api.g_varchar2,
778 p_poei_information27 in varchar2 default hr_api.g_varchar2,
779 p_poei_information28 in varchar2 default hr_api.g_varchar2,
780 p_poei_information29 in varchar2 default hr_api.g_varchar2,
781 p_poei_information30 in varchar2 default hr_api.g_varchar2,
782 p_object_version_number in out nocopy number,
783 p_validate in boolean default false
784 ) is
785 --
786 l_rec pe_poi_shd.g_rec_type;
787 l_proc varchar2(72) := g_package||'upd';
788 --
789 Begin
790 hr_utility.set_location('Entering:'||l_proc, 5);
791 --
792 -- Call conversion function to turn arguments into the
793 -- l_rec structure.
794 --
795 l_rec :=
796 pe_poi_shd.convert_args
797 (
798 p_position_extra_info_id,
799 hr_api.g_number, -- p_position_id,
800 hr_api.g_varchar2, -- p_information_type,
801 p_request_id,
802 p_program_application_id,
803 p_program_id,
804 p_program_update_date,
805 p_poei_attribute_category,
806 p_poei_attribute1,
807 p_poei_attribute2,
808 p_poei_attribute3,
809 p_poei_attribute4,
810 p_poei_attribute5,
811 p_poei_attribute6,
812 p_poei_attribute7,
813 p_poei_attribute8,
814 p_poei_attribute9,
815 p_poei_attribute10,
816 p_poei_attribute11,
817 p_poei_attribute12,
818 p_poei_attribute13,
819 p_poei_attribute14,
820 p_poei_attribute15,
821 p_poei_attribute16,
822 p_poei_attribute17,
823 p_poei_attribute18,
824 p_poei_attribute19,
825 p_poei_attribute20,
826 p_poei_information_category,
827 p_poei_information1,
828 p_poei_information2,
829 p_poei_information3,
830 p_poei_information4,
831 p_poei_information5,
832 p_poei_information6,
833 p_poei_information7,
834 p_poei_information8,
835 p_poei_information9,
836 p_poei_information10,
837 p_poei_information11,
838 p_poei_information12,
839 p_poei_information13,
840 p_poei_information14,
841 p_poei_information15,
842 p_poei_information16,
843 p_poei_information17,
844 p_poei_information18,
845 p_poei_information19,
846 p_poei_information20,
847 p_poei_information21,
848 p_poei_information22,
849 p_poei_information23,
850 p_poei_information24,
851 p_poei_information25,
852 p_poei_information26,
853 p_poei_information27,
854 p_poei_information28,
855 p_poei_information29,
856 p_poei_information30,
857 p_object_version_number
858 );
859 --
860 -- Having converted the arguments into the
861 -- plsql record structure we call the corresponding record
862 -- business process.
863 --
864 upd(l_rec, p_validate);
865 p_object_version_number := l_rec.object_version_number;
866 --
867 hr_utility.set_location(' Leaving:'||l_proc, 10);
868 End upd;
869 --
870 end pe_poi_upd;