[Home] [Help]
PACKAGE BODY: APPS.PER_APT_UPD
Source
1 Package Body per_apt_upd as
2 /* $Header: peaptrhi.pkb 120.10.12020000.1 2012/06/29 00:43:57 appldev ship $ */
3
4 -- ---------------------------------------------------------------------------+
5 -- | Private Global Definitions |
6 -- ---------------------------------------------------------------------------+
7
8 g_package varchar2(33) := ' per_apt_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 per_apt_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_appraisal_templates Row
60
61 update per_appraisal_templates
62 set
63 appraisal_template_id = p_rec.appraisal_template_id,
64 object_version_number = p_rec.object_version_number,
65 name = p_rec.name,
66 description = p_rec.description,
67 instructions = p_rec.instructions,
68 date_from = p_rec.date_from,
69 date_to = p_rec.date_to,
70 assessment_type_id = p_rec.assessment_type_id,
71 rating_scale_id = p_rec.rating_scale_id,
72 questionnaire_template_id = p_rec.questionnaire_template_id,
73 attribute_category = p_rec.attribute_category,
74 attribute1 = p_rec.attribute1,
75 attribute2 = p_rec.attribute2,
76 attribute3 = p_rec.attribute3,
77 attribute4 = p_rec.attribute4,
78 attribute5 = p_rec.attribute5,
79 attribute6 = p_rec.attribute6,
80 attribute7 = p_rec.attribute7,
81 attribute8 = p_rec.attribute8,
82 attribute9 = p_rec.attribute9,
83 attribute10 = p_rec.attribute10,
84 attribute11 = p_rec.attribute11,
85 attribute12 = p_rec.attribute12,
86 attribute13 = p_rec.attribute13,
87 attribute14 = p_rec.attribute14,
88 attribute15 = p_rec.attribute15,
89 attribute16 = p_rec.attribute16,
90 attribute17 = p_rec.attribute17,
91 attribute18 = p_rec.attribute18,
92 attribute19 = p_rec.attribute19,
93 attribute20 = p_rec.attribute20,
94 objective_asmnt_type_id = p_rec.objective_asmnt_type_id,
95 ma_quest_template_id = p_rec.ma_quest_template_id,
96 link_appr_to_learning_path = p_rec.link_appr_to_learning_path,
97 final_score_formula_id = p_rec.final_score_formula_id,
98 update_personal_comp_profile = p_rec.update_personal_comp_profile,
99 comp_profile_source_type = p_rec.comp_profile_source_type,
100 show_competency_ratings = p_rec.show_competency_ratings,
101 show_objective_ratings = p_rec.show_objective_ratings,
102 show_overall_ratings = p_rec.show_overall_ratings,
103 show_overall_comments = p_rec.show_overall_comments,
104 provide_overall_feedback = p_rec.provide_overall_feedback,
105 show_participant_details = p_rec.show_participant_details,
106 allow_add_participant = p_rec.allow_add_participant,
107 show_additional_details = p_rec.show_additional_details,
108 show_participant_names = p_rec.show_participant_names,
109 show_participant_ratings = p_rec.show_participant_ratings,
110 available_flag = p_rec.available_flag,
111 show_questionnaire_info = p_rec.show_questionnaire_info,
112 ma_off_template_code = p_rec.ma_off_template_code,
113 appraisee_off_template_code = p_rec.appraisee_off_template_code,
114 other_part_off_template_code = p_rec.other_part_off_template_code,
115 part_app_off_template_code = p_rec.part_app_off_template_code,
116 part_rev_off_template_code = p_rec.part_rev_off_template_code,
117 show_participant_comments = p_rec.show_participant_comments -- 8651478 bug fix
118
119 ,show_term_employee = p_rec.show_term_employee
120 ,show_term_contigent = p_rec.show_term_contigent
121 ,disp_term_emp_period_from = p_rec.disp_term_emp_period_from
122 ,show_future_term_employee = p_rec.show_future_term_employee
123
124 where appraisal_template_id = p_rec.appraisal_template_id;
125
126 hr_utility.set_location(' Leaving:'||l_proc, 10);
127
128 Exception
129 When hr_api.check_integrity_violated Then
130 -- A check constraint has been violated
131 per_apt_shd.constraint_error
132 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
133 When hr_api.parent_integrity_violated Then
134 -- Parent integrity has been violated
135 per_apt_shd.constraint_error
136 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
137 When hr_api.unique_integrity_violated Then
138 -- Unique integrity has been violated
139 per_apt_shd.constraint_error
140 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
141 When Others Then
142 Raise;
143 End update_dml;
144
145 -- ---------------------------------------------------------------------------+
146 -- |------------------------------< pre_update >------------------------------|
147 -- ---------------------------------------------------------------------------+
148 -- {Start Of Comments}
149
150 -- Description:
151 -- This private procedure contains any processing which is required before
152 -- the update dml.
153
154 -- Pre Conditions:
155 -- This is an internal procedure which is called from the upd procedure.
156
157 -- In Parameters:
158 -- A Pl/Sql record structre.
159
160 -- Post Success:
161 -- Processing continues.
162
163 -- Post Failure:
164 -- If an error has occurred, an error message and exception will be raised
165 -- but not handled.
166
167 -- Developer Implementation Notes:
168 -- Any pre-processing required before the update dml is issued should be
169 -- coded within this procedure. It is important to note that any 3rd party
170 -- maintenance should be reviewed before placing in this procedure.
171
172 -- Access Status:
173 -- Internal Table Handler Use Only.
174
175 -- {End Of Comments}
176 -- ---------------------------------------------------------------------------+
177 Procedure pre_update(p_rec in per_apt_shd.g_rec_type) is
178
179 l_proc varchar2(72) := g_package||'pre_update';
180
181 Begin
182 hr_utility.set_location('Entering:'||l_proc, 5);
183
184 hr_utility.set_location(' Leaving:'||l_proc, 10);
185 End pre_update;
186
187 -- ---------------------------------------------------------------------------+
188 -- |-----------------------------< post_update >------------------------------|
189 -- ---------------------------------------------------------------------------+
190 -- {Start Of Comments}
191
192 -- Description:
193 -- This private procedure contains any processing which is required after the
194 -- update dml.
195
196 -- Pre Conditions:
197 -- This is an internal procedure which is called from the upd procedure.
198
199 -- In Parameters:
200 -- A Pl/Sql record structre.
201
202 -- Post Success:
203 -- Processing continues.
204
205 -- Post Failure:
206 -- If an error has occurred, an error message and exception will be raised
207 -- but not handled.
208
209 -- Developer Implementation Notes:
210 -- Any post-processing required after the update dml is issued should be
211 -- coded within this procedure. It is important to note that any 3rd party
212 -- maintenance should be reviewed before placing in this procedure.
213
214 -- Access Status:
215 -- Internal Table Handler Use Only.
216
217 -- {End Of Comments}
218 -- ---------------------------------------------------------------------------+
219 Procedure post_update(p_rec in per_apt_shd.g_rec_type) is
220
221 l_proc varchar2(72) := g_package||'post_update';
222
223 Begin
224 hr_utility.set_location('Entering:'||l_proc, 5);
225
226 -- This is a hook point and the user hook for post_update is called here.
227
228 begin
229 per_apt_rku.after_update (
230 p_appraisal_template_id => p_rec.appraisal_template_id ,
231 p_business_group_id => p_rec.business_group_id ,
232 p_object_version_number => p_rec.object_version_number ,
233 p_name => p_rec.name ,
234 p_description => p_rec.description ,
235 p_instructions => p_rec.instructions ,
236 p_date_from => p_rec.date_from ,
237 p_date_to => p_rec.date_to ,
238 p_assessment_type_id => p_rec.assessment_type_id ,
239 p_rating_scale_id => p_rec.rating_scale_id ,
240 p_questionnaire_template_id => p_rec.questionnaire_template_id ,
241 p_attribute_category => p_rec.attribute_category ,
242 p_attribute1 => p_rec.attribute1 ,
243 p_attribute2 => p_rec.attribute2 ,
244 p_attribute3 => p_rec.attribute3 ,
245 p_attribute4 => p_rec.attribute4 ,
246 p_attribute5 => p_rec.attribute5 ,
247 p_attribute6 => p_rec.attribute6 ,
248 p_attribute7 => p_rec.attribute7 ,
249 p_attribute8 => p_rec.attribute8 ,
250 p_attribute9 => p_rec.attribute9 ,
251 p_attribute10 => p_rec.attribute10 ,
252 p_attribute11 => p_rec.attribute11 ,
253 p_attribute12 => p_rec.attribute12 ,
254 p_attribute13 => p_rec.attribute13 ,
255 p_attribute14 => p_rec.attribute14 ,
256 p_attribute15 => p_rec.attribute15 ,
257 p_attribute16 => p_rec.attribute16 ,
258 p_attribute17 => p_rec.attribute17 ,
259 p_attribute18 => p_rec.attribute18 ,
260 p_attribute19 => p_rec.attribute19 ,
261 p_attribute20 => p_rec.attribute20 ,
262 p_objective_asmnt_type_id => p_rec.objective_asmnt_type_id,
263 p_ma_quest_template_id => p_rec.ma_quest_template_id,
264 p_link_appr_to_learning_path => p_rec.link_appr_to_learning_path,
265 p_final_score_formula_id => p_rec.final_score_formula_id,
266 p_update_personal_comp_profile => p_rec.update_personal_comp_profile,
267 p_comp_profile_source_type => p_rec.comp_profile_source_type,
268 p_show_competency_ratings => p_rec.show_competency_ratings,
269 p_show_objective_ratings => p_rec.show_objective_ratings,
270 p_show_overall_ratings => p_rec.show_overall_ratings,
271 p_show_overall_comments => p_rec.show_overall_comments,
272 p_provide_overall_feedback => p_rec.provide_overall_feedback,
273 p_show_participant_details => p_rec.show_participant_details,
274 p_allow_add_participant => p_rec.allow_add_participant,
275 p_show_additional_details => p_rec.show_additional_details,
276 p_show_participant_names => p_rec.show_participant_names,
277 p_show_participant_ratings => p_rec.show_participant_ratings,
278 p_available_flag => p_rec.available_flag,
279 p_show_questionnaire_info => p_rec.show_questionnaire_info,
280 p_ma_off_template_code => p_rec.ma_off_template_code,
281 p_appraisee_off_template_code => p_rec.appraisee_off_template_code,
282 p_other_part_off_template_code => p_rec.other_part_off_template_code,
283 p_part_app_off_template_code => p_rec.part_app_off_template_code,
284 p_part_rev_off_template_code => p_rec.part_rev_off_template_code,
285 p_show_participant_comments => p_rec.show_participant_comments, -- 8651478 bug fix
286
287 p_show_term_employee => p_rec.show_term_employee -- 6181267 bug fix
288 ,p_show_term_contigent => p_rec.show_term_contigent -- 6181267 bug fix
289 ,p_disp_term_emp_period_from => p_rec.disp_term_emp_period_from -- 6181267 bug fix
290 ,p_show_future_term_employee => p_rec.show_future_term_employee, -- 6181267 bug fix
291
292 p_business_group_id_o => per_apt_shd.g_old_rec.business_group_id ,
293 p_object_version_number_o => per_apt_shd.g_old_rec.object_version_number ,
294 p_name_o => per_apt_shd.g_old_rec.name ,
295 p_description_o => per_apt_shd.g_old_rec.description ,
296 p_instructions_o => per_apt_shd.g_old_rec.instructions ,
297 p_date_from_o => per_apt_shd.g_old_rec.date_from ,
298 p_date_to_o => per_apt_shd.g_old_rec.date_to ,
299 p_assessment_type_id_o => per_apt_shd.g_old_rec.assessment_type_id ,
300 p_rating_scale_id_o => per_apt_shd.g_old_rec.rating_scale_id ,
301 p_questionnaire_template_id_o => per_apt_shd.g_old_rec.questionnaire_template_id ,
302 p_attribute_category_o => per_apt_shd.g_old_rec.attribute_category ,
303 p_attribute1_o => per_apt_shd.g_old_rec.attribute1 ,
304 p_attribute2_o => per_apt_shd.g_old_rec.attribute2 ,
305 p_attribute3_o => per_apt_shd.g_old_rec.attribute3 ,
306 p_attribute4_o => per_apt_shd.g_old_rec.attribute4 ,
307 p_attribute5_o => per_apt_shd.g_old_rec.attribute5 ,
308 p_attribute6_o => per_apt_shd.g_old_rec.attribute6 ,
309 p_attribute7_o => per_apt_shd.g_old_rec.attribute7 ,
310 p_attribute8_o => per_apt_shd.g_old_rec.attribute8 ,
311 p_attribute9_o => per_apt_shd.g_old_rec.attribute9 ,
312 p_attribute10_o => per_apt_shd.g_old_rec.attribute10 ,
313 p_attribute11_o => per_apt_shd.g_old_rec.attribute11 ,
314 p_attribute12_o => per_apt_shd.g_old_rec.attribute12 ,
315 p_attribute13_o => per_apt_shd.g_old_rec.attribute13 ,
316 p_attribute14_o => per_apt_shd.g_old_rec.attribute14 ,
317 p_attribute15_o => per_apt_shd.g_old_rec.attribute15 ,
318 p_attribute16_o => per_apt_shd.g_old_rec.attribute16 ,
319 p_attribute17_o => per_apt_shd.g_old_rec.attribute17 ,
320 p_attribute18_o => per_apt_shd.g_old_rec.attribute18 ,
321 p_attribute19_o => per_apt_shd.g_old_rec.attribute19 ,
322 p_attribute20_o => per_apt_shd.g_old_rec.attribute20 ,
323 p_objective_asmnt_type_id_o => per_apt_shd.g_old_rec.objective_asmnt_type_id,
324 p_ma_quest_template_id_o => per_apt_shd.g_old_rec.ma_quest_template_id,
325 p_link_appr_to_learning_path_o => per_apt_shd.g_old_rec.link_appr_to_learning_path,
326 p_final_score_formula_id_o => per_apt_shd.g_old_rec.final_score_formula_id,
327 p_update_personal_comp_profi_o => per_apt_shd.g_old_rec.update_personal_comp_profile,
328 p_comp_profile_source_type_o => per_apt_shd.g_old_rec.comp_profile_source_type,
329 p_show_competency_ratings_o => per_apt_shd.g_old_rec.show_competency_ratings,
330 p_show_objective_ratings_o => per_apt_shd.g_old_rec.show_objective_ratings,
331 p_show_overall_ratings_o => per_apt_shd.g_old_rec.show_overall_ratings,
332 p_show_overall_comments_o => per_apt_shd.g_old_rec.show_overall_comments,
333 p_provide_overall_feedback_o => per_apt_shd.g_old_rec.provide_overall_feedback,
334 p_show_participant_details_o => per_apt_shd.g_old_rec.show_participant_details,
335 p_allow_add_participant_o => per_apt_shd.g_old_rec.allow_add_participant,
336 p_show_additional_details_o => per_apt_shd.g_old_rec.show_additional_details,
337 p_show_participant_names_o => per_apt_shd.g_old_rec.show_participant_names,
338 p_show_participant_ratings_o => per_apt_shd.g_old_rec.show_participant_ratings,
339 p_available_flag_o => per_apt_shd.g_old_rec.available_flag,
340 p_show_questionnaire_info_o => per_apt_shd.g_old_rec.show_questionnaire_info,
341 p_ma_off_template_cd_o => per_apt_shd.g_old_rec.ma_off_template_code,
342 p_appraisee_off_template_cd_o => per_apt_shd.g_old_rec.appraisee_off_template_code,
343 p_other_part_off_template_cd_o => per_apt_shd.g_old_rec.other_part_off_template_code,
344 p_part_app_off_template_cd_o => per_apt_shd.g_old_rec.part_app_off_template_code,
345 p_part_rev_off_template_cd_o => per_apt_shd.g_old_rec.part_rev_off_template_code,
346 p_show_participant_comments_o => per_apt_shd.g_old_rec.show_participant_comments -- 8651478 bug fix
347
348 ,p_show_term_employee_o => per_apt_shd.g_old_rec.show_term_employee -- 6181267 bug fix
349 ,p_show_term_contigent_o => per_apt_shd.g_old_rec.show_term_contigent -- 6181267 bug fix
350 ,p_disp_term_emp_period_from_o => per_apt_shd.g_old_rec.disp_term_emp_period_from -- 6181267 bug fix
351 ,p_show_future_term_employee_o => per_apt_shd.g_old_rec.show_future_term_employee -- 6181267 bug fix
352
353 );
354
355 exception
356 when hr_api.cannot_find_prog_unit then
357 hr_api.cannot_find_prog_unit_error
358 ( p_module_name => 'PER_APPRAISAL_TEMPLATES'
359 ,p_hook_type => 'AU'
360 );
361 end;
362 -- End of API User Hook for post_update
363
364 hr_utility.set_location(' Leaving:'||l_proc, 10);
365 End post_update;
366
367 -- ---------------------------------------------------------------------------+
368 -- |-----------------------------< convert_defs >-----------------------------|
369 -- ---------------------------------------------------------------------------+
370 -- {Start Of Comments}
371
372 -- Description:
373 -- The Convert_Defs procedure has one very important function:
374 -- It must return the record structure for the row with all system defaulted
375 -- values converted into its corresponding parameter value for update. When
376 -- we attempt to update a row through the Upd process , certain
377 -- parameters can be defaulted which enables flexibility in the calling of
378 -- the upd process (e.g. only attributes which need to be updated need to be
379 -- specified). For the upd process to determine which attributes
380 -- have NOT been specified we need to check if the parameter has a reserved
381 -- system default value. Therefore, for all parameters which have a
382 -- corresponding reserved system default mechanism specified we need to
383 -- check if a system default is being used. If a system default is being
384 -- used then we convert the defaulted value into its corresponding attribute
385 -- value held in the g_old_rec data structure.
386
387 -- Pre Conditions:
388 -- This private function can only be called from the upd process.
389
390 -- In Parameters:
391 -- A Pl/Sql record structre.
392
393 -- Post Success:
394 -- The record structure will be returned with all system defaulted parameter
395 -- values converted into its current row attribute value.
396
397 -- Post Failure:
398 -- No direct error handling is required within this function. Any possible
399 -- errors within this procedure will be a PL/SQL value error due to conversion
400
401 -- of datatypes or data lengths.
402
403 -- Developer Implementation Notes:
404 -- None.
405
406 -- Access Status:
407 -- Internal Table Handler Use Only.
408
409 -- {End Of Comments}
410 -- ---------------------------------------------------------------------------+
411 Procedure convert_defs(p_rec in out nocopy per_apt_shd.g_rec_type) is
412
413 l_proc varchar2(72) := g_package||'convert_defs';
414
415 Begin
416
417 hr_utility.set_location('Entering:'||l_proc, 5);
418
419 -- We must now examine each argument value in the
420 -- p_rec plsql record structure
421 -- to see if a system default is being used. If a system default
422 -- is being used then we must set to the 'current' argument value.
423
424 If (p_rec.business_group_id = hr_api.g_number) then
425 p_rec.business_group_id :=
426 per_apt_shd.g_old_rec.business_group_id;
427 End If;
428 If (p_rec.name = hr_api.g_varchar2) then
429 p_rec.name :=
430 per_apt_shd.g_old_rec.name;
431 End If;
432 If (p_rec.description = hr_api.g_varchar2) then
433 p_rec.description :=
434 per_apt_shd.g_old_rec.description;
435 End If;
436 If (p_rec.instructions = hr_api.g_varchar2) then
437 p_rec.instructions :=
438 per_apt_shd.g_old_rec.instructions;
439 End If;
440 If (p_rec.date_from = hr_api.g_date) then
441 p_rec.date_from :=
442 per_apt_shd.g_old_rec.date_from;
443 End If;
444 If (p_rec.date_to = hr_api.g_date) then
445 p_rec.date_to :=
446 per_apt_shd.g_old_rec.date_to;
447 End If;
448 If (p_rec.assessment_type_id = hr_api.g_number) then
449 p_rec.assessment_type_id :=
450 per_apt_shd.g_old_rec.assessment_type_id;
451 End If;
452 If (p_rec.rating_scale_id = hr_api.g_number) then
453 p_rec.rating_scale_id :=
454 per_apt_shd.g_old_rec.rating_scale_id;
455 End If;
456 If (p_rec.questionnaire_template_id = hr_api.g_number) then
457 p_rec.questionnaire_template_id :=
458 per_apt_shd.g_old_rec.questionnaire_template_id;
459 End If;
460 If (p_rec.attribute_category = hr_api.g_varchar2) then
461 p_rec.attribute_category :=
462 per_apt_shd.g_old_rec.attribute_category;
463 End If;
464 If (p_rec.attribute1 = hr_api.g_varchar2) then
465 p_rec.attribute1 :=
466 per_apt_shd.g_old_rec.attribute1;
467 End If;
468 If (p_rec.attribute2 = hr_api.g_varchar2) then
469 p_rec.attribute2 :=
470 per_apt_shd.g_old_rec.attribute2;
471 End If;
472 If (p_rec.attribute3 = hr_api.g_varchar2) then
473 p_rec.attribute3 :=
474 per_apt_shd.g_old_rec.attribute3;
475 End If;
476 If (p_rec.attribute4 = hr_api.g_varchar2) then
477 p_rec.attribute4 :=
478 per_apt_shd.g_old_rec.attribute4;
479 End If;
480 If (p_rec.attribute5 = hr_api.g_varchar2) then
481 p_rec.attribute5 :=
482 per_apt_shd.g_old_rec.attribute5;
483 End If;
484 If (p_rec.attribute6 = hr_api.g_varchar2) then
485 p_rec.attribute6 :=
486 per_apt_shd.g_old_rec.attribute6;
487 End If;
488 If (p_rec.attribute7 = hr_api.g_varchar2) then
489 p_rec.attribute7 :=
490 per_apt_shd.g_old_rec.attribute7;
491 End If;
492 If (p_rec.attribute8 = hr_api.g_varchar2) then
493 p_rec.attribute8 :=
494 per_apt_shd.g_old_rec.attribute8;
495 End If;
496 If (p_rec.attribute9 = hr_api.g_varchar2) then
497 p_rec.attribute9 :=
498 per_apt_shd.g_old_rec.attribute9;
499 End If;
500 If (p_rec.attribute10 = hr_api.g_varchar2) then
501 p_rec.attribute10 :=
502 per_apt_shd.g_old_rec.attribute10;
503 End If;
504 If (p_rec.attribute11 = hr_api.g_varchar2) then
505 p_rec.attribute11 :=
506 per_apt_shd.g_old_rec.attribute11;
507 End If;
508 If (p_rec.attribute12 = hr_api.g_varchar2) then
509 p_rec.attribute12 :=
510 per_apt_shd.g_old_rec.attribute12;
511 End If;
512 If (p_rec.attribute13 = hr_api.g_varchar2) then
513 p_rec.attribute13 :=
514 per_apt_shd.g_old_rec.attribute13;
515 End If;
516 If (p_rec.attribute14 = hr_api.g_varchar2) then
517 p_rec.attribute14 :=
518 per_apt_shd.g_old_rec.attribute14;
519 End If;
520 If (p_rec.attribute15 = hr_api.g_varchar2) then
521 p_rec.attribute15 :=
522 per_apt_shd.g_old_rec.attribute15;
523 End If;
524 If (p_rec.attribute16 = hr_api.g_varchar2) then
525 p_rec.attribute16 :=
526 per_apt_shd.g_old_rec.attribute16;
527 End If;
528 If (p_rec.attribute17 = hr_api.g_varchar2) then
529 p_rec.attribute17 :=
530 per_apt_shd.g_old_rec.attribute17;
531 End If;
532 If (p_rec.attribute18 = hr_api.g_varchar2) then
533 p_rec.attribute18 :=
534 per_apt_shd.g_old_rec.attribute18;
535 End If;
536 If (p_rec.attribute19 = hr_api.g_varchar2) then
537 p_rec.attribute19 :=
538 per_apt_shd.g_old_rec.attribute19;
539 End If;
540 If (p_rec.attribute20 = hr_api.g_varchar2) then
541 p_rec.attribute20 :=
542 per_apt_shd.g_old_rec.attribute20;
543 End If;
544 If (p_rec.objective_asmnt_type_id = hr_api.g_number) then
545 p_rec.objective_asmnt_type_id :=
546 per_apt_shd.g_old_rec.objective_asmnt_type_id;
547 End If;
548 If (p_rec.ma_quest_template_id = hr_api.g_number) then
549 p_rec.ma_quest_template_id :=
550 per_apt_shd.g_old_rec.ma_quest_template_id;
551 End If;
552 If (p_rec.link_appr_to_learning_path = hr_api.g_varchar2) then
553 p_rec.link_appr_to_learning_path :=
554 per_apt_shd.g_old_rec.link_appr_to_learning_path;
555 End If;
556 If (p_rec.final_score_formula_id = hr_api.g_number) then
557 p_rec.final_score_formula_id :=
558 per_apt_shd.g_old_rec.final_score_formula_id;
559 End If;
560 If (p_rec.update_personal_comp_profile = hr_api.g_varchar2) then
561 p_rec.update_personal_comp_profile :=
562 per_apt_shd.g_old_rec.update_personal_comp_profile;
563 End If;
564 If (p_rec.comp_profile_source_type = hr_api.g_varchar2) then
565 p_rec.comp_profile_source_type :=
566 per_apt_shd.g_old_rec.comp_profile_source_type;
567 End If;
568 If (p_rec.show_competency_ratings = hr_api.g_varchar2) then
569 p_rec.show_competency_ratings :=
570 per_apt_shd.g_old_rec.show_competency_ratings;
571 End If;
572 If (p_rec.show_objective_ratings = hr_api.g_varchar2) then
573 p_rec.show_objective_ratings :=
574 per_apt_shd.g_old_rec.show_objective_ratings;
575 End If;
576 If (p_rec.show_overall_ratings = hr_api.g_varchar2) then
577 p_rec.show_overall_ratings :=
578 per_apt_shd.g_old_rec.show_overall_ratings;
579 End If;
580 If (p_rec.show_overall_comments = hr_api.g_varchar2) then
581 p_rec.show_overall_comments :=
582 per_apt_shd.g_old_rec.show_overall_comments;
583 End If;
584 If (p_rec.provide_overall_feedback = hr_api.g_varchar2) then
585 p_rec.provide_overall_feedback :=
586 per_apt_shd.g_old_rec.provide_overall_feedback;
587 End If;
588 If (p_rec.show_participant_details = hr_api.g_varchar2) then
589 p_rec.show_participant_details :=
590 per_apt_shd.g_old_rec.show_participant_details;
591 End If;
592 If (p_rec.allow_add_participant = hr_api.g_varchar2) then
593 p_rec.allow_add_participant :=
594 per_apt_shd.g_old_rec.allow_add_participant;
595 End If;
596 If (p_rec.show_additional_details = hr_api.g_varchar2) then
597 p_rec.show_additional_details :=
598 per_apt_shd.g_old_rec.show_additional_details;
599 End If;
600 If (p_rec.show_participant_names = hr_api.g_varchar2) then
601 p_rec.show_participant_names :=
602 per_apt_shd.g_old_rec.show_participant_names;
603 End If;
604 If (p_rec.show_participant_ratings = hr_api.g_varchar2) then
605 p_rec.show_participant_ratings :=
606 per_apt_shd.g_old_rec.show_participant_ratings;
607 End If;
608 If (p_rec.available_flag = hr_api.g_varchar2) then
609 p_rec.available_flag :=
610 per_apt_shd.g_old_rec.available_flag;
611 End If;
612 If (p_rec.show_questionnaire_info = hr_api.g_varchar2) then
613 p_rec.show_questionnaire_info :=
614 per_apt_shd.g_old_rec.show_questionnaire_info;
615 End If;
616 If (p_rec.ma_off_template_code =hr_api.g_varchar2) then
617 p_rec.ma_off_template_code :=
618 per_apt_shd.g_old_rec.ma_off_template_code;
619 End If;
620 If (p_rec.appraisee_off_template_code =hr_api.g_varchar2) then
621 p_rec.appraisee_off_template_code :=
622 per_apt_shd.g_old_rec.appraisee_off_template_code;
623 End If;
624 If (p_rec.other_part_off_template_code =hr_api.g_varchar2) then
625 p_rec.other_part_off_template_code :=
626 per_apt_shd.g_old_rec.other_part_off_template_code;
627 End If;
628 If (p_rec.part_rev_off_template_code =hr_api.g_varchar2) then
629 p_rec.part_rev_off_template_code :=
630 per_apt_shd.g_old_rec.part_rev_off_template_code;
631 End If;
632 If (p_rec.part_app_off_template_code =hr_api.g_varchar2) then
633 p_rec.part_app_off_template_code :=
634 per_apt_shd.g_old_rec.part_app_off_template_code ;
635 End If;
636
637 -- 8651478 bug fix
638 If (p_rec.show_participant_comments = hr_api.g_varchar2) then
639 p_rec.show_participant_comments :=
640 per_apt_shd.g_old_rec.show_participant_comments;
641 End If;
642
643
644 If (p_rec.show_term_employee = hr_api.g_varchar2) then
645 p_rec.show_term_employee :=
646 per_apt_shd.g_old_rec.show_term_employee;
647 End If;
648
649 If (p_rec.show_term_contigent = hr_api.g_varchar2) then
650 p_rec.show_term_contigent :=
651 per_apt_shd.g_old_rec.show_term_contigent;
652 End If;
653
654 If (p_rec.disp_term_emp_period_from = hr_api.g_number) then
655 p_rec.disp_term_emp_period_from :=
656 per_apt_shd.g_old_rec.disp_term_emp_period_from;
657 End If;
658
659 If (p_rec.show_future_term_employee = hr_api.g_varchar2) then
660 p_rec.show_future_term_employee :=
661 per_apt_shd.g_old_rec.show_future_term_employee;
662 End If;
663
664
665 hr_utility.set_location(' Leaving:'||l_proc, 10);
666
667 End convert_defs;
668
669 -- ---------------------------------------------------------------------------+
670 -- |---------------------------------< upd >----------------------------------|
671 -- ---------------------------------------------------------------------------+
672 Procedure upd
673 (
674 p_rec in out nocopy per_apt_shd.g_rec_type,
675 p_effective_date in date,
676 p_validate in boolean default false
677 ) is
678
679 l_proc varchar2(72) := g_package||'upd';
680
681 Begin
682 hr_utility.set_location('Entering:'||l_proc, 5);
683
684 -- Determine if the business process is to be validated.
685
686 If p_validate then
687
688 -- Issue the savepoint.
689
690 SAVEPOINT upd_per_apt;
691 End If;
692
693 -- We must lock the row which we need to update.
694
695 per_apt_shd.lck
696 (
697 p_rec.appraisal_template_id,
698 p_rec.object_version_number
699 );
700
701 -- 1. During an update system defaults are used to determine if
702 -- arguments have been defaulted or not. We must therefore
703 -- derive the full record structure values to be updated.
704
705 -- 2. Call the supporting update validate operations.
706
707 convert_defs(p_rec);
708 per_apt_bus.update_validate(p_rec,p_effective_date);
709
710 -- Call the supporting pre-update operation
711
712 pre_update(p_rec);
713
714 -- Update the row.
715
716 update_dml(p_rec);
717
718 -- Call the supporting post-update operation
719
720 post_update(p_rec);
721
722 -- If we are validating then raise the Validate_Enabled exception
723
724 If p_validate then
725 Raise HR_Api.Validate_Enabled;
726 End If;
727
728 hr_utility.set_location(' Leaving:'||l_proc, 10);
729 Exception
730 When HR_Api.Validate_Enabled Then
731
732 -- As the Validate_Enabled exception has been raised
733 -- we must rollback to the savepoint
734
735 ROLLBACK TO upd_per_apt;
736 End upd;
737
738 -- ---------------------------------------------------------------------------+
739 -- |---------------------------------< upd >----------------------------------|
740 -- ---------------------------------------------------------------------------+
741 Procedure upd
742 (
743 p_appraisal_template_id in number,
744 p_object_version_number in out nocopy number,
745 p_name in varchar2 default hr_api.g_varchar2,
746 p_description in varchar2 default hr_api.g_varchar2,
747 p_instructions in varchar2 default hr_api.g_varchar2,
748 p_date_from in date default hr_api.g_date,
749 p_date_to in date default hr_api.g_date,
750 p_assessment_type_id in number default hr_api.g_number,
751 p_rating_scale_id in number default hr_api.g_number,
752 p_questionnaire_template_id in number default hr_api.g_number,
753 p_attribute_category in varchar2 default hr_api.g_varchar2,
754 p_attribute1 in varchar2 default hr_api.g_varchar2,
755 p_attribute2 in varchar2 default hr_api.g_varchar2,
756 p_attribute3 in varchar2 default hr_api.g_varchar2,
757 p_attribute4 in varchar2 default hr_api.g_varchar2,
758 p_attribute5 in varchar2 default hr_api.g_varchar2,
759 p_attribute6 in varchar2 default hr_api.g_varchar2,
760 p_attribute7 in varchar2 default hr_api.g_varchar2,
761 p_attribute8 in varchar2 default hr_api.g_varchar2,
762 p_attribute9 in varchar2 default hr_api.g_varchar2,
763 p_attribute10 in varchar2 default hr_api.g_varchar2,
764 p_attribute11 in varchar2 default hr_api.g_varchar2,
765 p_attribute12 in varchar2 default hr_api.g_varchar2,
766 p_attribute13 in varchar2 default hr_api.g_varchar2,
767 p_attribute14 in varchar2 default hr_api.g_varchar2,
768 p_attribute15 in varchar2 default hr_api.g_varchar2,
769 p_attribute16 in varchar2 default hr_api.g_varchar2,
770 p_attribute17 in varchar2 default hr_api.g_varchar2,
771 p_attribute18 in varchar2 default hr_api.g_varchar2,
772 p_attribute19 in varchar2 default hr_api.g_varchar2,
773 p_attribute20 in varchar2 default hr_api.g_varchar2,
774 p_objective_asmnt_type_id in number default hr_api.g_number,
775 p_ma_quest_template_id in number default hr_api.g_number,
776 p_link_appr_to_learning_path in varchar2 default hr_api.g_varchar2,
777 p_final_score_formula_id in number default hr_api.g_number,
778 p_update_personal_comp_profile in varchar2 default hr_api.g_varchar2,
779 p_comp_profile_source_type in varchar2 default hr_api.g_varchar2,
780 p_show_competency_ratings in varchar2 default hr_api.g_varchar2,
781 p_show_objective_ratings in varchar2 default hr_api.g_varchar2,
782 p_show_overall_ratings in varchar2 default hr_api.g_varchar2,
783 p_show_overall_comments in varchar2 default hr_api.g_varchar2,
784 p_provide_overall_feedback in varchar2 default hr_api.g_varchar2,
785 p_show_participant_details in varchar2 default hr_api.g_varchar2,
786 p_allow_add_participant in varchar2 default hr_api.g_varchar2,
787 p_show_additional_details in varchar2 default hr_api.g_varchar2,
788 p_show_participant_names in varchar2 default hr_api.g_varchar2,
789 p_show_participant_ratings in varchar2 default hr_api.g_varchar2,
790 p_available_flag in varchar2 default hr_api.g_varchar2,
791 p_show_questionnaire_info in varchar2 default hr_api.g_varchar2,
792 p_effective_date in date
793 ,p_ma_off_template_code in varchar2 default hr_api.g_varchar2
794 ,p_appraisee_off_template_code in varchar2 default hr_api.g_varchar2
795 ,p_other_part_off_template_code in varchar2 default hr_api.g_varchar2
796 ,p_part_app_off_template_code in varchar2 default hr_api.g_varchar2
797 ,p_part_rev_off_template_code in varchar2 default hr_api.g_varchar2,
798 p_validate in boolean default false ,
799 p_show_participant_comments in varchar2 default hr_api.g_varchar2 -- 8651478 bug fix
800 ,p_show_term_employee in varchar2 default hr_api.g_varchar2 -- 6181267 bug fix
801 ,p_show_term_contigent in varchar2 default hr_api.g_varchar2 -- 6181267 bug fix
802 ,p_disp_term_emp_period_from in number default hr_api.g_number -- 6181267 bug fix
803 ,p_show_future_term_employee in varchar2 default hr_api.g_varchar2 -- 6181267 bug fix
804 ) is
805
806 l_rec per_apt_shd.g_rec_type;
807 l_proc varchar2(72) := g_package||'upd';
808
809 Begin
810 hr_utility.set_location('Entering:'||l_proc, 5);
811
812 -- Call conversion function to turn arguments into the
813 -- l_rec structure.
814
815 l_rec :=
816 per_apt_shd.convert_args
817 (
818 p_appraisal_template_id,
819 hr_api.g_number,
820 p_object_version_number,
821 p_name,
822 p_description,
823 p_instructions,
824 p_date_from,
825 p_date_to,
826 p_assessment_type_id,
827 p_rating_scale_id,
828 p_questionnaire_template_id,
829 p_attribute_category,
830 p_attribute1,
831 p_attribute2,
832 p_attribute3,
833 p_attribute4,
834 p_attribute5,
835 p_attribute6,
836 p_attribute7,
837 p_attribute8,
838 p_attribute9,
839 p_attribute10,
840 p_attribute11,
841 p_attribute12,
842 p_attribute13,
843 p_attribute14,
844 p_attribute15,
845 p_attribute16,
846 p_attribute17,
847 p_attribute18,
848 p_attribute19,
849 p_attribute20,
850 p_objective_asmnt_type_id,
851 p_ma_quest_template_id,
852 p_link_appr_to_learning_path,
853 p_final_score_formula_id,
854 p_update_personal_comp_profile,
855 p_comp_profile_source_type,
856 p_show_competency_ratings,
857 p_show_objective_ratings,
858 p_show_overall_ratings,
859 p_show_overall_comments,
860 p_provide_overall_feedback,
861 p_show_participant_details,
862 p_allow_add_participant,
863 p_show_additional_details,
864 p_show_participant_names,
865 p_show_participant_ratings,
866 p_available_flag,
867 p_show_questionnaire_info,
868 p_ma_off_template_code,
869 p_appraisee_off_template_code,
870 p_other_part_off_template_code,
871 p_part_app_off_template_code,
872 p_part_rev_off_template_code,
873 p_show_participant_comments -- 8651478 bug fix
874 ,p_show_term_employee
875 ,p_show_term_contigent
876 ,p_disp_term_emp_period_from
877 ,p_show_future_term_employee
878
879 );
880
881 -- Having converted the arguments into the
882 -- plsql record structure we call the corresponding record
883 -- business process.
884
885 upd(l_rec, p_effective_date,p_validate);
886
887 if not p_validate then
888 p_object_version_number := l_rec.object_version_number;
889 end if;
890
891 hr_utility.set_location(' Leaving:'||l_proc, 10);
892 End upd;
893
894 end per_apt_upd;