1 Package Body ssp_mat_upd as
2 /* $Header: spmatrhi.pkb 120.10 2011/08/24 13:51:07 npannamp ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' ssp_mat_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 ssp_mat_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 ssp_mat_shd.g_api_dml := true; -- Set the api dml status
66 --
67 -- Update the ssp_maternities Row
68 --
69 update ssp_maternities
70 set
71 due_date = p_rec.due_date,
72 start_date_maternity_allowance = p_rec.start_date_maternity_allowance,
73 notification_of_birth_date = p_rec.notification_of_birth_date,
74 unfit_for_scheduled_return = p_rec.unfit_for_scheduled_return,
75 stated_return_date = p_rec.stated_return_date,
76 intend_to_return_flag = p_rec.intend_to_return_flag,
77 start_date_with_new_employer = p_rec.start_date_with_new_employer,
78 smp_must_be_paid_by_date = p_rec.smp_must_be_paid_by_date,
79 pay_smp_as_lump_sum = p_rec.pay_smp_as_lump_sum,
80 live_birth_flag = p_rec.live_birth_flag,
81 actual_birth_date = p_rec.actual_birth_date,
82 mpp_start_date = p_rec.mpp_start_date,
83 object_version_number = p_rec.object_version_number,
84 attribute_category = p_rec.attribute_category,
85 attribute1 = p_rec.attribute1,
86 attribute2 = p_rec.attribute2,
87 attribute3 = p_rec.attribute3,
88 attribute4 = p_rec.attribute4,
89 attribute5 = p_rec.attribute5,
90 attribute6 = p_rec.attribute6,
91 attribute7 = p_rec.attribute7,
92 attribute8 = p_rec.attribute8,
93 attribute9 = p_rec.attribute9,
94 attribute10 = p_rec.attribute10,
95 attribute11 = p_rec.attribute11,
96 attribute12 = p_rec.attribute12,
97 attribute13 = p_rec.attribute13,
98 attribute14 = p_rec.attribute14,
99 attribute15 = p_rec.attribute15,
100 attribute16 = p_rec.attribute16,
101 attribute17 = p_rec.attribute17,
102 attribute18 = p_rec.attribute18,
103 attribute19 = p_rec.attribute19,
104 attribute20 = p_rec.attribute20,
105 LEAVE_TYPE = p_rec.LEAVE_TYPE,
106 MATCHING_DATE = p_rec.MATCHING_DATE,
107 PLACEMENT_DATE = p_rec.PLACEMENT_DATE ,
108 DISRUPTED_PLACEMENT_DATE = p_rec.DISRUPTED_PLACEMENT_DATE,
109 mat_information_category = p_rec.mat_information_category,
110 mat_information1 = p_rec.mat_information1,
111 mat_information2 = p_rec.mat_information2,
112 mat_information3 = p_rec.mat_information3,
113 mat_information4 = p_rec.mat_information4,
114 mat_information5 = p_rec.mat_information5,
115 mat_information6 = p_rec.mat_information6,
116 mat_information7 = p_rec.mat_information7,
117 mat_information8 = p_rec.mat_information8,
118 mat_information9 = p_rec.mat_information9,
119 mat_information10 = p_rec.mat_information10,
120 mat_information11 = p_rec.mat_information11,
121 mat_information12 = p_rec.mat_information12,
122 mat_information13 = p_rec.mat_information13,
123 mat_information14 = p_rec.mat_information14,
124 mat_information15 = p_rec.mat_information15,
125 mat_information16 = p_rec.mat_information16,
126 mat_information17 = p_rec.mat_information17,
127 mat_information18 = p_rec.mat_information18,
128 mat_information19 = p_rec.mat_information19,
129 mat_information20 = p_rec.mat_information20,
130 mat_information21 = p_rec.mat_information21,
131 mat_information22 = p_rec.mat_information22,
132 mat_information23 = p_rec.mat_information23,
133 mat_information24 = p_rec.mat_information24,
134 mat_information25 = p_rec.mat_information25,
135 mat_information26 = p_rec.mat_information26,
136 mat_information27 = p_rec.mat_information27,
137 mat_information28 = p_rec.mat_information28,
138 mat_information29 = p_rec.mat_information29,
139 mat_information30 = p_rec.mat_information30,
140 partner_stat_pay_start_date = p_rec.partner_stat_pay_start_date,
141 partner_return_to_work = p_rec.partner_return_to_work ,
142 partner_death_date = p_rec.partner_death_date
143 where maternity_id = p_rec.maternity_id;
144 --
145 ssp_mat_shd.g_api_dml := false; -- Unset the api dml status
146 --
147 hr_utility.set_location(' Leaving:'||l_proc, 10);
148 --
149 Exception
150 When hr_api.check_integrity_violated Then
151 -- A check constraint has been violated
152 ssp_mat_shd.g_api_dml := false; -- Unset the api dml status
153 ssp_mat_shd.constraint_error
154 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
155 When hr_api.parent_integrity_violated Then
156 -- Parent integrity has been violated
157 ssp_mat_shd.g_api_dml := false; -- Unset the api dml status
158 ssp_mat_shd.constraint_error
159 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
160 When hr_api.unique_integrity_violated Then
161 -- Unique integrity has been violated
162 ssp_mat_shd.g_api_dml := false; -- Unset the api dml status
163 ssp_mat_shd.constraint_error
164 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
165 When Others Then
166 ssp_mat_shd.g_api_dml := false; -- Unset the api dml status
167 Raise;
168 End update_dml;
169 --
170 -- ----------------------------------------------------------------------------
171 -- |------------------------------< pre_update >------------------------------|
172 -- ----------------------------------------------------------------------------
173 -- {Start Of Comments}
174 --
175 -- Description:
176 -- This private procedure contains any processing which is required before
177 -- the update dml.
178 --
179 -- Pre Conditions:
180 -- This is an internal procedure which is called from the upd procedure.
181 --
182 -- In Parameters:
183 -- A Pl/Sql record structre.
184 --
185 -- Post Success:
186 -- Processing continues.
187 --
188 -- Post Failure:
189 -- If an error has occurred, an error message and exception will be raised
190 -- but not handled.
191 --
192 -- Developer Implementation Notes:
193 -- Any pre-processing required before the update dml is issued should be
194 -- coded within this procedure. It is important to note that any 3rd party
195 -- maintenance should be reviewed before placing in this procedure.
196 --
197 -- Access Status:
198 -- Internal Table Handler Use Only.
199 --
200 -- {End Of Comments}
201 -- ----------------------------------------------------------------------------
202 Procedure pre_update(p_rec in ssp_mat_shd.g_rec_type) is
203 --
204 l_proc varchar2(72) := g_package||'pre_update';
205 --
206 Begin
207 hr_utility.set_location('Entering:'||l_proc, 5);
208 --
209 hr_utility.set_location(' Leaving:'||l_proc, 10);
210 End pre_update;
211 --
212 -- ----------------------------------------------------------------------------
213 -- |-----------------------------< post_update >------------------------------|
214 -- ----------------------------------------------------------------------------
215 -- {Start Of Comments}
216 --
217 -- Description:
218 -- This private procedure contains any processing which is required after the
219 -- update dml.
220 --
221 -- Pre Conditions:
222 -- This is an internal procedure which is called from the upd procedure.
223 --
224 -- In Parameters:
225 -- A Pl/Sql record structre.
226 --
227 -- Post Success:
228 -- Processing continues.
229 --
230 -- Post Failure:
231 -- If an error has occurred, an error message and exception will be raised
232 -- but not handled.
233 --
234 -- Developer Implementation Notes:
235 -- Any post-processing required after the update dml is issued should be
236 -- coded within this procedure. It is important to note that any 3rd party
237 -- maintenance should be reviewed before placing in this procedure.
238 --
239 -- Access Status:
240 -- Internal Table Handler Use Only.
241 --
242 -- {End Of Comments}
243 -- ----------------------------------------------------------------------------
244 Procedure post_update(p_rec in ssp_mat_shd.g_rec_type) is
245 --
246 l_proc varchar2(72) := g_package||'post_update';
247 --
248 Begin
249 hr_utility.set_location('Entering:'||l_proc, 5);
250 --
251 hr_utility.set_location(' Leaving:'||l_proc, 10);
252 End post_update;
253 --
254 -- ----------------------------------------------------------------------------
255 -- |-----------------------------< convert_defs >-----------------------------|
256 -- ----------------------------------------------------------------------------
257 -- {Start Of Comments}
258 --
259 -- Description:
260 -- The Convert_Defs procedure has one very important function:
261 -- It must return the record structure for the row with all system defaulted
262 -- values converted into its corresponding parameter value for update. When
263 -- we attempt to update a row through the Upd process , certain
264 -- parameters can be defaulted which enables flexibility in the calling of
265 -- the upd process (e.g. only attributes which need to be updated need to be
266 -- specified). For the upd process to determine which attributes
267 -- have NOT been specified we need to check if the parameter has a reserved
268 -- system default value. Therefore, for all parameters which have a
269 -- corresponding reserved system default mechanism specified we need to
270 -- check if a system default is being used. If a system default is being
271 -- used then we convert the defaulted value into its corresponding attribute
272 -- value held in the g_old_rec data structure.
273 --
274 -- Pre Conditions:
275 -- This private function can only be called from the upd process.
276 --
277 -- In Parameters:
278 -- A Pl/Sql record structre.
279 --
280 -- Post Success:
281 -- The record structure will be returned with all system defaulted parameter
282 -- values converted into its current row attribute value.
283 --
284 -- Post Failure:
285 -- No direct error handling is required within this function. Any possible
286 -- errors within this procedure will be a PL/SQL value error due to conversion
287
288 -- of datatypes or data lengths.
289 --
290 -- Developer Implementation Notes:
291 -- None.
292 --
293 -- Access Status:
294 -- Internal Table Handler Use Only.
295 --
296 -- {End Of Comments}
297 -- ----------------------------------------------------------------------------
298 Procedure convert_defs(p_rec in out nocopy ssp_mat_shd.g_rec_type) is
299 --
300 l_proc varchar2(72) := g_package||'convert_defs';
301 --
302 Begin
303 --
304 hr_utility.set_location('Entering:'||l_proc, 5);
305 --
306 -- We must now examine each argument value in the
307 -- p_rec plsql record structure
308 -- to see if a system default is being used. If a system default
309 -- is being used then we must set to the 'current' argument value.
310 --
311 If (p_rec.due_date = hr_api.g_date) then
312 p_rec.due_date :=
313 ssp_mat_shd.g_old_rec.due_date;
314 End If;
315 If (p_rec.person_id = hr_api.g_number) then
316 p_rec.person_id :=
317 ssp_mat_shd.g_old_rec.person_id;
318 End If;
319 If (p_rec.start_date_maternity_allowance = hr_api.g_date) then
320 p_rec.start_date_maternity_allowance :=
321 ssp_mat_shd.g_old_rec.start_date_maternity_allowance;
322 End If;
323 If (p_rec.notification_of_birth_date = hr_api.g_date) then
324 p_rec.notification_of_birth_date :=
325 ssp_mat_shd.g_old_rec.notification_of_birth_date;
326 End If;
327 If (p_rec.unfit_for_scheduled_return = hr_api.g_varchar2) then
328 p_rec.unfit_for_scheduled_return :=
329 ssp_mat_shd.g_old_rec.unfit_for_scheduled_return;
330 End If;
331 If (p_rec.stated_return_date = hr_api.g_date) then
332 p_rec.stated_return_date :=
333 ssp_mat_shd.g_old_rec.stated_return_date;
334 End If;
335 If (p_rec.intend_to_return_flag = hr_api.g_varchar2) then
336 p_rec.intend_to_return_flag :=
337 ssp_mat_shd.g_old_rec.intend_to_return_flag;
338 End If;
339 If (p_rec.start_date_with_new_employer = hr_api.g_date) then
340 p_rec.start_date_with_new_employer :=
341 ssp_mat_shd.g_old_rec.start_date_with_new_employer;
342 End If;
343 If (p_rec.smp_must_be_paid_by_date = hr_api.g_date) then
344 p_rec.smp_must_be_paid_by_date :=
345 ssp_mat_shd.g_old_rec.smp_must_be_paid_by_date;
346 End If;
347 If (p_rec.pay_smp_as_lump_sum = hr_api.g_varchar2) then
348 p_rec.pay_smp_as_lump_sum :=
349 ssp_mat_shd.g_old_rec.pay_smp_as_lump_sum;
350 End If;
351 If (p_rec.live_birth_flag = hr_api.g_varchar2) then
352 p_rec.live_birth_flag :=
353 ssp_mat_shd.g_old_rec.live_birth_flag;
354 End If;
355 If (p_rec.actual_birth_date = hr_api.g_date) then
356 p_rec.actual_birth_date :=
357 ssp_mat_shd.g_old_rec.actual_birth_date;
358 End If;
359 If (p_rec.mpp_start_date = hr_api.g_date) then
360 p_rec.mpp_start_date :=
361 ssp_mat_shd.g_old_rec.mpp_start_date;
362 End If;
363 If (p_rec.attribute_category = hr_api.g_varchar2) then
364 p_rec.attribute_category :=
365 ssp_mat_shd.g_old_rec.attribute_category;
366 End If;
367 If (p_rec.attribute1 = hr_api.g_varchar2) then
368 p_rec.attribute1 :=
369 ssp_mat_shd.g_old_rec.attribute1;
370 End If;
371 If (p_rec.attribute2 = hr_api.g_varchar2) then
372 p_rec.attribute2 :=
373 ssp_mat_shd.g_old_rec.attribute2;
374 End If;
375 If (p_rec.attribute3 = hr_api.g_varchar2) then
376 p_rec.attribute3 :=
377 ssp_mat_shd.g_old_rec.attribute3;
378 End If;
379 If (p_rec.attribute4 = hr_api.g_varchar2) then
380 p_rec.attribute4 :=
381 ssp_mat_shd.g_old_rec.attribute4;
382 End If;
383 If (p_rec.attribute5 = hr_api.g_varchar2) then
384 p_rec.attribute5 :=
385 ssp_mat_shd.g_old_rec.attribute5;
386 End If;
387 If (p_rec.attribute6 = hr_api.g_varchar2) then
388 p_rec.attribute6 :=
389 ssp_mat_shd.g_old_rec.attribute6;
390 End If;
391 If (p_rec.attribute7 = hr_api.g_varchar2) then
392 p_rec.attribute7 :=
393 ssp_mat_shd.g_old_rec.attribute7;
394 End If;
395 If (p_rec.attribute8 = hr_api.g_varchar2) then
396 p_rec.attribute8 :=
397 ssp_mat_shd.g_old_rec.attribute8;
398 End If;
399 If (p_rec.attribute9 = hr_api.g_varchar2) then
400 p_rec.attribute9 :=
401 ssp_mat_shd.g_old_rec.attribute9;
402 End If;
403 If (p_rec.attribute10 = hr_api.g_varchar2) then
404 p_rec.attribute10 :=
405 ssp_mat_shd.g_old_rec.attribute10;
406 End If;
407 If (p_rec.attribute11 = hr_api.g_varchar2) then
408 p_rec.attribute11 :=
409 ssp_mat_shd.g_old_rec.attribute11;
410 End If;
411 If (p_rec.attribute12 = hr_api.g_varchar2) then
412 p_rec.attribute12 :=
413 ssp_mat_shd.g_old_rec.attribute12;
414 End If;
415 If (p_rec.attribute13 = hr_api.g_varchar2) then
416 p_rec.attribute13 :=
417 ssp_mat_shd.g_old_rec.attribute13;
418 End If;
419 If (p_rec.attribute14 = hr_api.g_varchar2) then
420 p_rec.attribute14 :=
421 ssp_mat_shd.g_old_rec.attribute14;
422 End If;
423 If (p_rec.attribute15 = hr_api.g_varchar2) then
424 p_rec.attribute15 :=
425 ssp_mat_shd.g_old_rec.attribute15;
426 End If;
427 If (p_rec.attribute16 = hr_api.g_varchar2) then
428 p_rec.attribute16 :=
429 ssp_mat_shd.g_old_rec.attribute16;
430 End If;
431 If (p_rec.attribute17 = hr_api.g_varchar2) then
432 p_rec.attribute17 :=
433 ssp_mat_shd.g_old_rec.attribute17;
434 End If;
435 If (p_rec.attribute18 = hr_api.g_varchar2) then
436 p_rec.attribute18 :=
437 ssp_mat_shd.g_old_rec.attribute18;
438 End If;
439 If (p_rec.attribute19 = hr_api.g_varchar2) then
440 p_rec.attribute19 :=
441 ssp_mat_shd.g_old_rec.attribute19;
442 End If;
443 If (p_rec.attribute20 = hr_api.g_varchar2) then
444 p_rec.attribute20 :=
445 ssp_mat_shd.g_old_rec.attribute20;
446 End If;
447
448 If (p_rec.LEAVE_TYPE = hr_api.g_varchar2) then
449 p_rec.LEAVE_TYPE :=
450 ssp_mat_shd.g_old_rec.LEAVE_TYPE;
451 End If;
452
453 If (p_rec.MATCHING_DATE = hr_api.g_date) then
454 p_rec.MATCHING_DATE :=
455 ssp_mat_shd.g_old_rec.MATCHING_DATE;
456 End If;
457
458 If (p_rec.PLACEMENT_DATE = hr_api.g_date) then
459 p_rec.PLACEMENT_DATE :=
460 ssp_mat_shd.g_old_rec.PLACEMENT_DATE;
461 End If;
462
463 If (p_rec.DISRUPTED_PLACEMENT_DATE = hr_api.g_date) then
464 p_rec.DISRUPTED_PLACEMENT_DATE :=
465 ssp_mat_shd.g_old_rec.DISRUPTED_PLACEMENT_DATE;
466 End If;
467
468 If (p_rec.mat_information_category = hr_api.g_varchar2) then
469 p_rec.mat_information_category :=
470 ssp_mat_shd.g_old_rec.mat_information_category;
471 End If;
472 If (p_rec.mat_information1 = hr_api.g_varchar2) then
473 p_rec.mat_information1 :=
474 ssp_mat_shd.g_old_rec.mat_information1;
475 End If;
476 If (p_rec.mat_information1 = hr_api.g_varchar2) then
477 p_rec.mat_information1 :=
478 ssp_mat_shd.g_old_rec.mat_information1;
479 End If;
480 If (p_rec.mat_information2 = hr_api.g_varchar2) then
481 p_rec.mat_information2 :=
482 ssp_mat_shd.g_old_rec.mat_information2;
483 End If;
484 If (p_rec.mat_information3 = hr_api.g_varchar2) then
485 p_rec.mat_information3 :=
486 ssp_mat_shd.g_old_rec.mat_information3;
487 End If;
488 If (p_rec.mat_information4 = hr_api.g_varchar2) then
489 p_rec.mat_information4 :=
490 ssp_mat_shd.g_old_rec.mat_information4;
491 End If;
492 If (p_rec.mat_information5 = hr_api.g_varchar2) then
493 p_rec.mat_information5 :=
494 ssp_mat_shd.g_old_rec.mat_information5;
495 End If;
496 If (p_rec.mat_information6 = hr_api.g_varchar2) then
497 p_rec.mat_information6 :=
498 ssp_mat_shd.g_old_rec.mat_information6;
499 End If;
500 If (p_rec.mat_information7 = hr_api.g_varchar2) then
501 p_rec.mat_information7 :=
502 ssp_mat_shd.g_old_rec.mat_information7;
503 End If;
504 If (p_rec.mat_information8 = hr_api.g_varchar2) then
505 p_rec.mat_information8 :=
506 ssp_mat_shd.g_old_rec.mat_information8;
507 End If;
508 If (p_rec.mat_information9 = hr_api.g_varchar2) then
509 p_rec.mat_information9 :=
510 ssp_mat_shd.g_old_rec.mat_information9;
511 End If;
512 If (p_rec.mat_information10 = hr_api.g_varchar2) then
513 p_rec.mat_information10 :=
514 ssp_mat_shd.g_old_rec.mat_information10;
515 End If;
516 If (p_rec.mat_information11 = hr_api.g_varchar2) then
517 p_rec.mat_information11 :=
518 ssp_mat_shd.g_old_rec.mat_information11;
519 End If;
520 If (p_rec.mat_information12 = hr_api.g_varchar2) then
521 p_rec.mat_information12 :=
522 ssp_mat_shd.g_old_rec.mat_information12;
523 End If;
524 If (p_rec.mat_information13 = hr_api.g_varchar2) then
525 p_rec.mat_information13 :=
526 ssp_mat_shd.g_old_rec.mat_information13;
527 End If;
528 If (p_rec.mat_information14 = hr_api.g_varchar2) then
529 p_rec.mat_information14 :=
530 ssp_mat_shd.g_old_rec.mat_information14;
531 End If;
532 If (p_rec.mat_information15 = hr_api.g_varchar2) then
533 p_rec.mat_information15 :=
534 ssp_mat_shd.g_old_rec.mat_information15;
535 End If;
536 If (p_rec.mat_information16 = hr_api.g_varchar2) then
537 p_rec.mat_information16 :=
538 ssp_mat_shd.g_old_rec.mat_information16;
539 End If;
540 If (p_rec.mat_information17 = hr_api.g_varchar2) then
541 p_rec.mat_information17 :=
542 ssp_mat_shd.g_old_rec.mat_information17;
543 End If;
544 If (p_rec.mat_information18 = hr_api.g_varchar2) then
545 p_rec.mat_information18 :=
546 ssp_mat_shd.g_old_rec.mat_information18;
547 End If;
548 If (p_rec.mat_information19 = hr_api.g_varchar2) then
549 p_rec.mat_information19 :=
550 ssp_mat_shd.g_old_rec.mat_information19;
551 End If;
552 If (p_rec.mat_information20 = hr_api.g_varchar2) then
553 p_rec.mat_information20 :=
554 ssp_mat_shd.g_old_rec.mat_information20;
555 End If;
556 If (p_rec.mat_information21 = hr_api.g_varchar2) then
557 p_rec.mat_information21 :=
558 ssp_mat_shd.g_old_rec.mat_information21;
559 End If;
560 If (p_rec.mat_information22 = hr_api.g_varchar2) then
561 p_rec.mat_information12 :=
562 ssp_mat_shd.g_old_rec.mat_information22;
563 End If;
564 If (p_rec.mat_information23 = hr_api.g_varchar2) then
565 p_rec.mat_information23 :=
566 ssp_mat_shd.g_old_rec.mat_information23;
567 End If;
568 If (p_rec.mat_information24 = hr_api.g_varchar2) then
569 p_rec.mat_information24 :=
570 ssp_mat_shd.g_old_rec.mat_information24;
571 End If;
572 If (p_rec.mat_information25 = hr_api.g_varchar2) then
573 p_rec.mat_information25 :=
574 ssp_mat_shd.g_old_rec.mat_information25;
575 End If;
576 If (p_rec.mat_information26 = hr_api.g_varchar2) then
577 p_rec.mat_information26 :=
578 ssp_mat_shd.g_old_rec.mat_information26;
579 End If;
580 If (p_rec.mat_information27 = hr_api.g_varchar2) then
581 p_rec.mat_information27 :=
582 ssp_mat_shd.g_old_rec.mat_information27;
583 End If;
584 If (p_rec.mat_information28 = hr_api.g_varchar2) then
585 p_rec.mat_information28 :=
586 ssp_mat_shd.g_old_rec.mat_information28;
587 End If;
588 If (p_rec.mat_information29 = hr_api.g_varchar2) then
589 p_rec.mat_information29 :=
590 ssp_mat_shd.g_old_rec.mat_information29;
591 End If;
592 If (p_rec.mat_information30 = hr_api.g_varchar2) then
593 p_rec.mat_information30 :=
594 ssp_mat_shd.g_old_rec.mat_information30;
595 End If;
596
597 If (p_rec.partner_stat_pay_start_date = hr_api.g_date) then
598 p_rec.partner_stat_pay_start_date :=
599 ssp_mat_shd.g_old_rec.partner_stat_pay_start_date;
600 End If;
601 If (p_rec.partner_return_to_work = hr_api.g_date) then
602 p_rec.partner_return_to_work :=
603 ssp_mat_shd.g_old_rec.partner_return_to_work;
604 End If;
605 If (p_rec.partner_death_date = hr_api.g_date) then
606 p_rec.partner_death_date :=
607 ssp_mat_shd.g_old_rec.partner_death_date ;
608 End If;
609
610 --
611 hr_utility.set_location(' Leaving:'||l_proc, 10);
612 --
613 End convert_defs;
614 --
615 -- ----------------------------------------------------------------------------
616 -- |---------------------------------< upd >----------------------------------|
617 -- ----------------------------------------------------------------------------
618 Procedure upd
619 (
620 p_rec in out nocopy ssp_mat_shd.g_rec_type,
621 p_validate in boolean default false
622 ) is
623 --
624 l_proc varchar2(72) := g_package||'upd';
625 --
626 Begin
627 hr_utility.set_location('Entering:'||l_proc, 5);
628 --
629 -- Determine if the business process is to be validated.
630 --
631 If p_validate then
632 --
633 -- Issue the savepoint.
634 --
635 SAVEPOINT upd_ssp_mat;
636 End If;
637 --
638 -- We must lock the row which we need to update.
639 --
640 ssp_mat_shd.lck
641 (
642 p_rec.maternity_id,
643 p_rec.object_version_number
644 );
645 --
646 -- 1. During an update system defaults are used to determine if
647 -- arguments have been defaulted or not. We must therefore
648 -- derive the full record structure values to be updated.
649 --
650 -- 2. Call the supporting update validate operations.
651 --
652 convert_defs(p_rec);
653 ssp_mat_bus.update_validate(p_rec);
654 --
655 -- Call the supporting pre-update operation
656 --
657 pre_update(p_rec);
658 --
659 -- Update the row.
660 --
661 update_dml(p_rec);
662 --
663 -- Call the supporting post-update operation
664 --
665 post_update(p_rec);
666 --
667 -- If we are validating then raise the Validate_Enabled exception
668 --
669 If p_validate then
670 Raise HR_Api.Validate_Enabled;
671 End If;
672 --
673 hr_utility.set_location(' Leaving:'||l_proc, 10);
674 Exception
675 When HR_Api.Validate_Enabled Then
676 --
677 -- As the Validate_Enabled exception has been raised
678 -- we must rollback to the savepoint
679 --
680 ROLLBACK TO upd_ssp_mat;
681 End upd;
682 --
683 -- ----------------------------------------------------------------------------
684 -- |---------------------------------< upd >----------------------------------|
685 -- ----------------------------------------------------------------------------
686 Procedure upd
687 (
688 p_maternity_id in number,
689 p_object_version_number in out nocopy number,
690 p_due_date in date default hr_api.g_date,
691 p_start_date_SMA in date default hr_api.g_date,
692 p_notification_of_birth_date in date default hr_api.g_date,
693 p_unfit_for_scheduled_return in varchar2 default hr_api.g_varchar2,
694 p_stated_return_date in date default hr_api.g_date,
695 p_intend_to_return_flag in varchar2 default hr_api.g_varchar2,
696 p_start_date_with_new_employer in date default hr_api.g_date,
697 p_smp_must_be_paid_by_date in date default hr_api.g_date,
698 p_pay_smp_as_lump_sum in varchar2 default hr_api.g_varchar2,
699 p_live_birth_flag in varchar2 default hr_api.g_varchar2,
700 p_actual_birth_date in date default hr_api.g_date,
701 p_mpp_start_date in date default hr_api.g_date,
702 p_attribute_category in varchar2 default hr_api.g_varchar2,
703 p_attribute1 in varchar2 default hr_api.g_varchar2,
704 p_attribute2 in varchar2 default hr_api.g_varchar2,
705 p_attribute3 in varchar2 default hr_api.g_varchar2,
706 p_attribute4 in varchar2 default hr_api.g_varchar2,
707 p_attribute5 in varchar2 default hr_api.g_varchar2,
708 p_attribute6 in varchar2 default hr_api.g_varchar2,
709 p_attribute7 in varchar2 default hr_api.g_varchar2,
710 p_attribute8 in varchar2 default hr_api.g_varchar2,
711 p_attribute9 in varchar2 default hr_api.g_varchar2,
712 p_attribute10 in varchar2 default hr_api.g_varchar2,
713 p_attribute11 in varchar2 default hr_api.g_varchar2,
714 p_attribute12 in varchar2 default hr_api.g_varchar2,
715 p_attribute13 in varchar2 default hr_api.g_varchar2,
716 p_attribute14 in varchar2 default hr_api.g_varchar2,
717 p_attribute15 in varchar2 default hr_api.g_varchar2,
718 p_attribute16 in varchar2 default hr_api.g_varchar2,
719 p_attribute17 in varchar2 default hr_api.g_varchar2,
720 p_attribute18 in varchar2 default hr_api.g_varchar2,
721 p_attribute19 in varchar2 default hr_api.g_varchar2,
722 p_attribute20 in varchar2 default hr_api.g_varchar2,
723 p_LEAVE_TYPE in VARCHAR2 default 'MA',
724 p_MATCHING_DATE in DATE default hr_api.g_date,
725 p_PLACEMENT_DATE in DATE default hr_api.g_date,
726 p_DISRUPTED_PLACEMENT_DATE in DATE default hr_api.g_date,
727 p_validate in boolean default false,
728 p_mat_information_category in varchar2 default hr_api.g_varchar2,
729 p_mat_information1 in varchar2 default hr_api.g_varchar2,
730 p_mat_information2 in varchar2 default hr_api.g_varchar2,
731 p_mat_information3 in varchar2 default hr_api.g_varchar2,
732 p_mat_information4 in varchar2 default hr_api.g_varchar2,
733 p_mat_information5 in varchar2 default hr_api.g_varchar2,
734 p_mat_information6 in varchar2 default hr_api.g_varchar2,
735 p_mat_information7 in varchar2 default hr_api.g_varchar2,
736 p_mat_information8 in varchar2 default hr_api.g_varchar2,
737 p_mat_information9 in varchar2 default hr_api.g_varchar2,
738 p_mat_information10 in varchar2 default hr_api.g_varchar2,
739 p_mat_information11 in varchar2 default hr_api.g_varchar2,
740 p_mat_information12 in varchar2 default hr_api.g_varchar2,
741 p_mat_information13 in varchar2 default hr_api.g_varchar2,
742 p_mat_information14 in varchar2 default hr_api.g_varchar2,
743 p_mat_information15 in varchar2 default hr_api.g_varchar2,
744 p_mat_information16 in varchar2 default hr_api.g_varchar2,
745 p_mat_information17 in varchar2 default hr_api.g_varchar2,
746 p_mat_information18 in varchar2 default hr_api.g_varchar2,
747 p_mat_information19 in varchar2 default hr_api.g_varchar2,
748 p_mat_information20 in varchar2 default hr_api.g_varchar2,
749 p_mat_information21 in varchar2 default hr_api.g_varchar2,
750 p_mat_information22 in varchar2 default hr_api.g_varchar2,
751 p_mat_information23 in varchar2 default hr_api.g_varchar2,
752 p_mat_information24 in varchar2 default hr_api.g_varchar2,
753 p_mat_information25 in varchar2 default hr_api.g_varchar2,
754 p_mat_information26 in varchar2 default hr_api.g_varchar2,
755 p_mat_information27 in varchar2 default hr_api.g_varchar2,
756 p_mat_information28 in varchar2 default hr_api.g_varchar2,
757 p_mat_information29 in varchar2 default hr_api.g_varchar2,
758 p_mat_information30 in varchar2 default hr_api.g_varchar2,
759 p_partner_stat_pay_start_date in date default hr_api.g_date,
760 p_partner_return_to_work in date default hr_api.g_date,
761 p_partner_death_date in date default hr_api.g_date
762 ) is
763 --
764 l_rec ssp_mat_shd.g_rec_type;
765 l_proc varchar2(72) := g_package||'upd';
766 --
767 Begin
768 hr_utility.set_location('Entering:'||l_proc, 5);
769 --
770 -- Call conversion function to turn arguments into the
771 -- l_rec structure.
772 --
773 l_rec :=
774 ssp_mat_shd.convert_args
775 (
776 p_maternity_id,
777 p_due_date,
778 hr_api.g_number,
779 p_start_date_SMA,
780 p_notification_of_birth_date,
781 p_unfit_for_scheduled_return,
782 p_stated_return_date,
783 p_intend_to_return_flag,
784 p_start_date_with_new_employer,
785 p_smp_must_be_paid_by_date,
786 p_pay_smp_as_lump_sum,
787 p_live_birth_flag,
788 p_actual_birth_date,
789 p_mpp_start_date,
790 p_object_version_number,
791 p_attribute_category,
792 p_attribute1,
793 p_attribute2,
794 p_attribute3,
795 p_attribute4,
796 p_attribute5,
797 p_attribute6,
798 p_attribute7,
799 p_attribute8,
800 p_attribute9,
801 p_attribute10,
802 p_attribute11,
803 p_attribute12,
804 p_attribute13,
805 p_attribute14,
806 p_attribute15,
807 p_attribute16,
808 p_attribute17,
809 p_attribute18,
810 p_attribute19,
811 p_attribute20,
812 p_LEAVE_TYPE ,
813 p_MATCHING_DATE,
814 p_PLACEMENT_DATE ,
815 p_DISRUPTED_PLACEMENT_DATE,
816 p_mat_information_category,
817 p_mat_information1,
818 p_mat_information2,
819 p_mat_information3,
820 p_mat_information4,
821 p_mat_information5,
822 p_mat_information6,
823 p_mat_information7,
824 p_mat_information8,
825 p_mat_information9,
826 p_mat_information10,
827 p_mat_information11,
828 p_mat_information12,
829 p_mat_information13,
830 p_mat_information14,
831 p_mat_information15,
832 p_mat_information16,
833 p_mat_information17,
834 p_mat_information18,
835 p_mat_information19,
836 p_mat_information20,
837 p_mat_information21,
838 p_mat_information22,
839 p_mat_information23,
840 p_mat_information24,
841 p_mat_information25,
842 p_mat_information26,
843 p_mat_information27,
844 p_mat_information28,
845 p_mat_information29,
846 p_mat_information30,
847 p_partner_stat_pay_start_date ,
848 p_partner_return_to_work ,
849 p_partner_death_date
850 );
851 --
852 -- Having converted the arguments into the
853 -- plsql record structure we call the corresponding record
854 -- business process.
855 --
856 upd(l_rec, p_validate);
857 p_object_version_number := l_rec.object_version_number;
858 --
859 hr_utility.set_location(' Leaving:'||l_proc, 10);
860 End upd;
861 --
862 end ssp_mat_upd;