[Home] [Help]
PACKAGE BODY: APPS.PER_QUA_UPD
Source
1 Package Body per_qua_upd as
2 /* $Header: pequarhi.pkb 120.0.12010000.2 2008/08/06 09:31:13 ubhat ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' per_qua_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 -- Pre Conditions:
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 Table Handler Use Only.
51 --
52 -- {End Of Comments}
53 -- ----------------------------------------------------------------------------
54 Procedure update_dml(p_rec in out nocopy per_qua_shd.g_rec_type) is
55 --
56 l_proc varchar2(72) := g_package||'update_dml';
57 --
58 Begin
59 hr_utility.set_location('Entering:'||l_proc, 5);
60 --
61 -- Increment the object version
62 --
63 p_rec.object_version_number := p_rec.object_version_number + 1;
64 --
65 per_qua_shd.g_api_dml := true; -- Set the api dml status
66 --
67 -- Update the per_qualifications Row
68 --
69 update per_qualifications
70 set
71 qualification_id = p_rec.qualification_id,
72 business_group_id = p_rec.business_group_id,
73 object_version_number = p_rec.object_version_number,
74 person_id = p_rec.person_id,
75 title = p_rec.title,
76 grade_attained = p_rec.grade_attained,
77 status = p_rec.status,
78 awarded_date = p_rec.awarded_date,
79 fee = p_rec.fee,
80 fee_currency = p_rec.fee_currency,
81 training_completed_amount = p_rec.training_completed_amount,
82 reimbursement_arrangements = p_rec.reimbursement_arrangements,
83 training_completed_units = p_rec.training_completed_units,
84 total_training_amount = p_rec.total_training_amount,
85 start_date = p_rec.start_date,
86 end_date = p_rec.end_date,
87 license_number = p_rec.license_number,
88 expiry_date = p_rec.expiry_date,
89 license_restrictions = p_rec.license_restrictions,
90 projected_completion_date = p_rec.projected_completion_date,
91 awarding_body = p_rec.awarding_body,
92 tuition_method = p_rec.tuition_method,
93 group_ranking = p_rec.group_ranking,
94 comments = p_rec.comments,
95 qualification_type_id = p_rec.qualification_type_id,
96 attendance_id = p_rec.attendance_id,
97 attribute_category = p_rec.attribute_category,
98 attribute1 = p_rec.attribute1,
99 attribute2 = p_rec.attribute2,
100 attribute3 = p_rec.attribute3,
101 attribute4 = p_rec.attribute4,
102 attribute5 = p_rec.attribute5,
103 attribute6 = p_rec.attribute6,
104 attribute7 = p_rec.attribute7,
105 attribute8 = p_rec.attribute8,
106 attribute9 = p_rec.attribute9,
107 attribute10 = p_rec.attribute10,
108 attribute11 = p_rec.attribute11,
109 attribute12 = p_rec.attribute12,
110 attribute13 = p_rec.attribute13,
111 attribute14 = p_rec.attribute14,
112 attribute15 = p_rec.attribute15,
113 attribute16 = p_rec.attribute16,
114 attribute17 = p_rec.attribute17,
115 attribute18 = p_rec.attribute18,
116 attribute19 = p_rec.attribute19,
117 attribute20 = p_rec.attribute20,
118 qua_information_category = p_rec.qua_information_category,
119 qua_information1 = p_rec.qua_information1,
120 qua_information2 = p_rec.qua_information2,
121 qua_information3 = p_rec.qua_information3,
122 qua_information4 = p_rec.qua_information4,
123 qua_information5 = p_rec.qua_information5,
124 qua_information6 = p_rec.qua_information6,
125 qua_information7 = p_rec.qua_information7,
126 qua_information8 = p_rec.qua_information8,
127 qua_information9 = p_rec.qua_information9,
128 qua_information10 = p_rec.qua_information10,
129 qua_information11 = p_rec.qua_information11,
130 qua_information12 = p_rec.qua_information12,
131 qua_information13 = p_rec.qua_information13,
132 qua_information14 = p_rec.qua_information14,
133 qua_information15 = p_rec.qua_information15,
134 qua_information16 = p_rec.qua_information16,
135 qua_information17 = p_rec.qua_information17,
136 qua_information18 = p_rec.qua_information18,
137 qua_information19 = p_rec.qua_information19,
138 qua_information20 = p_rec.qua_information20,
139 professional_body_name = p_rec.professional_body_name,
140 membership_number = p_rec.membership_number,
141 membership_category = p_rec.membership_category,
142 subscription_payment_method = p_rec.subscription_payment_method,
143 party_id = p_rec.party_id
144 where qualification_id = p_rec.qualification_id;
145 --
146 per_qua_shd.g_api_dml := false; -- Unset the api dml status
147 --
148 hr_utility.set_location(' Leaving:'||l_proc, 10);
149 --
150 Exception
151 When hr_api.check_integrity_violated Then
152 -- A check constraint has been violated
153 per_qua_shd.g_api_dml := false; -- Unset the api dml status
154 per_qua_shd.constraint_error
155 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
156 When hr_api.parent_integrity_violated Then
157 -- Parent integrity has been violated
158 per_qua_shd.g_api_dml := false; -- Unset the api dml status
159 per_qua_shd.constraint_error
160 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
161 When hr_api.unique_integrity_violated Then
162 -- Unique integrity has been violated
163 per_qua_shd.g_api_dml := false; -- Unset the api dml status
164 per_qua_shd.constraint_error
165 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
166 When Others Then
167 per_qua_shd.g_api_dml := false; -- Unset the api dml status
168 Raise;
169 End update_dml;
170 --
171 -- ----------------------------------------------------------------------------
172 -- |------------------------------< pre_update >------------------------------|
173 -- ----------------------------------------------------------------------------
174 -- {Start Of Comments}
175 --
176 -- Description:
177 -- This private procedure contains any processing which is required before
178 -- the update dml.
179 --
180 -- Pre Conditions:
181 -- This is an internal procedure which is called from the upd procedure.
182 --
183 -- In Parameters:
184 -- A Pl/Sql record structre.
185 --
186 -- Post Success:
187 -- Processing continues.
188 --
189 -- Post Failure:
190 -- If an error has occurred, an error message and exception will be raised
191 -- but not handled.
192 --
193 -- Developer Implementation Notes:
194 -- Any pre-processing required before the update dml is issued should be
195 -- coded within this procedure. It is important to note that any 3rd party
196 -- maintenance should be reviewed before placing in this procedure.
197 --
198 -- Access Status:
199 -- Internal Table Handler Use Only.
200 --
201 -- {End Of Comments}
202 -- ----------------------------------------------------------------------------
203 Procedure pre_update(p_rec in per_qua_shd.g_rec_type) is
204 --
205 l_proc varchar2(72) := g_package||'pre_update';
206 --
207 Begin
208 hr_utility.set_location('Entering:'||l_proc, 5);
209 --
210 hr_utility.set_location(' Leaving:'||l_proc, 10);
211 End pre_update;
212 --
213 -- ----------------------------------------------------------------------------
214 -- |-----------------------------< post_update >------------------------------|
215 -- ----------------------------------------------------------------------------
216 -- {Start Of Comments}
217 --
218 -- Description:
219 -- This private procedure contains any processing which is required after the
220 -- update dml.
221 --
222 -- Pre Conditions:
223 -- This is an internal procedure which is called from the upd procedure.
224 --
225 -- In Parameters:
226 -- A Pl/Sql record structre.
227 --
228 -- Post Success:
229 -- Processing continues.
230 --
231 -- Post Failure:
232 -- If an error has occurred, an error message and exception will be raised
233 -- but not handled.
234 --
235 -- Developer Implementation Notes:
236 -- Any post-processing required after the update dml is issued should be
237 -- coded within this procedure. It is important to note that any 3rd party
238 -- maintenance should be reviewed before placing in this procedure.
239 --
240 -- Access Status:
241 -- Internal Table Handler Use Only.
242 --
243 -- {End Of Comments}
244 -- ----------------------------------------------------------------------------
245 Procedure post_update(p_rec in per_qua_shd.g_rec_type,
246 p_effective_date in date) is
247 --
248 l_proc varchar2(72) := g_package||'post_update';
249 --
250 Begin
251 hr_utility.set_location('Entering:'||l_proc, 5);
252 --
253 -- Start of Row Handler User Hook for post_update.
254 --
255 Begin
256 per_qua_rku.after_update
257 (
258 p_qualification_id => p_rec.qualification_id,
259 p_business_group_id => p_rec.business_group_id,
260 p_object_version_number => p_rec.object_version_number,
261 p_person_id => p_rec.person_id,
262 p_title => p_rec.title,
263 p_grade_attained => p_rec.grade_attained,
264 p_status => p_rec.status,
265 p_awarded_date => p_rec.awarded_date,
266 p_fee => p_rec.fee,
267 p_fee_currency => p_rec.fee_currency,
268 p_training_completed_amount => p_rec.training_completed_amount,
269 p_reimbursement_arrangements => p_rec.reimbursement_arrangements,
270 p_training_completed_units => p_rec.training_completed_units,
271 p_total_training_amount => p_rec.total_training_amount,
272 p_start_date => p_rec.start_date,
273 p_end_date => p_rec.end_date,
274 p_license_number => p_rec.license_number,
275 p_expiry_date => p_rec.expiry_date,
276 p_license_restrictions => p_rec.license_restrictions,
277 p_projected_completion_date => p_rec.projected_completion_date,
278 p_awarding_body => p_rec.awarding_body,
279 p_tuition_method => p_rec.tuition_method,
280 p_group_ranking => p_rec.group_ranking,
281 p_comments => p_rec.comments,
282 p_qualification_type_id => p_rec.qualification_type_id,
283 p_attendance_id => p_rec.attendance_id,
284 p_attribute_category => p_rec.attribute_category,
285 p_attribute1 => p_rec.attribute1,
286 p_attribute2 => p_rec.attribute2,
287 p_attribute3 => p_rec.attribute3,
288 p_attribute4 => p_rec.attribute4,
289 p_attribute5 => p_rec.attribute5,
290 p_attribute6 => p_rec.attribute6,
291 p_attribute7 => p_rec.attribute7,
292 p_attribute8 => p_rec.attribute8,
293 p_attribute9 => p_rec.attribute9,
294 p_attribute10 => p_rec.attribute10,
295 p_attribute11 => p_rec.attribute11,
296 p_attribute12 => p_rec.attribute12,
297 p_attribute13 => p_rec.attribute13,
298 p_attribute14 => p_rec.attribute14,
299 p_attribute15 => p_rec.attribute15,
300 p_attribute16 => p_rec.attribute16,
301 p_attribute17 => p_rec.attribute17,
302 p_attribute18 => p_rec.attribute18,
303 p_attribute19 => p_rec.attribute19,
304 p_attribute20 => p_rec.attribute20,
305 p_qua_information_category => p_rec.qua_information_category,
306 p_qua_information1 => p_rec.qua_information1,
307 p_qua_information2 => p_rec.qua_information2,
308 p_qua_information3 => p_rec.qua_information3,
309 p_qua_information4 => p_rec.qua_information4,
310 p_qua_information5 => p_rec.qua_information5,
311 p_qua_information6 => p_rec.qua_information6,
312 p_qua_information7 => p_rec.qua_information7,
313 p_qua_information8 => p_rec.qua_information8,
314 p_qua_information9 => p_rec.qua_information9,
315 p_qua_information10 => p_rec.qua_information10,
316 p_qua_information11 => p_rec.qua_information11,
317 p_qua_information12 => p_rec.qua_information12,
318 p_qua_information13 => p_rec.qua_information13,
319 p_qua_information14 => p_rec.qua_information14,
320 p_qua_information15 => p_rec.qua_information15,
321 p_qua_information16 => p_rec.qua_information16,
322 p_qua_information17 => p_rec.qua_information17,
323 p_qua_information18 => p_rec.qua_information18,
324 p_qua_information19 => p_rec.qua_information19,
325 p_qua_information20 => p_rec.qua_information20,
326 p_professional_body_name => p_rec.professional_body_name,
327 p_membership_number => p_rec.membership_number,
328 p_membership_category => p_rec.membership_category,
329 p_subscription_payment_method => p_rec.subscription_payment_method,
330 p_party_id => p_rec.party_id,
331 p_effective_date => p_effective_date,
332 p_business_group_id_o => per_qua_shd.g_old_rec.business_group_id,
333 p_person_id_o => per_qua_shd.g_old_rec.person_id,
334 p_object_version_number_o => per_qua_shd.g_old_rec.object_version_number,
335 p_title_o => per_qua_shd.g_old_rec.title,
336 p_grade_attained_o => per_qua_shd.g_old_rec.grade_attained,
337 p_status_o => per_qua_shd.g_old_rec.status,
338 p_awarded_date_o => per_qua_shd.g_old_rec.awarded_date,
339 p_fee_o => per_qua_shd.g_old_rec.fee,
340 p_fee_currency_o => per_qua_shd.g_old_rec.fee_currency,
341 p_training_completed_amount_o => per_qua_shd.g_old_rec.training_completed_amount,
342 p_reimbursement_arrangements_o => per_qua_shd.g_old_rec.reimbursement_arrangements,
343 p_training_completed_units_o => per_qua_shd.g_old_rec.training_completed_units,
344 p_total_training_amount_o => per_qua_shd.g_old_rec.total_training_amount,
345 p_start_date_o => per_qua_shd.g_old_rec.start_date,
346 p_end_date_o => per_qua_shd.g_old_rec.end_date,
347 p_license_number_o => per_qua_shd.g_old_rec.license_number,
348 p_expiry_date_o => per_qua_shd.g_old_rec.expiry_date,
349 p_license_restrictions_o => per_qua_shd.g_old_rec.license_restrictions,
350 p_projected_completion_date_o => per_qua_shd.g_old_rec.projected_completion_date,
351 p_awarding_body_o => per_qua_shd.g_old_rec.awarding_body,
352 p_tuition_method_o => per_qua_shd.g_old_rec.tuition_method,
353 p_group_ranking_o => per_qua_shd.g_old_rec.group_ranking,
354 p_comments_o => per_qua_shd.g_old_rec.comments,
355 p_qualification_type_id_o => per_qua_shd.g_old_rec.qualification_type_id,
356 p_attendance_id_o => per_qua_shd.g_old_rec.attendance_id,
357 p_attribute_category_o => per_qua_shd.g_old_rec.attribute_category,
358 p_attribute1_o => per_qua_shd.g_old_rec.attribute1,
359 p_attribute2_o => per_qua_shd.g_old_rec.attribute2,
360 p_attribute3_o => per_qua_shd.g_old_rec.attribute3,
361 p_attribute4_o => per_qua_shd.g_old_rec.attribute4,
362 p_attribute5_o => per_qua_shd.g_old_rec.attribute5,
363 p_attribute6_o => per_qua_shd.g_old_rec.attribute6,
364 p_attribute7_o => per_qua_shd.g_old_rec.attribute7,
365 p_attribute8_o => per_qua_shd.g_old_rec.attribute8,
366 p_attribute9_o => per_qua_shd.g_old_rec.attribute9,
367 p_attribute10_o => per_qua_shd.g_old_rec.attribute10,
368 p_attribute11_o => per_qua_shd.g_old_rec.attribute11,
369 p_attribute12_o => per_qua_shd.g_old_rec.attribute12,
370 p_attribute13_o => per_qua_shd.g_old_rec.attribute13,
371 p_attribute14_o => per_qua_shd.g_old_rec.attribute14,
372 p_attribute15_o => per_qua_shd.g_old_rec.attribute15,
373 p_attribute16_o => per_qua_shd.g_old_rec.attribute16,
374 p_attribute17_o => per_qua_shd.g_old_rec.attribute17,
375 p_attribute18_o => per_qua_shd.g_old_rec.attribute18,
376 p_attribute19_o => per_qua_shd.g_old_rec.attribute19,
377 p_attribute20_o => per_qua_shd.g_old_rec.attribute20,
378 p_qua_information_category_o => per_qua_shd.g_old_rec.qua_information_category,
379 p_qua_information1_o => per_qua_shd.g_old_rec.qua_information1,
380 p_qua_information2_o => per_qua_shd.g_old_rec.qua_information2,
381 p_qua_information3_o => per_qua_shd.g_old_rec.qua_information3,
382 p_qua_information4_o => per_qua_shd.g_old_rec.qua_information4,
383 p_qua_information5_o => per_qua_shd.g_old_rec.qua_information5,
384 p_qua_information6_o => per_qua_shd.g_old_rec.qua_information6,
385 p_qua_information7_o => per_qua_shd.g_old_rec.qua_information7,
386 p_qua_information8_o => per_qua_shd.g_old_rec.qua_information8,
387 p_qua_information9_o => per_qua_shd.g_old_rec.qua_information9,
388 p_qua_information10_o => per_qua_shd.g_old_rec.qua_information10,
389 p_qua_information11_o => per_qua_shd.g_old_rec.qua_information11,
390 p_qua_information12_o => per_qua_shd.g_old_rec.qua_information12,
391 p_qua_information13_o => per_qua_shd.g_old_rec.qua_information13,
392 p_qua_information14_o => per_qua_shd.g_old_rec.qua_information14,
393 p_qua_information15_o => per_qua_shd.g_old_rec.qua_information15,
394 p_qua_information16_o => per_qua_shd.g_old_rec.qua_information16,
395 p_qua_information17_o => per_qua_shd.g_old_rec.qua_information17,
396 p_qua_information18_o => per_qua_shd.g_old_rec.qua_information18,
397 p_qua_information19_o => per_qua_shd.g_old_rec.qua_information19,
398 p_qua_information20_o => per_qua_shd.g_old_rec.qua_information20,
399 p_professional_body_name_o => per_qua_shd.g_old_rec.professional_body_name,
400 p_membership_number_o => per_qua_shd.g_old_rec.membership_number,
401 p_membership_category_o => per_qua_shd.g_old_rec.membership_category,
402 p_subscription_payment_meth_o => per_qua_shd.g_old_rec.subscription_payment_method,
403 p_party_id_o => per_qua_shd.g_old_rec.party_id
404 );
405 exception
406 when hr_api.cannot_find_prog_unit then
407 hr_api.cannot_find_prog_unit_error
408 (p_module_name => 'PER_QUALIFICATIONS'
409 ,p_hook_type => 'AU'
410 );
411 end;
412 --
413 -- End of Row Handler User Hook for post_update.
414 --
415 hr_utility.set_location(' Leaving:'||l_proc, 10);
416 End post_update;
417 --
418 -- ----------------------------------------------------------------------------
419 -- |-----------------------------< convert_defs >-----------------------------|
420 -- ----------------------------------------------------------------------------
421 -- {Start Of Comments}
422 --
423 -- Description:
424 -- The Convert_Defs procedure has one very important function:
425 -- It must return the record structure for the row with all system defaulted
426 -- values converted into its corresponding parameter value for update. When
427 -- we attempt to update a row through the Upd process , certain
428 -- parameters can be defaulted which enables flexibility in the calling of
429 -- the upd process (e.g. only attributes which need to be updated need to be
430 -- specified). For the upd process to determine which attributes
431 -- have NOT been specified we need to check if the parameter has a reserved
432 -- system default value. Therefore, for all parameters which have a
433 -- corresponding reserved system default mechanism specified we need to
434 -- check if a system default is being used. If a system default is being
435 -- used then we convert the defaulted value into its corresponding attribute
436 -- value held in the g_old_rec data structure.
437 --
438 -- Pre Conditions:
439 -- This private function can only be called from the upd process.
440 --
441 -- In Parameters:
442 -- A Pl/Sql record structre.
443 --
444 -- Post Success:
445 -- The record structure will be returned with all system defaulted parameter
446 -- values converted into its current row attribute value.
447 --
448 -- Post Failure:
449 -- No direct error handling is required within this function. Any possible
450 -- errors within this procedure will be a PL/SQL value error due to conversion
451
452 -- of datatypes or data lengths.
453 --
454 -- Developer Implementation Notes:
455 -- None.
456 --
457 -- Access Status:
458 -- Internal Table Handler Use Only.
459 --
460 -- {End Of Comments}
461 -- ----------------------------------------------------------------------------
462 Procedure convert_defs(p_rec in out nocopy per_qua_shd.g_rec_type) is
463 --
464 l_proc varchar2(72) := g_package||'convert_defs';
465 --
466 Begin
467 --
468 hr_utility.set_location('Entering:'||l_proc, 5);
469 --
470 -- We must now examine each argument value in the
471 -- p_rec plsql record structure
472 -- to see if a system default is being used. If a system default
473 -- is being used then we must set to the 'current' argument value.
474 --
475 If (p_rec.business_group_id = hr_api.g_number) then
476 p_rec.business_group_id :=
477 per_qua_shd.g_old_rec.business_group_id;
478 End If;
479 If (p_rec.person_id = hr_api.g_number) then
480 p_rec.person_id :=
481 per_qua_shd.g_old_rec.person_id;
482 End If;
483 If (p_rec.title = hr_api.g_varchar2) then
484 p_rec.title :=
485 per_qua_shd.g_old_rec.title;
486 End If;
487 If (p_rec.grade_attained = hr_api.g_varchar2) then
488 p_rec.grade_attained :=
489 per_qua_shd.g_old_rec.grade_attained;
490 End If;
491 If (p_rec.status = hr_api.g_varchar2) then
492 p_rec.status :=
493 per_qua_shd.g_old_rec.status;
494 End If;
495 If (p_rec.awarded_date = hr_api.g_date) then
496 p_rec.awarded_date :=
497 per_qua_shd.g_old_rec.awarded_date;
498 End If;
499 If (p_rec.fee = hr_api.g_number) then
500 p_rec.fee :=
501 per_qua_shd.g_old_rec.fee;
502 End If;
503 If (p_rec.fee_currency = hr_api.g_varchar2) then
504 p_rec.fee_currency :=
505 per_qua_shd.g_old_rec.fee_currency;
506 End If;
507 If (p_rec.training_completed_amount = hr_api.g_number) then
508 p_rec.training_completed_amount :=
509 per_qua_shd.g_old_rec.training_completed_amount;
510 End If;
511 If (p_rec.reimbursement_arrangements = hr_api.g_varchar2) then
512 p_rec.reimbursement_arrangements :=
513 per_qua_shd.g_old_rec.reimbursement_arrangements;
514 End If;
515 If (p_rec.training_completed_units = hr_api.g_varchar2) then
516 p_rec.training_completed_units :=
517 per_qua_shd.g_old_rec.training_completed_units;
518 End If;
519 If (p_rec.total_training_amount = hr_api.g_number) then
520 p_rec.total_training_amount :=
521 per_qua_shd.g_old_rec.total_training_amount;
522 End If;
523 If (p_rec.start_date = hr_api.g_date) then
524 p_rec.start_date :=
525 per_qua_shd.g_old_rec.start_date;
526 End If;
527 If (p_rec.end_date = hr_api.g_date) then
528 p_rec.end_date :=
529 per_qua_shd.g_old_rec.end_date;
530 End If;
531 If (p_rec.license_number = hr_api.g_varchar2) then
532 p_rec.license_number :=
533 per_qua_shd.g_old_rec.license_number;
534 End If;
535 If (p_rec.expiry_date = hr_api.g_date) then
536 p_rec.expiry_date :=
537 per_qua_shd.g_old_rec.expiry_date;
538 End If;
539 If (p_rec.license_restrictions = hr_api.g_varchar2) then
540 p_rec.license_restrictions :=
541 per_qua_shd.g_old_rec.license_restrictions;
542 End If;
543 If (p_rec.projected_completion_date = hr_api.g_date) then
544 p_rec.projected_completion_date :=
545 per_qua_shd.g_old_rec.projected_completion_date;
546 End If;
547 If (p_rec.awarding_body = hr_api.g_varchar2) then
548 p_rec.awarding_body :=
549 per_qua_shd.g_old_rec.awarding_body;
550 End If;
551 If (p_rec.tuition_method = hr_api.g_varchar2) then
552 p_rec.tuition_method :=
553 per_qua_shd.g_old_rec.tuition_method;
554 End If;
555 If (p_rec.group_ranking = hr_api.g_varchar2) then
556 p_rec.group_ranking :=
557 per_qua_shd.g_old_rec.group_ranking;
558 End If;
559 If (p_rec.comments = hr_api.g_varchar2) then
560 p_rec.comments :=
561 per_qua_shd.g_old_rec.comments;
562 End If;
563 If (p_rec.qualification_type_id = hr_api.g_number) then
564 p_rec.qualification_type_id :=
565 per_qua_shd.g_old_rec.qualification_type_id;
566 End If;
567 If (p_rec.attendance_id = hr_api.g_number) then
568 p_rec.attendance_id :=
569 per_qua_shd.g_old_rec.attendance_id;
570 End If;
571 If (p_rec.attribute_category = hr_api.g_varchar2) then
572 p_rec.attribute_category :=
573 per_qua_shd.g_old_rec.attribute_category;
574 End If;
575 If (p_rec.attribute1 = hr_api.g_varchar2) then
576 p_rec.attribute1 :=
577 per_qua_shd.g_old_rec.attribute1;
578 End If;
579 If (p_rec.attribute2 = hr_api.g_varchar2) then
580 p_rec.attribute2 :=
581 per_qua_shd.g_old_rec.attribute2;
582 End If;
583 If (p_rec.attribute3 = hr_api.g_varchar2) then
584 p_rec.attribute3 :=
585 per_qua_shd.g_old_rec.attribute3;
586 End If;
587 If (p_rec.attribute4 = hr_api.g_varchar2) then
588 p_rec.attribute4 :=
589 per_qua_shd.g_old_rec.attribute4;
590 End If;
591 If (p_rec.attribute5 = hr_api.g_varchar2) then
592 p_rec.attribute5 :=
593 per_qua_shd.g_old_rec.attribute5;
594 End If;
595 If (p_rec.attribute6 = hr_api.g_varchar2) then
596 p_rec.attribute6 :=
597 per_qua_shd.g_old_rec.attribute6;
598 End If;
599 If (p_rec.attribute7 = hr_api.g_varchar2) then
600 p_rec.attribute7 :=
601 per_qua_shd.g_old_rec.attribute7;
602 End If;
603 If (p_rec.attribute8 = hr_api.g_varchar2) then
604 p_rec.attribute8 :=
605 per_qua_shd.g_old_rec.attribute8;
606 End If;
607 If (p_rec.attribute9 = hr_api.g_varchar2) then
608 p_rec.attribute9 :=
609 per_qua_shd.g_old_rec.attribute9;
610 End If;
611 If (p_rec.attribute10 = hr_api.g_varchar2) then
612 p_rec.attribute10 :=
613 per_qua_shd.g_old_rec.attribute10;
614 End If;
615 If (p_rec.attribute11 = hr_api.g_varchar2) then
616 p_rec.attribute11 :=
617 per_qua_shd.g_old_rec.attribute11;
618 End If;
619 If (p_rec.attribute12 = hr_api.g_varchar2) then
620 p_rec.attribute12 :=
621 per_qua_shd.g_old_rec.attribute12;
622 End If;
623 If (p_rec.attribute13 = hr_api.g_varchar2) then
624 p_rec.attribute13 :=
625 per_qua_shd.g_old_rec.attribute13;
626 End If;
627 If (p_rec.attribute14 = hr_api.g_varchar2) then
628 p_rec.attribute14 :=
629 per_qua_shd.g_old_rec.attribute14;
630 End If;
631 If (p_rec.attribute15 = hr_api.g_varchar2) then
632 p_rec.attribute15 :=
633 per_qua_shd.g_old_rec.attribute15;
634 End If;
635 If (p_rec.attribute16 = hr_api.g_varchar2) then
636 p_rec.attribute16 :=
637 per_qua_shd.g_old_rec.attribute16;
638 End If;
639 If (p_rec.attribute17 = hr_api.g_varchar2) then
640 p_rec.attribute17 :=
641 per_qua_shd.g_old_rec.attribute17;
642 End If;
643 If (p_rec.attribute18 = hr_api.g_varchar2) then
644 p_rec.attribute18 :=
645 per_qua_shd.g_old_rec.attribute18;
646 End If;
647 If (p_rec.attribute19 = hr_api.g_varchar2) then
648 p_rec.attribute19 :=
649 per_qua_shd.g_old_rec.attribute19;
650 End If;
651 If (p_rec.attribute20 = hr_api.g_varchar2) then
652 p_rec.attribute20 :=
653 per_qua_shd.g_old_rec.attribute20;
654 End If;
655 If (p_rec.qua_information_category = hr_api.g_varchar2) then
656 p_rec.qua_information_category :=
657 per_qua_shd.g_old_rec.qua_information_category;
658 End If;
659 If (p_rec.qua_information1 = hr_api.g_varchar2) then
660 p_rec.qua_information1 :=
661 per_qua_shd.g_old_rec.qua_information1;
662 End If;
663 If (p_rec.qua_information2 = hr_api.g_varchar2) then
664 p_rec.qua_information2 :=
665 per_qua_shd.g_old_rec.qua_information2;
666 End If;
667 If (p_rec.qua_information3 = hr_api.g_varchar2) then
668 p_rec.qua_information3 :=
669 per_qua_shd.g_old_rec.qua_information3;
670 End If;
671 If (p_rec.qua_information4 = hr_api.g_varchar2) then
672 p_rec.qua_information4 :=
673 per_qua_shd.g_old_rec.qua_information4;
674 End If;
675 If (p_rec.qua_information5 = hr_api.g_varchar2) then
676 p_rec.qua_information5 :=
677 per_qua_shd.g_old_rec.qua_information5;
678 End If;
679 If (p_rec.qua_information6 = hr_api.g_varchar2) then
680 p_rec.qua_information6 :=
681 per_qua_shd.g_old_rec.qua_information6;
682 End If;
683 If (p_rec.qua_information7 = hr_api.g_varchar2) then
684 p_rec.qua_information7 :=
685 per_qua_shd.g_old_rec.qua_information7;
686 End If;
687 If (p_rec.qua_information8 = hr_api.g_varchar2) then
688 p_rec.qua_information8 :=
689 per_qua_shd.g_old_rec.qua_information8;
690 End If;
691 If (p_rec.qua_information9 = hr_api.g_varchar2) then
692 p_rec.qua_information9 :=
693 per_qua_shd.g_old_rec.qua_information9;
694 End If;
695 If (p_rec.qua_information10 = hr_api.g_varchar2) then
696 p_rec.qua_information10 :=
697 per_qua_shd.g_old_rec.qua_information10;
698 End If;
699 If (p_rec.qua_information11 = hr_api.g_varchar2) then
700 p_rec.qua_information11 :=
701 per_qua_shd.g_old_rec.qua_information11;
702 End If;
703 If (p_rec.qua_information12 = hr_api.g_varchar2) then
704 p_rec.qua_information12 :=
705 per_qua_shd.g_old_rec.qua_information12;
706 End If;
707 If (p_rec.qua_information13 = hr_api.g_varchar2) then
708 p_rec.qua_information13 :=
709 per_qua_shd.g_old_rec.qua_information13;
710 End If;
711 If (p_rec.qua_information14 = hr_api.g_varchar2) then
712 p_rec.qua_information14 :=
713 per_qua_shd.g_old_rec.qua_information14;
714 End If;
715 If (p_rec.qua_information15 = hr_api.g_varchar2) then
716 p_rec.qua_information15 :=
717 per_qua_shd.g_old_rec.qua_information15;
718 End If;
719 If (p_rec.qua_information16 = hr_api.g_varchar2) then
720 p_rec.qua_information16 :=
721 per_qua_shd.g_old_rec.qua_information16;
722 End If;
723 If (p_rec.qua_information17 = hr_api.g_varchar2) then
724 p_rec.qua_information17 :=
725 per_qua_shd.g_old_rec.qua_information17;
726 End If;
727 If (p_rec.qua_information18 = hr_api.g_varchar2) then
728 p_rec.qua_information18 :=
729 per_qua_shd.g_old_rec.qua_information18;
730 End If;
731 If (p_rec.qua_information19 = hr_api.g_varchar2) then
732 p_rec.qua_information19 :=
733 per_qua_shd.g_old_rec.qua_information19;
734 End If;
735 If (p_rec.qua_information20 = hr_api.g_varchar2) then
736 p_rec.qua_information20 :=
737 per_qua_shd.g_old_rec.qua_information20;
738 End If;
739 If (p_rec.professional_body_name = hr_api.g_varchar2) then
740 p_rec.professional_body_name :=
741 per_qua_shd.g_old_rec.professional_body_name;
742 End If;
743 If (p_rec.membership_number = hr_api.g_varchar2) then
744 p_rec.membership_number :=
745 per_qua_shd.g_old_rec.membership_number;
746 End If;
747 If (p_rec.membership_category = hr_api.g_varchar2) then
748 p_rec.membership_category :=
749 per_qua_shd.g_old_rec.membership_category;
750 End If;
751 If (p_rec.subscription_payment_method = hr_api.g_varchar2) then
752 p_rec.subscription_payment_method :=
753 per_qua_shd.g_old_rec.subscription_payment_method;
754 End If;
755 If (p_rec.party_id = hr_api.g_number) then -- HR/TCA merge
756 p_rec.party_id :=
757 per_qua_shd.g_old_rec.party_id;
758 End If;
759 --
760 hr_utility.set_location(' Leaving:'||l_proc, 10);
761 --
762 End convert_defs;
763 --
764 -- ----------------------------------------------------------------------------
765 -- |---------------------------------< upd >----------------------------------|
766 -- ----------------------------------------------------------------------------
767 Procedure upd
768 (
769 p_rec in out nocopy per_qua_shd.g_rec_type,
770 p_effective_date in date,
771 p_validate in boolean default false
772 ) is
773 --
774 l_proc varchar2(72) := g_package||'upd';
775 --
776 Begin
777 hr_utility.set_location('Entering:'||l_proc, 5);
778 --
779 -- Determine if the business process is to be validated.
780 --
781 If p_validate then
782 --
783 -- Issue the savepoint.
784 --
785 SAVEPOINT upd_qua;
786 End If;
787 --
788 -- We must lock the row which we need to update.
789 --
790 per_qua_shd.lck
791 (
792 p_rec.qualification_id,
793 p_rec.object_version_number
794 );
795 --
796 -- 1. During an update system defaults are used to determine if
797 -- arguments have been defaulted or not. We must therefore
798 -- derive the full record structure values to be updated.
799 --
800 -- 2. Call the supporting update validate operations.
801 --
802 convert_defs(p_rec);
803 per_qua_bus.update_validate(p_rec,p_effective_date);
804 --
805 -- Call to raise any errors on multi-message list
806 hr_multi_message.end_validation_set;
807 --
808 --
809 -- Call the supporting pre-update operation
810 --
811 pre_update(p_rec);
812 --
813 -- Update the row.
814 --
815 update_dml(p_rec);
816 --
817 -- Call the supporting post-update operation
818 --
819 post_update(p_rec, p_effective_date);
820 --
821 -- Call to raise any errors on multi-message list
822 hr_multi_message.end_validation_set;
823 --
824 --
825 -- If we are validating then raise the Validate_Enabled exception
826 --
827 If p_validate then
828 Raise HR_Api.Validate_Enabled;
829 End If;
830 --
831 hr_utility.set_location(' Leaving:'||l_proc, 10);
832 Exception
833 When HR_Api.Validate_Enabled Then
834 --
835 -- As the Validate_Enabled exception has been raised
836 -- we must rollback to the savepoint
837 --
838 ROLLBACK TO upd_qua;
839 End upd;
840 --
841 -- ----------------------------------------------------------------------------
842 -- |---------------------------------< upd >----------------------------------|
843 -- ----------------------------------------------------------------------------
844 Procedure upd
845 (
846 p_qualification_id in number,
847 p_business_group_id in number default hr_api.g_number,
848 p_object_version_number in out nocopy number,
849 p_person_id in number default hr_api.g_number,
850 p_title in varchar2 default hr_api.g_varchar2,
851 p_grade_attained in varchar2 default hr_api.g_varchar2,
852 p_status in varchar2 default hr_api.g_varchar2,
853 p_awarded_date in date default hr_api.g_date,
854 p_fee in number default hr_api.g_number,
855 p_fee_currency in varchar2 default hr_api.g_varchar2,
856 p_training_completed_amount in number default hr_api.g_number,
857 p_reimbursement_arrangements in varchar2 default hr_api.g_varchar2,
858 p_training_completed_units in varchar2 default hr_api.g_varchar2,
859 p_total_training_amount in number default hr_api.g_number,
860 p_start_date in date default hr_api.g_date,
861 p_end_date in date default hr_api.g_date,
862 p_license_number in varchar2 default hr_api.g_varchar2,
863 p_expiry_date in date default hr_api.g_date,
864 p_license_restrictions in varchar2 default hr_api.g_varchar2,
865 p_projected_completion_date in date default hr_api.g_date,
866 p_awarding_body in varchar2 default hr_api.g_varchar2,
867 p_tuition_method in varchar2 default hr_api.g_varchar2,
868 p_group_ranking in varchar2 default hr_api.g_varchar2,
869 p_comments in varchar2 default hr_api.g_varchar2,
870 p_qualification_type_id in number default hr_api.g_number,
871 p_attendance_id in number default hr_api.g_number,
872 p_attribute_category in varchar2 default hr_api.g_varchar2,
873 p_attribute1 in varchar2 default hr_api.g_varchar2,
874 p_attribute2 in varchar2 default hr_api.g_varchar2,
875 p_attribute3 in varchar2 default hr_api.g_varchar2,
876 p_attribute4 in varchar2 default hr_api.g_varchar2,
877 p_attribute5 in varchar2 default hr_api.g_varchar2,
878 p_attribute6 in varchar2 default hr_api.g_varchar2,
879 p_attribute7 in varchar2 default hr_api.g_varchar2,
880 p_attribute8 in varchar2 default hr_api.g_varchar2,
881 p_attribute9 in varchar2 default hr_api.g_varchar2,
882 p_attribute10 in varchar2 default hr_api.g_varchar2,
883 p_attribute11 in varchar2 default hr_api.g_varchar2,
884 p_attribute12 in varchar2 default hr_api.g_varchar2,
885 p_attribute13 in varchar2 default hr_api.g_varchar2,
886 p_attribute14 in varchar2 default hr_api.g_varchar2,
887 p_attribute15 in varchar2 default hr_api.g_varchar2,
888 p_attribute16 in varchar2 default hr_api.g_varchar2,
889 p_attribute17 in varchar2 default hr_api.g_varchar2,
890 p_attribute18 in varchar2 default hr_api.g_varchar2,
891 p_attribute19 in varchar2 default hr_api.g_varchar2,
892 p_attribute20 in varchar2 default hr_api.g_varchar2,
893 p_qua_information_category in varchar2 default hr_api.g_varchar2,
894 p_qua_information1 in varchar2 default hr_api.g_varchar2,
895 p_qua_information2 in varchar2 default hr_api.g_varchar2,
896 p_qua_information3 in varchar2 default hr_api.g_varchar2,
897 p_qua_information4 in varchar2 default hr_api.g_varchar2,
898 p_qua_information5 in varchar2 default hr_api.g_varchar2,
899 p_qua_information6 in varchar2 default hr_api.g_varchar2,
900 p_qua_information7 in varchar2 default hr_api.g_varchar2,
901 p_qua_information8 in varchar2 default hr_api.g_varchar2,
902 p_qua_information9 in varchar2 default hr_api.g_varchar2,
903 p_qua_information10 in varchar2 default hr_api.g_varchar2,
904 p_qua_information11 in varchar2 default hr_api.g_varchar2,
905 p_qua_information12 in varchar2 default hr_api.g_varchar2,
906 p_qua_information13 in varchar2 default hr_api.g_varchar2,
907 p_qua_information14 in varchar2 default hr_api.g_varchar2,
908 p_qua_information15 in varchar2 default hr_api.g_varchar2,
909 p_qua_information16 in varchar2 default hr_api.g_varchar2,
910 p_qua_information17 in varchar2 default hr_api.g_varchar2,
911 p_qua_information18 in varchar2 default hr_api.g_varchar2,
912 p_qua_information19 in varchar2 default hr_api.g_varchar2,
913 p_qua_information20 in varchar2 default hr_api.g_varchar2,
914 p_effective_date in date,
915 p_validate in boolean default false,
916 p_professional_body_name in varchar2 default hr_api.g_varchar2,
917 p_membership_number in varchar2 default hr_api.g_varchar2,
918 p_membership_category in varchar2 default hr_api.g_varchar2,
919 p_subscription_payment_method in varchar2 default hr_api.g_varchar2,
920 p_party_id in number default hr_api.g_number
921 ) is
922 --
923 l_rec per_qua_shd.g_rec_type;
924 l_proc varchar2(72) := g_package||'upd';
925 --
926 Begin
927 hr_utility.set_location('Entering:'||l_proc, 5);
928 --
929 -- Call conversion function to turn arguments into the
930 -- l_rec structure.
931 --
932 l_rec :=
933 per_qua_shd.convert_args
934 (
935 p_qualification_id,
936 p_business_group_id,
937 p_object_version_number,
938 p_person_id,
939 p_title,
940 p_grade_attained,
941 p_status,
942 p_awarded_date,
943 p_fee,
944 p_fee_currency,
945 p_training_completed_amount,
946 p_reimbursement_arrangements,
947 p_training_completed_units,
948 p_total_training_amount,
949 p_start_date,
950 p_end_date,
951 p_license_number,
952 p_expiry_date,
953 p_license_restrictions,
954 p_projected_completion_date,
955 p_awarding_body,
956 p_tuition_method,
957 p_group_ranking,
958 p_comments,
959 p_qualification_type_id,
960 p_attendance_id,
961 p_attribute_category,
962 p_attribute1,
963 p_attribute2,
964 p_attribute3,
965 p_attribute4,
966 p_attribute5,
967 p_attribute6,
968 p_attribute7,
969 p_attribute8,
970 p_attribute9,
971 p_attribute10,
972 p_attribute11,
973 p_attribute12,
974 p_attribute13,
975 p_attribute14,
976 p_attribute15,
977 p_attribute16,
978 p_attribute17,
979 p_attribute18,
980 p_attribute19,
981 p_attribute20,
982 p_qua_information_category,
983 p_qua_information1,
984 p_qua_information2,
985 p_qua_information3,
986 p_qua_information4,
987 p_qua_information5,
988 p_qua_information6,
989 p_qua_information7,
990 p_qua_information8,
991 p_qua_information9,
992 p_qua_information10,
993 p_qua_information11,
994 p_qua_information12,
995 p_qua_information13,
996 p_qua_information14,
997 p_qua_information15,
998 p_qua_information16,
999 p_qua_information17,
1000 p_qua_information18,
1001 p_qua_information19,
1002 p_qua_information20,
1003 p_professional_body_name,
1004 p_membership_number,
1005 p_membership_category,
1006 p_subscription_payment_method,
1007 p_party_id
1008 );
1009 --
1010 -- Having converted the arguments into the
1011 -- plsql record structure we call the corresponding record
1012 -- business process.
1013 --
1014 upd(l_rec, p_effective_date, p_validate);
1015 p_object_version_number := l_rec.object_version_number;
1016 --
1017 hr_utility.set_location(' Leaving:'||l_proc, 10);
1018 End upd;
1019 --
1020 end per_qua_upd;