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