[Home] [Help]
PACKAGE BODY: APPS.PE_JEI_UPD
Source
1 Package Body pe_jei_upd as
2 /* $Header: pejeirhi.pkb 115.8 2002/12/06 10:38:05 pkakar ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' pe_jei_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_jei_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 --
60 -- Update the per_job_extra_info Row
61 --
62 update per_job_extra_info
63 set
64 job_extra_info_id = p_rec.job_extra_info_id,
65 request_id = p_rec.request_id,
66 program_application_id = p_rec.program_application_id,
67 program_id = p_rec.program_id,
68 program_update_date = p_rec.program_update_date,
69 jei_attribute_category = p_rec.jei_attribute_category,
70 jei_attribute1 = p_rec.jei_attribute1,
71 jei_attribute2 = p_rec.jei_attribute2,
72 jei_attribute3 = p_rec.jei_attribute3,
73 jei_attribute4 = p_rec.jei_attribute4,
74 jei_attribute5 = p_rec.jei_attribute5,
75 jei_attribute6 = p_rec.jei_attribute6,
76 jei_attribute7 = p_rec.jei_attribute7,
77 jei_attribute8 = p_rec.jei_attribute8,
78 jei_attribute9 = p_rec.jei_attribute9,
79 jei_attribute10 = p_rec.jei_attribute10,
80 jei_attribute11 = p_rec.jei_attribute11,
81 jei_attribute12 = p_rec.jei_attribute12,
82 jei_attribute13 = p_rec.jei_attribute13,
83 jei_attribute14 = p_rec.jei_attribute14,
84 jei_attribute15 = p_rec.jei_attribute15,
85 jei_attribute16 = p_rec.jei_attribute16,
86 jei_attribute17 = p_rec.jei_attribute17,
87 jei_attribute18 = p_rec.jei_attribute18,
88 jei_attribute19 = p_rec.jei_attribute19,
89 jei_attribute20 = p_rec.jei_attribute20,
90 jei_information_category = p_rec.jei_information_category,
91 jei_information1 = p_rec.jei_information1,
92 jei_information2 = p_rec.jei_information2,
93 jei_information3 = p_rec.jei_information3,
94 jei_information4 = p_rec.jei_information4,
95 jei_information5 = p_rec.jei_information5,
96 jei_information6 = p_rec.jei_information6,
97 jei_information7 = p_rec.jei_information7,
98 jei_information8 = p_rec.jei_information8,
99 jei_information9 = p_rec.jei_information9,
100 jei_information10 = p_rec.jei_information10,
101 jei_information11 = p_rec.jei_information11,
102 jei_information12 = p_rec.jei_information12,
103 jei_information13 = p_rec.jei_information13,
104 jei_information14 = p_rec.jei_information14,
105 jei_information15 = p_rec.jei_information15,
106 jei_information16 = p_rec.jei_information16,
107 jei_information17 = p_rec.jei_information17,
108 jei_information18 = p_rec.jei_information18,
109 jei_information19 = p_rec.jei_information19,
110 jei_information20 = p_rec.jei_information20,
111 jei_information21 = p_rec.jei_information21,
112 jei_information22 = p_rec.jei_information22,
113 jei_information23 = p_rec.jei_information23,
114 jei_information24 = p_rec.jei_information24,
115 jei_information25 = p_rec.jei_information25,
116 jei_information26 = p_rec.jei_information26,
117 jei_information27 = p_rec.jei_information27,
118 jei_information28 = p_rec.jei_information28,
119 jei_information29 = p_rec.jei_information29,
120 jei_information30 = p_rec.jei_information30,
121 object_version_number = p_rec.object_version_number
122 where job_extra_info_id = p_rec.job_extra_info_id;
123 --
124 --
125 hr_utility.set_location(' Leaving:'||l_proc, 10);
126 --
127 Exception
128 When hr_api.check_integrity_violated Then
129 -- A check constraint has been violated
130 pe_jei_shd.constraint_error
131 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
132 When hr_api.parent_integrity_violated Then
133 -- Parent integrity has been violated
134 pe_jei_shd.constraint_error
135 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
136 When hr_api.unique_integrity_violated Then
137 -- Unique integrity has been violated
138 pe_jei_shd.constraint_error
139 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
140 When Others Then
141 Raise;
142 End update_dml;
143 --
144 -- ----------------------------------------------------------------------------
145 -- |------------------------------< pre_update >------------------------------|
146 -- ----------------------------------------------------------------------------
147 -- {Start Of Comments}
148 --
149 -- Description:
150 -- This private procedure contains any processing which is required before
151 -- the update dml.
152 --
153 -- Pre Conditions:
154 -- This is an internal procedure which is called from the upd procedure.
155 --
156 -- In Parameters:
157 -- A Pl/Sql record structre.
158 --
159 -- Post Success:
160 -- Processing continues.
161 --
162 -- Post Failure:
163 -- If an error has occurred, an error message and exception will be raised
164 -- but not handled.
165 --
166 -- Developer Implementation Notes:
167 -- Any pre-processing required before the update dml is issued should be
168 -- coded within this procedure. It is important to note that any 3rd party
169 -- maintenance should be reviewed before placing in this procedure.
170 --
171 -- Access Status:
172 -- Internal Table Handler Use Only.
173 --
174 -- {End Of Comments}
175 -- ----------------------------------------------------------------------------
176 Procedure pre_update(p_rec in pe_jei_shd.g_rec_type) is
177 --
178 l_proc varchar2(72) := g_package||'pre_update';
179 --
180 Begin
181 hr_utility.set_location('Entering:'||l_proc, 5);
182 --
183 hr_utility.set_location(' Leaving:'||l_proc, 10);
184 End pre_update;
185 --
186 -- ----------------------------------------------------------------------------
187 -- |-----------------------------< post_update >------------------------------|
188 -- ----------------------------------------------------------------------------
189 -- {Start Of Comments}
190 --
191 -- Description:
192 -- This private procedure contains any processing which is required after the
193 -- update dml.
194 --
195 -- Pre Conditions:
196 -- This is an internal procedure which is called from the upd procedure.
197 --
198 -- In Parameters:
199 -- A Pl/Sql record structre.
200 --
201 -- Post Success:
202 -- Processing continues.
203 --
204 -- Post Failure:
205 -- If an error has occurred, an error message and exception will be raised
206 -- but not handled.
207 --
208 -- Developer Implementation Notes:
209 -- Any post-processing required after the update dml is issued should be
210 -- coded within this procedure. It is important to note that any 3rd party
211 -- maintenance should be reviewed before placing in this procedure.
212 --
213 -- Access Status:
214 -- Internal Table Handler Use Only.
215 --
216 -- {End Of Comments}
217 -- ----------------------------------------------------------------------------
218 Procedure post_update(p_rec in pe_jei_shd.g_rec_type) is
219 --
220 l_proc varchar2(72) := g_package||'post_update';
221 --
222 Begin
223 hr_utility.set_location('Entering:'||l_proc, 5);
224 --
225 -- This is a hook point and the user hook for post_update is called here.
226 --
227 begin
228 pe_jei_rku.after_update (
229 p_job_extra_info_id => p_rec.job_extra_info_id ,
230 p_information_type => p_rec.information_type ,
231 p_job_id => p_rec.job_id ,
232 p_request_id => p_rec.request_id ,
233 p_program_application_id => p_rec.program_application_id ,
234 p_program_id => p_rec.program_id ,
235 p_program_update_date => p_rec.program_update_date ,
236 p_jei_attribute_category => p_rec.jei_attribute_category ,
237 p_jei_attribute1 => p_rec.jei_attribute1 ,
238 p_jei_attribute2 => p_rec.jei_attribute2 ,
239 p_jei_attribute3 => p_rec.jei_attribute3 ,
240 p_jei_attribute4 => p_rec.jei_attribute4 ,
241 p_jei_attribute5 => p_rec.jei_attribute5 ,
242 p_jei_attribute6 => p_rec.jei_attribute6 ,
243 p_jei_attribute7 => p_rec.jei_attribute7 ,
244 p_jei_attribute8 => p_rec.jei_attribute8 ,
245 p_jei_attribute9 => p_rec.jei_attribute9 ,
246 p_jei_attribute10 => p_rec.jei_attribute10 ,
247 p_jei_attribute11 => p_rec.jei_attribute11 ,
248 p_jei_attribute12 => p_rec.jei_attribute12 ,
249 p_jei_attribute13 => p_rec.jei_attribute13 ,
250 p_jei_attribute14 => p_rec.jei_attribute14 ,
251 p_jei_attribute15 => p_rec.jei_attribute15 ,
252 p_jei_attribute16 => p_rec.jei_attribute16 ,
253 p_jei_attribute17 => p_rec.jei_attribute17 ,
254 p_jei_attribute18 => p_rec.jei_attribute18 ,
255 p_jei_attribute19 => p_rec.jei_attribute19 ,
256 p_jei_attribute20 => p_rec.jei_attribute20 ,
257 p_jei_information_category => p_rec.jei_information_category,
258 p_jei_information1 => p_rec.jei_information1 ,
259 p_jei_information2 => p_rec.jei_information2 ,
260 p_jei_information3 => p_rec.jei_information3 ,
261 p_jei_information4 => p_rec.jei_information4 ,
262 p_jei_information5 => p_rec.jei_information5 ,
263 p_jei_information6 => p_rec.jei_information6 ,
264 p_jei_information7 => p_rec.jei_information7 ,
265 p_jei_information8 => p_rec.jei_information8 ,
266 p_jei_information9 => p_rec.jei_information9 ,
267 p_jei_information10 => p_rec.jei_information10 ,
268 p_jei_information11 => p_rec.jei_information11 ,
269 p_jei_information12 => p_rec.jei_information12 ,
270 p_jei_information13 => p_rec.jei_information13 ,
271 p_jei_information14 => p_rec.jei_information14 ,
272 p_jei_information15 => p_rec.jei_information15 ,
273 p_jei_information16 => p_rec.jei_information16 ,
274 p_jei_information17 => p_rec.jei_information17 ,
275 p_jei_information18 => p_rec.jei_information18 ,
276 p_jei_information19 => p_rec.jei_information19 ,
277 p_jei_information20 => p_rec.jei_information20 ,
278 p_jei_information21 => p_rec.jei_information21 ,
279 p_jei_information22 => p_rec.jei_information22 ,
280 p_jei_information23 => p_rec.jei_information23 ,
281 p_jei_information24 => p_rec.jei_information24 ,
282 p_jei_information25 => p_rec.jei_information25 ,
283 p_jei_information26 => p_rec.jei_information26 ,
284 p_jei_information27 => p_rec.jei_information27 ,
285 p_jei_information28 => p_rec.jei_information28 ,
286 p_jei_information29 => p_rec.jei_information29 ,
287 p_jei_information30 => p_rec.jei_information30 ,
288 p_information_type_o => pe_jei_shd.g_old_rec.information_type ,
289 p_job_id_o => pe_jei_shd.g_old_rec.job_id ,
290 p_request_id_o => pe_jei_shd.g_old_rec.request_id ,
291 p_program_application_id_o => pe_jei_shd.g_old_rec.program_application_id ,
292 p_program_id_o => pe_jei_shd.g_old_rec.program_id ,
293 p_program_update_date_o => pe_jei_shd.g_old_rec.program_update_date ,
294 p_jei_attribute_category_o => pe_jei_shd.g_old_rec.jei_attribute_category ,
295 p_jei_attribute1_o => pe_jei_shd.g_old_rec.jei_attribute1 ,
296 p_jei_attribute2_o => pe_jei_shd.g_old_rec.jei_attribute2 ,
297 p_jei_attribute3_o => pe_jei_shd.g_old_rec.jei_attribute3 ,
298 p_jei_attribute4_o => pe_jei_shd.g_old_rec.jei_attribute4 ,
299 p_jei_attribute5_o => pe_jei_shd.g_old_rec.jei_attribute5 ,
300 p_jei_attribute6_o => pe_jei_shd.g_old_rec.jei_attribute6 ,
301 p_jei_attribute7_o => pe_jei_shd.g_old_rec.jei_attribute7 ,
302 p_jei_attribute8_o => pe_jei_shd.g_old_rec.jei_attribute8 ,
303 p_jei_attribute9_o => pe_jei_shd.g_old_rec.jei_attribute9 ,
304 p_jei_attribute10_o => pe_jei_shd.g_old_rec.jei_attribute10 ,
305 p_jei_attribute11_o => pe_jei_shd.g_old_rec.jei_attribute11 ,
306 p_jei_attribute12_o => pe_jei_shd.g_old_rec.jei_attribute12 ,
307 p_jei_attribute13_o => pe_jei_shd.g_old_rec.jei_attribute13 ,
308 p_jei_attribute14_o => pe_jei_shd.g_old_rec.jei_attribute14 ,
309 p_jei_attribute15_o => pe_jei_shd.g_old_rec.jei_attribute15 ,
310 p_jei_attribute16_o => pe_jei_shd.g_old_rec.jei_attribute16 ,
311 p_jei_attribute17_o => pe_jei_shd.g_old_rec.jei_attribute17 ,
312 p_jei_attribute18_o => pe_jei_shd.g_old_rec.jei_attribute18 ,
313 p_jei_attribute19_o => pe_jei_shd.g_old_rec.jei_attribute19 ,
314 p_jei_attribute20_o => pe_jei_shd.g_old_rec.jei_attribute20 ,
315 p_jei_information_category_o => pe_jei_shd.g_old_rec.jei_information_category ,
316 p_jei_information1_o => pe_jei_shd.g_old_rec.jei_information1 ,
317 p_jei_information2_o => pe_jei_shd.g_old_rec.jei_information2 ,
318 p_jei_information3_o => pe_jei_shd.g_old_rec.jei_information3 ,
319 p_jei_information4_o => pe_jei_shd.g_old_rec.jei_information4 ,
320 p_jei_information5_o => pe_jei_shd.g_old_rec.jei_information5 ,
321 p_jei_information6_o => pe_jei_shd.g_old_rec.jei_information6 ,
322 p_jei_information7_o => pe_jei_shd.g_old_rec.jei_information7 ,
323 p_jei_information8_o => pe_jei_shd.g_old_rec.jei_information8 ,
324 p_jei_information9_o => pe_jei_shd.g_old_rec.jei_information9 ,
325 p_jei_information10_o => pe_jei_shd.g_old_rec.jei_information10 ,
326 p_jei_information11_o => pe_jei_shd.g_old_rec.jei_information11 ,
327 p_jei_information12_o => pe_jei_shd.g_old_rec.jei_information12 ,
328 p_jei_information13_o => pe_jei_shd.g_old_rec.jei_information13 ,
329 p_jei_information14_o => pe_jei_shd.g_old_rec.jei_information14 ,
330 p_jei_information15_o => pe_jei_shd.g_old_rec.jei_information15 ,
331 p_jei_information16_o => pe_jei_shd.g_old_rec.jei_information16 ,
332 p_jei_information17_o => pe_jei_shd.g_old_rec.jei_information17 ,
333 p_jei_information18_o => pe_jei_shd.g_old_rec.jei_information18 ,
334 p_jei_information19_o => pe_jei_shd.g_old_rec.jei_information19 ,
335 p_jei_information20_o => pe_jei_shd.g_old_rec.jei_information20 ,
336 p_jei_information21_o => pe_jei_shd.g_old_rec.jei_information21 ,
337 p_jei_information22_o => pe_jei_shd.g_old_rec.jei_information22 ,
338 p_jei_information23_o => pe_jei_shd.g_old_rec.jei_information23 ,
339 p_jei_information24_o => pe_jei_shd.g_old_rec.jei_information24 ,
340 p_jei_information25_o => pe_jei_shd.g_old_rec.jei_information25 ,
341 p_jei_information26_o => pe_jei_shd.g_old_rec.jei_information26 ,
342 p_jei_information27_o => pe_jei_shd.g_old_rec.jei_information27 ,
343 p_jei_information28_o => pe_jei_shd.g_old_rec.jei_information28 ,
344 p_jei_information29_o => pe_jei_shd.g_old_rec.jei_information29 ,
345 p_jei_information30_o => pe_jei_shd.g_old_rec.jei_information30
346 );
347 exception
348 when hr_api.cannot_find_prog_unit then
349 hr_api.cannot_find_prog_unit_error
350 ( p_module_name => 'PER_JOB_EXTRA_INFO'
351 ,p_hook_type => 'AU'
352 );
353 end;
354 -- End of API User Hook for post_update.
355 hr_utility.set_location(' Leaving:'||l_proc, 10);
356 End post_update;
357 --
358 -- ----------------------------------------------------------------------------
359 -- |-----------------------------< convert_defs >-----------------------------|
360 -- ----------------------------------------------------------------------------
361 -- {Start Of Comments}
362 --
363 -- Description:
364 -- The Convert_Defs procedure has one very important function:
365 -- It must return the record structure for the row with all system defaulted
366 -- values converted into its corresponding parameter value for update. When
367 -- we attempt to update a row through the Upd process , certain
368 -- parameters can be defaulted which enables flexibility in the calling of
369 -- the upd process (e.g. only attributes which need to be updated need to be
370 -- specified). For the upd process to determine which attributes
371 -- have NOT been specified we need to check if the parameter has a reserved
372 -- system default value. Therefore, for all parameters which have a
373 -- corresponding reserved system default mechanism specified we need to
374 -- check if a system default is being used. If a system default is being
375 -- used then we convert the defaulted value into its corresponding attribute
376 -- value held in the g_old_rec data structure.
377 --
378 -- Pre Conditions:
379 -- This private function can only be called from the upd process.
380 --
381 -- In Parameters:
382 -- A Pl/Sql record structre.
383 --
384 -- Post Success:
385 -- The record structure will be returned with all system defaulted parameter
386 -- values converted into its current row attribute value.
387 --
388 -- Post Failure:
389 -- No direct error handling is required within this function. Any possible
390 -- errors within this procedure will be a PL/SQL value error due to conversion
391
392 -- of datatypes or data lengths.
393 --
394 -- Developer Implementation Notes:
395 -- None.
396 --
397 -- Access Status:
398 -- Internal Table Handler Use Only.
399 --
400 -- {End Of Comments}
401 -- ----------------------------------------------------------------------------
402 Procedure convert_defs(p_rec in out nocopy pe_jei_shd.g_rec_type) is
403 --
404 l_proc varchar2(72) := g_package||'convert_defs';
405 --
406 Begin
407 --
408 hr_utility.set_location('Entering:'||l_proc, 5);
409 --
410 -- We must now examine each argument value in the
411 -- p_rec plsql record structure
412 -- to see if a system default is being used. If a system default
413 -- is being used then we must set to the 'current' argument value.
414 --
415 If (p_rec.information_type = hr_api.g_varchar2) then
416 p_rec.information_type :=
417 pe_jei_shd.g_old_rec.information_type;
418 End If;
419 If (p_rec.job_id = hr_api.g_number) then
420 p_rec.job_id :=
421 pe_jei_shd.g_old_rec.job_id;
422 End If;
423 If (p_rec.request_id = hr_api.g_number) then
424 p_rec.request_id :=
425 pe_jei_shd.g_old_rec.request_id;
426 End If;
427 If (p_rec.program_application_id = hr_api.g_number) then
428 p_rec.program_application_id :=
429 pe_jei_shd.g_old_rec.program_application_id;
430 End If;
431 If (p_rec.program_id = hr_api.g_number) then
432 p_rec.program_id :=
433 pe_jei_shd.g_old_rec.program_id;
434 End If;
435 If (p_rec.program_update_date = hr_api.g_date) then
436 p_rec.program_update_date :=
437 pe_jei_shd.g_old_rec.program_update_date;
438 End If;
439 If (p_rec.jei_attribute_category = hr_api.g_varchar2) then
440 p_rec.jei_attribute_category :=
441 pe_jei_shd.g_old_rec.jei_attribute_category;
442 End If;
443 If (p_rec.jei_attribute1 = hr_api.g_varchar2) then
444 p_rec.jei_attribute1 :=
445 pe_jei_shd.g_old_rec.jei_attribute1;
446 End If;
447 If (p_rec.jei_attribute2 = hr_api.g_varchar2) then
448 p_rec.jei_attribute2 :=
449 pe_jei_shd.g_old_rec.jei_attribute2;
450 End If;
451 If (p_rec.jei_attribute3 = hr_api.g_varchar2) then
452 p_rec.jei_attribute3 :=
453 pe_jei_shd.g_old_rec.jei_attribute3;
454 End If;
455 If (p_rec.jei_attribute4 = hr_api.g_varchar2) then
456 p_rec.jei_attribute4 :=
457 pe_jei_shd.g_old_rec.jei_attribute4;
458 End If;
459 If (p_rec.jei_attribute5 = hr_api.g_varchar2) then
460 p_rec.jei_attribute5 :=
461 pe_jei_shd.g_old_rec.jei_attribute5;
462 End If;
463 If (p_rec.jei_attribute6 = hr_api.g_varchar2) then
464 p_rec.jei_attribute6 :=
465 pe_jei_shd.g_old_rec.jei_attribute6;
466 End If;
467 If (p_rec.jei_attribute7 = hr_api.g_varchar2) then
468 p_rec.jei_attribute7 :=
469 pe_jei_shd.g_old_rec.jei_attribute7;
470 End If;
471 If (p_rec.jei_attribute8 = hr_api.g_varchar2) then
472 p_rec.jei_attribute8 :=
473 pe_jei_shd.g_old_rec.jei_attribute8;
474 End If;
475 If (p_rec.jei_attribute9 = hr_api.g_varchar2) then
476 p_rec.jei_attribute9 :=
477 pe_jei_shd.g_old_rec.jei_attribute9;
478 End If;
479 If (p_rec.jei_attribute10 = hr_api.g_varchar2) then
480 p_rec.jei_attribute10 :=
481 pe_jei_shd.g_old_rec.jei_attribute10;
482 End If;
483 If (p_rec.jei_attribute11 = hr_api.g_varchar2) then
484 p_rec.jei_attribute11 :=
485 pe_jei_shd.g_old_rec.jei_attribute11;
486 End If;
487 If (p_rec.jei_attribute12 = hr_api.g_varchar2) then
488 p_rec.jei_attribute12 :=
489 pe_jei_shd.g_old_rec.jei_attribute12;
490 End If;
491 If (p_rec.jei_attribute13 = hr_api.g_varchar2) then
492 p_rec.jei_attribute13 :=
493 pe_jei_shd.g_old_rec.jei_attribute13;
494 End If;
495 If (p_rec.jei_attribute14 = hr_api.g_varchar2) then
496 p_rec.jei_attribute14 :=
497 pe_jei_shd.g_old_rec.jei_attribute14;
498 End If;
499 If (p_rec.jei_attribute15 = hr_api.g_varchar2) then
500 p_rec.jei_attribute15 :=
501 pe_jei_shd.g_old_rec.jei_attribute15;
502 End If;
503 If (p_rec.jei_attribute16 = hr_api.g_varchar2) then
504 p_rec.jei_attribute16 :=
505 pe_jei_shd.g_old_rec.jei_attribute16;
506 End If;
507 If (p_rec.jei_attribute17 = hr_api.g_varchar2) then
508 p_rec.jei_attribute17 :=
509 pe_jei_shd.g_old_rec.jei_attribute17;
510 End If;
511 If (p_rec.jei_attribute18 = hr_api.g_varchar2) then
512 p_rec.jei_attribute18 :=
513 pe_jei_shd.g_old_rec.jei_attribute18;
514 End If;
515 If (p_rec.jei_attribute19 = hr_api.g_varchar2) then
516 p_rec.jei_attribute19 :=
517 pe_jei_shd.g_old_rec.jei_attribute19;
518 End If;
519 If (p_rec.jei_attribute20 = hr_api.g_varchar2) then
520 p_rec.jei_attribute20 :=
521 pe_jei_shd.g_old_rec.jei_attribute20;
522 End If;
523 If (p_rec.jei_information_category = hr_api.g_varchar2) then
524 p_rec.jei_information_category :=
525 pe_jei_shd.g_old_rec.jei_information_category;
526 End If;
527 If (p_rec.jei_information1 = hr_api.g_varchar2) then
528 p_rec.jei_information1 :=
529 pe_jei_shd.g_old_rec.jei_information1;
530 End If;
531 If (p_rec.jei_information2 = hr_api.g_varchar2) then
532 p_rec.jei_information2 :=
533 pe_jei_shd.g_old_rec.jei_information2;
534 End If;
535 If (p_rec.jei_information3 = hr_api.g_varchar2) then
536 p_rec.jei_information3 :=
537 pe_jei_shd.g_old_rec.jei_information3;
538 End If;
539 If (p_rec.jei_information4 = hr_api.g_varchar2) then
540 p_rec.jei_information4 :=
541 pe_jei_shd.g_old_rec.jei_information4;
542 End If;
543 If (p_rec.jei_information5 = hr_api.g_varchar2) then
544 p_rec.jei_information5 :=
545 pe_jei_shd.g_old_rec.jei_information5;
546 End If;
547 If (p_rec.jei_information6 = hr_api.g_varchar2) then
548 p_rec.jei_information6 :=
549 pe_jei_shd.g_old_rec.jei_information6;
550 End If;
551 If (p_rec.jei_information7 = hr_api.g_varchar2) then
552 p_rec.jei_information7 :=
553 pe_jei_shd.g_old_rec.jei_information7;
554 End If;
555 If (p_rec.jei_information8 = hr_api.g_varchar2) then
556 p_rec.jei_information8 :=
557 pe_jei_shd.g_old_rec.jei_information8;
558 End If;
559 If (p_rec.jei_information9 = hr_api.g_varchar2) then
560 p_rec.jei_information9 :=
561 pe_jei_shd.g_old_rec.jei_information9;
562 End If;
563 If (p_rec.jei_information10 = hr_api.g_varchar2) then
564 p_rec.jei_information10 :=
565 pe_jei_shd.g_old_rec.jei_information10;
566 End If;
567 If (p_rec.jei_information11 = hr_api.g_varchar2) then
568 p_rec.jei_information11 :=
569 pe_jei_shd.g_old_rec.jei_information11;
570 End If;
571 If (p_rec.jei_information12 = hr_api.g_varchar2) then
572 p_rec.jei_information12 :=
573 pe_jei_shd.g_old_rec.jei_information12;
574 End If;
575 If (p_rec.jei_information13 = hr_api.g_varchar2) then
576 p_rec.jei_information13 :=
577 pe_jei_shd.g_old_rec.jei_information13;
578 End If;
579 If (p_rec.jei_information14 = hr_api.g_varchar2) then
580 p_rec.jei_information14 :=
581 pe_jei_shd.g_old_rec.jei_information14;
582 End If;
583 If (p_rec.jei_information15 = hr_api.g_varchar2) then
584 p_rec.jei_information15 :=
585 pe_jei_shd.g_old_rec.jei_information15;
586 End If;
587 If (p_rec.jei_information16 = hr_api.g_varchar2) then
588 p_rec.jei_information16 :=
589 pe_jei_shd.g_old_rec.jei_information16;
590 End If;
591 If (p_rec.jei_information17 = hr_api.g_varchar2) then
592 p_rec.jei_information17 :=
593 pe_jei_shd.g_old_rec.jei_information17;
594 End If;
595 If (p_rec.jei_information18 = hr_api.g_varchar2) then
596 p_rec.jei_information18 :=
597 pe_jei_shd.g_old_rec.jei_information18;
598 End If;
599 If (p_rec.jei_information19 = hr_api.g_varchar2) then
600 p_rec.jei_information19 :=
601 pe_jei_shd.g_old_rec.jei_information19;
602 End If;
603 If (p_rec.jei_information20 = hr_api.g_varchar2) then
604 p_rec.jei_information20 :=
605 pe_jei_shd.g_old_rec.jei_information20;
606 End If;
607 If (p_rec.jei_information21 = hr_api.g_varchar2) then
608 p_rec.jei_information21 :=
609 pe_jei_shd.g_old_rec.jei_information21;
610 End If;
611 If (p_rec.jei_information22 = hr_api.g_varchar2) then
612 p_rec.jei_information22 :=
613 pe_jei_shd.g_old_rec.jei_information22;
614 End If;
615 If (p_rec.jei_information23 = hr_api.g_varchar2) then
616 p_rec.jei_information23 :=
617 pe_jei_shd.g_old_rec.jei_information23;
618 End If;
619 If (p_rec.jei_information24 = hr_api.g_varchar2) then
620 p_rec.jei_information24 :=
621 pe_jei_shd.g_old_rec.jei_information24;
622 End If;
623 If (p_rec.jei_information25 = hr_api.g_varchar2) then
624 p_rec.jei_information25 :=
625 pe_jei_shd.g_old_rec.jei_information25;
626 End If;
627 If (p_rec.jei_information26 = hr_api.g_varchar2) then
628 p_rec.jei_information26 :=
629 pe_jei_shd.g_old_rec.jei_information26;
630 End If;
631 If (p_rec.jei_information27 = hr_api.g_varchar2) then
632 p_rec.jei_information27 :=
633 pe_jei_shd.g_old_rec.jei_information27;
634 End If;
635 If (p_rec.jei_information28 = hr_api.g_varchar2) then
636 p_rec.jei_information28 :=
637 pe_jei_shd.g_old_rec.jei_information28;
638 End If;
639 If (p_rec.jei_information29 = hr_api.g_varchar2) then
640 p_rec.jei_information29 :=
641 pe_jei_shd.g_old_rec.jei_information29;
642 End If;
643 If (p_rec.jei_information30 = hr_api.g_varchar2) then
644 p_rec.jei_information30 :=
645 pe_jei_shd.g_old_rec.jei_information30;
646 End If;
647
648 --
649 hr_utility.set_location(' Leaving:'||l_proc, 10);
650 --
651 End convert_defs;
652 --
653 -- ----------------------------------------------------------------------------
654 -- |---------------------------------< upd >----------------------------------|
655 -- ----------------------------------------------------------------------------
656 Procedure upd
657 (
658 p_rec in out nocopy pe_jei_shd.g_rec_type,
659 p_validate in boolean default false
660 ) is
661 --
662 l_proc varchar2(72) := g_package||'upd';
663 --
664 Begin
665 hr_utility.set_location('Entering:'||l_proc, 5);
666 --
667 -- Determine if the business process is to be validated.
668 --
669 If p_validate then
670 --
671 -- Issue the savepoint.
672 --
673 SAVEPOINT upd_pe_jei;
674 End If;
675 --
676 -- We must lock the row which we need to update.
677 --
678 pe_jei_shd.lck
679 (
680 p_rec.job_extra_info_id,
681 p_rec.object_version_number
682 );
683 --
684 -- 1. During an update system defaults are used to determine if
685 -- arguments have been defaulted or not. We must therefore
686 -- derive the full record structure values to be updated.
687 --
688 -- 2. Call the supporting update validate operations.
689 --
690 convert_defs(p_rec);
691 pe_jei_bus.update_validate(p_rec);
692 --
693 -- Call the supporting pre-update operation
694 --
695 pre_update(p_rec);
696 --
697 -- Update the row.
698 --
699 update_dml(p_rec);
700 --
701 -- Call the supporting post-update operation
702 --
703 post_update(p_rec);
704 --
705 -- If we are validating then raise the Validate_Enabled exception
706 --
707 If p_validate then
708 Raise HR_Api.Validate_Enabled;
709 End If;
710 --
711 hr_utility.set_location(' Leaving:'||l_proc, 10);
712 Exception
713 When HR_Api.Validate_Enabled Then
714 --
715 -- As the Validate_Enabled exception has been raised
716 -- we must rollback to the savepoint
717 --
718 ROLLBACK TO upd_pe_jei;
719 End upd;
720 --
721 -- ----------------------------------------------------------------------------
722 -- |---------------------------------< upd >----------------------------------|
723 -- ----------------------------------------------------------------------------
724 Procedure upd
725 (
726 p_job_extra_info_id in number,
727 p_request_id in number default hr_api.g_number,
728 p_program_application_id in number default hr_api.g_number,
729 p_program_id in number default hr_api.g_number,
730 p_program_update_date in date default hr_api.g_date,
731 p_jei_attribute_category in varchar2 default hr_api.g_varchar2,
732 p_jei_attribute1 in varchar2 default hr_api.g_varchar2,
733 p_jei_attribute2 in varchar2 default hr_api.g_varchar2,
734 p_jei_attribute3 in varchar2 default hr_api.g_varchar2,
735 p_jei_attribute4 in varchar2 default hr_api.g_varchar2,
736 p_jei_attribute5 in varchar2 default hr_api.g_varchar2,
737 p_jei_attribute6 in varchar2 default hr_api.g_varchar2,
738 p_jei_attribute7 in varchar2 default hr_api.g_varchar2,
739 p_jei_attribute8 in varchar2 default hr_api.g_varchar2,
740 p_jei_attribute9 in varchar2 default hr_api.g_varchar2,
741 p_jei_attribute10 in varchar2 default hr_api.g_varchar2,
742 p_jei_attribute11 in varchar2 default hr_api.g_varchar2,
743 p_jei_attribute12 in varchar2 default hr_api.g_varchar2,
744 p_jei_attribute13 in varchar2 default hr_api.g_varchar2,
745 p_jei_attribute14 in varchar2 default hr_api.g_varchar2,
746 p_jei_attribute15 in varchar2 default hr_api.g_varchar2,
747 p_jei_attribute16 in varchar2 default hr_api.g_varchar2,
748 p_jei_attribute17 in varchar2 default hr_api.g_varchar2,
749 p_jei_attribute18 in varchar2 default hr_api.g_varchar2,
750 p_jei_attribute19 in varchar2 default hr_api.g_varchar2,
751 p_jei_attribute20 in varchar2 default hr_api.g_varchar2,
752 p_jei_information_category in varchar2 default hr_api.g_varchar2,
753 p_jei_information1 in varchar2 default hr_api.g_varchar2,
754 p_jei_information2 in varchar2 default hr_api.g_varchar2,
755 p_jei_information3 in varchar2 default hr_api.g_varchar2,
756 p_jei_information4 in varchar2 default hr_api.g_varchar2,
757 p_jei_information5 in varchar2 default hr_api.g_varchar2,
758 p_jei_information6 in varchar2 default hr_api.g_varchar2,
759 p_jei_information7 in varchar2 default hr_api.g_varchar2,
760 p_jei_information8 in varchar2 default hr_api.g_varchar2,
761 p_jei_information9 in varchar2 default hr_api.g_varchar2,
762 p_jei_information10 in varchar2 default hr_api.g_varchar2,
763 p_jei_information11 in varchar2 default hr_api.g_varchar2,
764 p_jei_information12 in varchar2 default hr_api.g_varchar2,
765 p_jei_information13 in varchar2 default hr_api.g_varchar2,
766 p_jei_information14 in varchar2 default hr_api.g_varchar2,
767 p_jei_information15 in varchar2 default hr_api.g_varchar2,
768 p_jei_information16 in varchar2 default hr_api.g_varchar2,
769 p_jei_information17 in varchar2 default hr_api.g_varchar2,
770 p_jei_information18 in varchar2 default hr_api.g_varchar2,
771 p_jei_information19 in varchar2 default hr_api.g_varchar2,
772 p_jei_information20 in varchar2 default hr_api.g_varchar2,
773 p_jei_information21 in varchar2 default hr_api.g_varchar2,
774 p_jei_information22 in varchar2 default hr_api.g_varchar2,
775 p_jei_information23 in varchar2 default hr_api.g_varchar2,
776 p_jei_information24 in varchar2 default hr_api.g_varchar2,
777 p_jei_information25 in varchar2 default hr_api.g_varchar2,
778 p_jei_information26 in varchar2 default hr_api.g_varchar2,
779 p_jei_information27 in varchar2 default hr_api.g_varchar2,
780 p_jei_information28 in varchar2 default hr_api.g_varchar2,
781 p_jei_information29 in varchar2 default hr_api.g_varchar2,
782 p_jei_information30 in varchar2 default hr_api.g_varchar2,
783 p_object_version_number in out nocopy number,
784 p_validate in boolean default false
785 ) is
786 --
787 l_rec pe_jei_shd.g_rec_type;
788 l_proc varchar2(72) := g_package||'upd';
789 --
790 Begin
791 hr_utility.set_location('Entering:'||l_proc, 5);
792 --
793 -- Call conversion function to turn arguments into the
794 -- l_rec structure.
795 --
796 l_rec :=
797 pe_jei_shd.convert_args
798 (
799 p_job_extra_info_id,
800 hr_api.g_varchar2, --p_information_type,
801 hr_api.g_number, --p_job_id,
802 p_request_id,
803 p_program_application_id,
804 p_program_id,
805 p_program_update_date,
806 p_jei_attribute_category,
807 p_jei_attribute1,
808 p_jei_attribute2,
809 p_jei_attribute3,
810 p_jei_attribute4,
811 p_jei_attribute5,
812 p_jei_attribute6,
813 p_jei_attribute7,
814 p_jei_attribute8,
815 p_jei_attribute9,
816 p_jei_attribute10,
817 p_jei_attribute11,
818 p_jei_attribute12,
819 p_jei_attribute13,
820 p_jei_attribute14,
821 p_jei_attribute15,
822 p_jei_attribute16,
823 p_jei_attribute17,
824 p_jei_attribute18,
825 p_jei_attribute19,
826 p_jei_attribute20,
827 p_jei_information_category,
828 p_jei_information1,
829 p_jei_information2,
830 p_jei_information3,
831 p_jei_information4,
832 p_jei_information5,
833 p_jei_information6,
834 p_jei_information7,
835 p_jei_information8,
836 p_jei_information9,
837 p_jei_information10,
838 p_jei_information11,
839 p_jei_information12,
840 p_jei_information13,
841 p_jei_information14,
842 p_jei_information15,
843 p_jei_information16,
844 p_jei_information17,
845 p_jei_information18,
846 p_jei_information19,
847 p_jei_information20,
848 p_jei_information21,
849 p_jei_information22,
850 p_jei_information23,
851 p_jei_information24,
852 p_jei_information25,
853 p_jei_information26,
854 p_jei_information27,
855 p_jei_information28,
856 p_jei_information29,
857 p_jei_information30,
858 p_object_version_number
859 );
860 --
861 -- Having converted the arguments into the
862 -- plsql record structure we call the corresponding record
863 -- business process.
864 --
865 upd(l_rec, p_validate);
866 p_object_version_number := l_rec.object_version_number;
867 --
868 hr_utility.set_location(' Leaving:'||l_proc, 10);
869 End upd;
870 --
871 end pe_jei_upd;