[Home] [Help]
PACKAGE BODY: APPS.PQH_ACC_UPD
Source
1 Package Body pqh_acc_upd as
2 /* $Header: pqaccrhi.pkb 115.4 2004/03/15 23:54:54 svorugan noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' pqh_acc_upd.'; -- Global package name
9 --
10 -- ----------------------------------------------------------------------------
11 -- |----------------------------< dt_update_dml >-----------------------------|
12 -- ----------------------------------------------------------------------------
13 -- {Start Of Comments}
14 --
15 -- Description:
16 -- This procedure controls the execution of dml from the datetrack mode
17 -- of CORRECTION only. It is important to note that the object version
18 -- number is only increment by 1 because the datetrack correction is
19 -- soley for one datetracked row.
20 -- This procedure controls the actual dml update logic. The functions of
21 -- this procedure are as follows:
22 -- 1) Get the next object_version_number.
23 -- 2) To set and unset the g_api_dml status as required (as we are about to
24 -- perform dml).
25 -- 3) To update the specified row in the schema using the primary key in
26 -- the predicates.
27 -- 4) To trap any constraint violations that may have occurred.
28 -- 5) To raise any other errors.
29 --
30 -- Prerequisites:
31 -- This is an internal private procedure which must be called from the
32 -- update_dml procedure.
33 --
34 -- In Parameters:
35 -- A Pl/Sql record structure.
36 --
37 -- Post Success:
38 -- The specified row will be updated in the schema.
39 --
40 -- Post Failure:
41 -- On the update dml failure it is important to note that we always reset the
42 -- g_api_dml status to false.
43 -- If a check or unique integrity constraint violation is raised the
44 -- constraint_error procedure will be called.
45 -- If any other error is reported, the error will be raised after the
46 -- g_api_dml status is reset.
47 --
48 -- Developer Implementation Notes:
49 -- The update 'set' arguments list should be modified if any of your
50 -- attributes are not updateable.
51 --
52 -- Access Status:
53 -- Internal Row Handler Use Only.
54 --
55 -- {End Of Comments}
56 -- ----------------------------------------------------------------------------
57 Procedure dt_update_dml
58 (p_rec in out nocopy pqh_acc_shd.g_rec_type
59 ,p_effective_date in date
60 ,p_datetrack_mode in varchar2
61 ,p_validation_start_date in date
62 ,p_validation_end_date in date
63 ) is
64 --
65 l_proc varchar2(72) := g_package||'dt_update_dml';
66 --
67 Begin
68 hr_utility.set_location('Entering:'||l_proc, 5);
69 --
70 If (p_datetrack_mode = hr_api.g_correction) then
71 hr_utility.set_location(l_proc, 10);
72 --
73 -- Because we are updating a row we must get the next object
74 -- version number.
75 --
76 p_rec.object_version_number :=
77 dt_api.get_object_version_number
78 (p_base_table_name => 'pqh_accommodations_f'
79 ,p_base_key_column => 'accommodation_id'
80 ,p_base_key_value => p_rec.accommodation_id
81 );
82 --
83 --
84 --
85 -- Update the pqh_accommodations_f Row
86 --
87 update pqh_accommodations_f
88 set
89 accommodation_id = p_rec.accommodation_id
90 ,accommodation_name = p_rec.accommodation_name
91 ,business_group_id = p_rec.business_group_id
92 ,location_id = p_rec.location_id
93 ,accommodation_desc = p_rec.accommodation_desc
94 ,accommodation_type = p_rec.accommodation_type
95 ,style = p_rec.style
96 ,address_line_1 = p_rec.address_line_1
97 ,address_line_2 = p_rec.address_line_2
98 ,address_line_3 = p_rec.address_line_3
99 ,town_or_city = p_rec.town_or_city
100 ,country = p_rec.country
101 ,postal_code = p_rec.postal_code
102 ,region_1 = p_rec.region_1
103 ,region_2 = p_rec.region_2
104 ,region_3 = p_rec.region_3
105 ,telephone_number_1 = p_rec.telephone_number_1
106 ,telephone_number_2 = p_rec.telephone_number_2
107 ,telephone_number_3 = p_rec.telephone_number_3
108 ,floor_number = p_rec.floor_number
109 ,floor_area = p_rec.floor_area
110 ,floor_area_measure_unit = p_rec.floor_area_measure_unit
111 ,main_rooms = p_rec.main_rooms
112 ,family_size = p_rec.family_size
113 ,suitability_disabled = p_rec.suitability_disabled
114 ,rental_value = p_rec.rental_value
115 ,rental_value_currency = p_rec.rental_value_currency
116 ,owner = p_rec.owner
117 ,comments = p_rec.comments
118 ,information_category = p_rec.information_category
119 ,information1 = p_rec.information1
120 ,information2 = p_rec.information2
121 ,information3 = p_rec.information3
122 ,information4 = p_rec.information4
123 ,information5 = p_rec.information5
124 ,information6 = p_rec.information6
125 ,information7 = p_rec.information7
126 ,information8 = p_rec.information8
127 ,information9 = p_rec.information9
128 ,information10 = p_rec.information10
129 ,information11 = p_rec.information11
130 ,information12 = p_rec.information12
131 ,information13 = p_rec.information13
132 ,information14 = p_rec.information14
133 ,information15 = p_rec.information15
134 ,information16 = p_rec.information16
135 ,information17 = p_rec.information17
136 ,information18 = p_rec.information18
137 ,information19 = p_rec.information19
138 ,information20 = p_rec.information20
139 ,information21 = p_rec.information21
140 ,information22 = p_rec.information22
141 ,information23 = p_rec.information23
142 ,information24 = p_rec.information24
143 ,information25 = p_rec.information25
144 ,information26 = p_rec.information26
145 ,information27 = p_rec.information27
146 ,information28 = p_rec.information28
147 ,information29 = p_rec.information29
148 ,information30 = p_rec.information30
149 ,attribute_category = p_rec.attribute_category
150 ,attribute1 = p_rec.attribute1
151 ,attribute2 = p_rec.attribute2
152 ,attribute3 = p_rec.attribute3
153 ,attribute4 = p_rec.attribute4
154 ,attribute5 = p_rec.attribute5
155 ,attribute6 = p_rec.attribute6
156 ,attribute7 = p_rec.attribute7
157 ,attribute8 = p_rec.attribute8
158 ,attribute9 = p_rec.attribute9
159 ,attribute10 = p_rec.attribute10
160 ,attribute11 = p_rec.attribute11
161 ,attribute12 = p_rec.attribute12
162 ,attribute13 = p_rec.attribute13
163 ,attribute14 = p_rec.attribute14
164 ,attribute15 = p_rec.attribute15
165 ,attribute16 = p_rec.attribute16
166 ,attribute17 = p_rec.attribute17
167 ,attribute18 = p_rec.attribute18
168 ,attribute19 = p_rec.attribute19
169 ,attribute20 = p_rec.attribute20
170 ,attribute21 = p_rec.attribute21
171 ,attribute22 = p_rec.attribute22
172 ,attribute23 = p_rec.attribute23
173 ,attribute24 = p_rec.attribute24
174 ,attribute25 = p_rec.attribute25
175 ,attribute26 = p_rec.attribute26
176 ,attribute27 = p_rec.attribute27
177 ,attribute28 = p_rec.attribute28
178 ,attribute29 = p_rec.attribute29
179 ,attribute30 = p_rec.attribute30
180 ,object_version_number = p_rec.object_version_number
181 where accommodation_id = p_rec.accommodation_id
182 and effective_start_date = p_validation_start_date
183 and effective_end_date = p_validation_end_date;
184 --
185 --
186 --
187 -- Set the effective start and end dates
188 --
189 p_rec.effective_start_date := p_validation_start_date;
190 p_rec.effective_end_date := p_validation_end_date;
191 End If;
192 --
193 hr_utility.set_location(' Leaving:'||l_proc, 15);
194 Exception
195 When hr_api.check_integrity_violated Then
196 -- A check constraint has been violated
197 --
198 pqh_acc_shd.constraint_error
199 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
200 When hr_api.unique_integrity_violated Then
201 -- Unique integrity has been violated
202 --
203 pqh_acc_shd.constraint_error
204 (p_constraint_name => hr_api.strip_constraint_name(SQLERRM));
205 When Others Then
206 --
207 Raise;
208 End dt_update_dml;
209 --
210 -- ----------------------------------------------------------------------------
211 -- |------------------------------< update_dml >------------------------------|
212 -- ----------------------------------------------------------------------------
213 -- {Start Of Comments}
214 --
215 -- Description:
216 -- This procedure calls the dt_update_dml control logic which handles
217 -- the actual datetrack dml.
218 --
219 -- Prerequisites:
220 -- This is an internal private procedure which must be called from the upd
221 -- procedure.
222 --
223 -- In Parameters:
224 -- A Pl/Sql record structre.
225 --
226 -- Post Success:
227 -- Processing contines.
228 --
229 -- Post Failure:
230 -- No specific error handling is required within this procedure.
231 --
232 -- Developer Implementation Notes:
233 -- The update 'set' arguments list should be modified if any of your
234 -- attributes are not updateable.
235 --
236 -- Access Status:
237 -- Internal Row Handler Use Only.
238 --
239 -- {End Of Comments}
240 -- ----------------------------------------------------------------------------
241 Procedure update_dml
242 (p_rec in out nocopy pqh_acc_shd.g_rec_type
243 ,p_effective_date in date
244 ,p_datetrack_mode in varchar2
245 ,p_validation_start_date in date
246 ,p_validation_end_date in date
247 ) is
248 --
249 l_proc varchar2(72) := g_package||'update_dml';
250 --
251 Begin
252 hr_utility.set_location('Entering:'||l_proc, 5);
253 --
254 pqh_acc_upd.dt_update_dml
255 (p_rec => p_rec
256 ,p_effective_date => p_effective_date
257 ,p_datetrack_mode => p_datetrack_mode
258 ,p_validation_start_date => p_validation_start_date
259 ,p_validation_end_date => p_validation_end_date
260 );
261 --
262 hr_utility.set_location(' Leaving:'||l_proc, 10);
263 End update_dml;
264 --
265 -- ----------------------------------------------------------------------------
266 -- |----------------------------< dt_pre_update >-----------------------------|
267 -- ----------------------------------------------------------------------------
268 -- {Start Of Comments}
269 --
270 -- Description:
271 -- The dt_pre_update procedure controls the execution
272 -- of dml for the datetrack modes of: UPDATE, UPDATE_OVERRIDE
273 -- and UPDATE_CHANGE_INSERT only. The execution required is as
274 -- follows:
275 --
276 -- 1) Providing the datetrack update mode is not 'CORRECTION'
277 -- then set the effective end date of the current row (this
278 -- will be the validation_start_date - 1).
279 -- 2) If the datetrack mode is 'UPDATE_OVERRIDE' then call the
280 -- corresponding delete_dml process to delete any future rows
281 -- where the effective_start_date is greater than or equal to
282 -- the validation_start_date.
283 -- 3) Call the insert_dml process to insert the new updated row
284 -- details.
285 --
286 -- Prerequisites:
287 -- This is an internal procedure which is called from the
288 -- pre_update procedure.
289 --
290 -- In Parameters:
291 --
292 -- Post Success:
293 -- Processing continues.
294 --
295 -- Post Failure:
296 -- If an error has occurred, an error message and exception will be raised
297 -- but not handled.
298 --
299 -- Developer Implementation Notes:
300 -- This is an internal procedure which is required by Datetrack. Don't
301 -- remove or modify.
302 --
303 -- Access Status:
304 -- Internal Row Handler Use Only.
305 --
306 -- {End Of Comments}
307 -- ----------------------------------------------------------------------------
308 Procedure dt_pre_update
309 (p_rec in out nocopy pqh_acc_shd.g_rec_type
310 ,p_effective_date in date
311 ,p_datetrack_mode in varchar2
312 ,p_validation_start_date in date
313 ,p_validation_end_date in date
314 ) is
315 --
316 l_proc varchar2(72) := g_package||'dt_pre_update';
317 l_dummy_version_number number;
318 --
319 Begin
320 hr_utility.set_location('Entering:'||l_proc, 5);
321 If (p_datetrack_mode <> hr_api.g_correction) then
322 --
323 -- Update the current effective end date
324 --
325 pqh_acc_shd.upd_effective_end_date
326 (p_effective_date => p_effective_date
327 ,p_base_key_value => p_rec.accommodation_id
328 ,p_new_effective_end_date => (p_validation_start_date - 1)
329 ,p_validation_start_date => p_validation_start_date
330 ,p_validation_end_date => p_validation_end_date
331 ,p_object_version_number => l_dummy_version_number
332 );
333 --
334 If (p_datetrack_mode = hr_api.g_update_override) then
335 --
336 -- As the datetrack mode is 'UPDATE_OVERRIDE' then we must
337 -- delete any future rows
338 --
339 pqh_acc_del.delete_dml
340 (p_rec => p_rec
341 ,p_effective_date => p_effective_date
342 ,p_datetrack_mode => p_datetrack_mode
343 ,p_validation_start_date => p_validation_start_date
344 ,p_validation_end_date => p_validation_end_date
345 );
346 End If;
347 --
348 -- We must now insert the updated row
349 --
350 pqh_acc_ins.insert_dml
351 (p_rec => p_rec
352 ,p_effective_date => p_effective_date
353 ,p_datetrack_mode => p_datetrack_mode
354 ,p_validation_start_date => p_validation_start_date
355 ,p_validation_end_date => p_validation_end_date
356 );
357 End If;
358 hr_utility.set_location(' Leaving:'||l_proc, 20);
359 End dt_pre_update;
360 --
361 -- ----------------------------------------------------------------------------
362 -- |------------------------------< pre_update >------------------------------|
363 -- ----------------------------------------------------------------------------
364 -- {Start Of Comments}
365 --
366 -- Description:
367 -- This private procedure contains any processing which is required before
368 -- the update dml.
369 --
370 -- Prerequisites:
371 -- This is an internal procedure which is called from the upd procedure.
372 --
373 -- In Parameters:
374 -- A Pl/Sql record structure.
375 --
376 -- Post Success:
377 -- Processing continues.
378 --
379 -- Post Failure:
380 -- If an error has occurred, an error message and exception will be raised
381 -- but not handled.
382 -- Developer Implementation Notes:
383 -- Any pre-processing required before the update dml is issued should be
384 -- coded within this procedure. It is important to note that any 3rd party
385 -- maintenance should be reviewed before placing in this procedure. The call
386 -- to the dt_update_dml procedure should NOT be removed.
387 --
388 -- Access Status:
389 -- Internal Row Handler Use Only.
390 --
391 -- {End Of Comments}
392 -- ----------------------------------------------------------------------------
393 Procedure pre_update
394 (p_rec in out nocopy pqh_acc_shd.g_rec_type
395 ,p_effective_date in date
396 ,p_datetrack_mode in varchar2
397 ,p_validation_start_date in date
398 ,p_validation_end_date in date
399 ) is
400 --
401 l_proc varchar2(72) := g_package||'pre_update';
402 --
403 Begin
404 hr_utility.set_location('Entering:'||l_proc, 5);
405 --
406 --
407 --
408 dt_pre_update
409 (p_rec => p_rec
410 ,p_effective_date => p_effective_date
411 ,p_datetrack_mode => p_datetrack_mode
412 ,p_validation_start_date => p_validation_start_date
413 ,p_validation_end_date => p_validation_end_date
414 );
415 --
416 hr_utility.set_location(' Leaving:'||l_proc, 10);
417 End pre_update;
418 --
419 -- ----------------------------------------------------------------------------
420 -- |----------------------------< post_update >-------------------------------|
421 -- ----------------------------------------------------------------------------
422 -- {Start Of Comments}
423 --
424 -- Description:
425 -- This private procedure contains any processing which is required after
426 -- the update dml.
427 --
428 -- Prerequisites:
429 -- This is an internal procedure which is called from the upd procedure.
430 --
431 -- In Parameters:
432 -- A Pl/Sql record structure.
433 --
434 -- Post Success:
435 -- Processing continues.
436 --
437 -- Post Failure:
438 -- If an error has occurred, an error message and exception will be raised
439 -- but not handled.
440 --
441 -- Developer Implementation Notes:
442 -- Any post-processing required after the update dml is issued should be
443 -- coded within this procedure. It is important to note that any 3rd party
444 -- maintenance should be reviewed before placing in this procedure.
445 --
446 -- Access Status:
447 -- Internal Row Handler Use Only.
448 --
449 -- {End Of Comments}
450 -- ----------------------------------------------------------------------------
451 Procedure post_update
452 (p_rec in pqh_acc_shd.g_rec_type
453 ,p_effective_date in date
454 ,p_datetrack_mode in varchar2
455 ,p_validation_start_date in date
456 ,p_validation_end_date in date
457 ) is
458 --
459 l_proc varchar2(72) := g_package||'post_update';
460 --
461 Begin
462 hr_utility.set_location('Entering:'||l_proc, 5);
463 begin
464 --
465 pqh_acc_rku.after_update
466 (p_effective_date
467 => p_effective_date
468 ,p_datetrack_mode
469 => p_datetrack_mode
470 ,p_validation_start_date
471 => p_validation_start_date
472 ,p_validation_end_date
473 => p_validation_end_date
474 ,p_accommodation_id
475 => p_rec.accommodation_id
476 ,p_accommodation_name
477 => p_rec.accommodation_name
478 ,p_effective_start_date
479 => p_rec.effective_start_date
480 ,p_effective_end_date
481 => p_rec.effective_end_date
482 ,p_business_group_id
483 => p_rec.business_group_id
484 ,p_location_id
485 => p_rec.location_id
486 ,p_accommodation_desc
487 => p_rec.accommodation_desc
488 ,p_accommodation_type
489 => p_rec.accommodation_type
490 ,p_style
491 => p_rec.style
492 ,p_address_line_1
493 => p_rec.address_line_1
494 ,p_address_line_2
495 => p_rec.address_line_2
496 ,p_address_line_3
497 => p_rec.address_line_3
498 ,p_town_or_city
499 => p_rec.town_or_city
500 ,p_country
501 => p_rec.country
502 ,p_postal_code
503 => p_rec.postal_code
504 ,p_region_1
505 => p_rec.region_1
506 ,p_region_2
507 => p_rec.region_2
508 ,p_region_3
509 => p_rec.region_3
510 ,p_telephone_number_1
511 => p_rec.telephone_number_1
512 ,p_telephone_number_2
513 => p_rec.telephone_number_2
514 ,p_telephone_number_3
515 => p_rec.telephone_number_3
516 ,p_floor_number
517 => p_rec.floor_number
518 ,p_floor_area
519 => p_rec.floor_area
520 ,p_floor_area_measure_unit
521 => p_rec.floor_area_measure_unit
522 ,p_main_rooms
523 => p_rec.main_rooms
524 ,p_family_size
525 => p_rec.family_size
526 ,p_suitability_disabled
527 => p_rec.suitability_disabled
528 ,p_rental_value
529 => p_rec.rental_value
530 ,p_rental_value_currency
531 => p_rec.rental_value_currency
532 ,p_owner
533 => p_rec.owner
534 ,p_comments
535 => p_rec.comments
536 ,p_information_category
537 => p_rec.information_category
538 ,p_information1
539 => p_rec.information1
540 ,p_information2
541 => p_rec.information2
542 ,p_information3
543 => p_rec.information3
544 ,p_information4
545 => p_rec.information4
546 ,p_information5
547 => p_rec.information5
548 ,p_information6
549 => p_rec.information6
550 ,p_information7
551 => p_rec.information7
552 ,p_information8
553 => p_rec.information8
554 ,p_information9
555 => p_rec.information9
556 ,p_information10
557 => p_rec.information10
558 ,p_information11
559 => p_rec.information11
560 ,p_information12
561 => p_rec.information12
562 ,p_information13
563 => p_rec.information13
564 ,p_information14
565 => p_rec.information14
566 ,p_information15
567 => p_rec.information15
568 ,p_information16
569 => p_rec.information16
570 ,p_information17
571 => p_rec.information17
572 ,p_information18
573 => p_rec.information18
574 ,p_information19
575 => p_rec.information19
576 ,p_information20
577 => p_rec.information20
578 ,p_information21
579 => p_rec.information21
580 ,p_information22
581 => p_rec.information22
582 ,p_information23
583 => p_rec.information23
584 ,p_information24
585 => p_rec.information24
586 ,p_information25
587 => p_rec.information25
588 ,p_information26
589 => p_rec.information26
590 ,p_information27
591 => p_rec.information27
592 ,p_information28
593 => p_rec.information28
594 ,p_information29
595 => p_rec.information29
596 ,p_information30
597 => p_rec.information30
598 ,p_attribute_category
599 => p_rec.attribute_category
600 ,p_attribute1
601 => p_rec.attribute1
602 ,p_attribute2
603 => p_rec.attribute2
604 ,p_attribute3
605 => p_rec.attribute3
606 ,p_attribute4
607 => p_rec.attribute4
608 ,p_attribute5
609 => p_rec.attribute5
610 ,p_attribute6
611 => p_rec.attribute6
612 ,p_attribute7
613 => p_rec.attribute7
614 ,p_attribute8
615 => p_rec.attribute8
616 ,p_attribute9
617 => p_rec.attribute9
618 ,p_attribute10
619 => p_rec.attribute10
620 ,p_attribute11
621 => p_rec.attribute11
622 ,p_attribute12
623 => p_rec.attribute12
624 ,p_attribute13
625 => p_rec.attribute13
626 ,p_attribute14
627 => p_rec.attribute14
628 ,p_attribute15
629 => p_rec.attribute15
630 ,p_attribute16
631 => p_rec.attribute16
632 ,p_attribute17
633 => p_rec.attribute17
634 ,p_attribute18
635 => p_rec.attribute18
636 ,p_attribute19
637 => p_rec.attribute19
638 ,p_attribute20
639 => p_rec.attribute20
640 ,p_attribute21
641 => p_rec.attribute21
642 ,p_attribute22
643 => p_rec.attribute22
644 ,p_attribute23
645 => p_rec.attribute23
646 ,p_attribute24
647 => p_rec.attribute24
648 ,p_attribute25
649 => p_rec.attribute25
650 ,p_attribute26
651 => p_rec.attribute26
652 ,p_attribute27
653 => p_rec.attribute27
654 ,p_attribute28
655 => p_rec.attribute28
656 ,p_attribute29
657 => p_rec.attribute29
658 ,p_attribute30
659 => p_rec.attribute30
660 ,p_object_version_number
661 => p_rec.object_version_number
662 ,p_accommodation_name_o
663 => pqh_acc_shd.g_old_rec.accommodation_name
664 ,p_effective_start_date_o
665 => pqh_acc_shd.g_old_rec.effective_start_date
666 ,p_effective_end_date_o
667 => pqh_acc_shd.g_old_rec.effective_end_date
668 ,p_business_group_id_o
669 => pqh_acc_shd.g_old_rec.business_group_id
670 ,p_location_id_o
671 => pqh_acc_shd.g_old_rec.location_id
672 ,p_accommodation_desc_o
673 => pqh_acc_shd.g_old_rec.accommodation_desc
674 ,p_accommodation_type_o
675 => pqh_acc_shd.g_old_rec.accommodation_type
676 ,p_style_o
677 => pqh_acc_shd.g_old_rec.style
678 ,p_address_line_1_o
679 => pqh_acc_shd.g_old_rec.address_line_1
680 ,p_address_line_2_o
681 => pqh_acc_shd.g_old_rec.address_line_2
682 ,p_address_line_3_o
683 => pqh_acc_shd.g_old_rec.address_line_3
684 ,p_town_or_city_o
685 => pqh_acc_shd.g_old_rec.town_or_city
686 ,p_country_o
687 => pqh_acc_shd.g_old_rec.country
688 ,p_postal_code_o
689 => pqh_acc_shd.g_old_rec.postal_code
690 ,p_region_1_o
691 => pqh_acc_shd.g_old_rec.region_1
692 ,p_region_2_o
693 => pqh_acc_shd.g_old_rec.region_2
694 ,p_region_3_o
695 => pqh_acc_shd.g_old_rec.region_3
696 ,p_telephone_number_1_o
697 => pqh_acc_shd.g_old_rec.telephone_number_1
698 ,p_telephone_number_2_o
699 => pqh_acc_shd.g_old_rec.telephone_number_2
700 ,p_telephone_number_3_o
701 => pqh_acc_shd.g_old_rec.telephone_number_3
702 ,p_floor_number_o
703 => pqh_acc_shd.g_old_rec.floor_number
704 ,p_floor_area_o
705 => pqh_acc_shd.g_old_rec.floor_area
706 ,p_floor_area_measure_unit_o
707 => pqh_acc_shd.g_old_rec.floor_area_measure_unit
708 ,p_main_rooms_o
709 => pqh_acc_shd.g_old_rec.main_rooms
710 ,p_family_size_o
711 => pqh_acc_shd.g_old_rec.family_size
712 ,p_suitability_disabled_o
713 => pqh_acc_shd.g_old_rec.suitability_disabled
714 ,p_rental_value_o
715 => pqh_acc_shd.g_old_rec.rental_value
716 ,p_rental_value_currency_o
717 => pqh_acc_shd.g_old_rec.rental_value_currency
718 ,p_owner_o
719 => pqh_acc_shd.g_old_rec.owner
720 ,p_comments_o
721 => pqh_acc_shd.g_old_rec.comments
722 ,p_information_category_o
723 => pqh_acc_shd.g_old_rec.information_category
724 ,p_information1_o
725 => pqh_acc_shd.g_old_rec.information1
726 ,p_information2_o
727 => pqh_acc_shd.g_old_rec.information2
728 ,p_information3_o
729 => pqh_acc_shd.g_old_rec.information3
730 ,p_information4_o
731 => pqh_acc_shd.g_old_rec.information4
732 ,p_information5_o
733 => pqh_acc_shd.g_old_rec.information5
734 ,p_information6_o
735 => pqh_acc_shd.g_old_rec.information6
736 ,p_information7_o
737 => pqh_acc_shd.g_old_rec.information7
738 ,p_information8_o
739 => pqh_acc_shd.g_old_rec.information8
740 ,p_information9_o
741 => pqh_acc_shd.g_old_rec.information9
742 ,p_information10_o
743 => pqh_acc_shd.g_old_rec.information10
744 ,p_information11_o
745 => pqh_acc_shd.g_old_rec.information11
746 ,p_information12_o
747 => pqh_acc_shd.g_old_rec.information12
748 ,p_information13_o
749 => pqh_acc_shd.g_old_rec.information13
750 ,p_information14_o
751 => pqh_acc_shd.g_old_rec.information14
752 ,p_information15_o
753 => pqh_acc_shd.g_old_rec.information15
754 ,p_information16_o
755 => pqh_acc_shd.g_old_rec.information16
756 ,p_information17_o
757 => pqh_acc_shd.g_old_rec.information17
758 ,p_information18_o
759 => pqh_acc_shd.g_old_rec.information18
760 ,p_information19_o
761 => pqh_acc_shd.g_old_rec.information19
762 ,p_information20_o
763 => pqh_acc_shd.g_old_rec.information20
764 ,p_information21_o
765 => pqh_acc_shd.g_old_rec.information21
766 ,p_information22_o
767 => pqh_acc_shd.g_old_rec.information22
768 ,p_information23_o
769 => pqh_acc_shd.g_old_rec.information23
770 ,p_information24_o
771 => pqh_acc_shd.g_old_rec.information24
772 ,p_information25_o
773 => pqh_acc_shd.g_old_rec.information25
774 ,p_information26_o
775 => pqh_acc_shd.g_old_rec.information26
776 ,p_information27_o
777 => pqh_acc_shd.g_old_rec.information27
778 ,p_information28_o
779 => pqh_acc_shd.g_old_rec.information28
780 ,p_information29_o
781 => pqh_acc_shd.g_old_rec.information29
782 ,p_information30_o
783 => pqh_acc_shd.g_old_rec.information30
784 ,p_attribute_category_o
785 => pqh_acc_shd.g_old_rec.attribute_category
786 ,p_attribute1_o
787 => pqh_acc_shd.g_old_rec.attribute1
788 ,p_attribute2_o
789 => pqh_acc_shd.g_old_rec.attribute2
790 ,p_attribute3_o
791 => pqh_acc_shd.g_old_rec.attribute3
792 ,p_attribute4_o
793 => pqh_acc_shd.g_old_rec.attribute4
794 ,p_attribute5_o
795 => pqh_acc_shd.g_old_rec.attribute5
796 ,p_attribute6_o
797 => pqh_acc_shd.g_old_rec.attribute6
798 ,p_attribute7_o
799 => pqh_acc_shd.g_old_rec.attribute7
800 ,p_attribute8_o
801 => pqh_acc_shd.g_old_rec.attribute8
802 ,p_attribute9_o
803 => pqh_acc_shd.g_old_rec.attribute9
804 ,p_attribute10_o
805 => pqh_acc_shd.g_old_rec.attribute10
806 ,p_attribute11_o
807 => pqh_acc_shd.g_old_rec.attribute11
808 ,p_attribute12_o
809 => pqh_acc_shd.g_old_rec.attribute12
810 ,p_attribute13_o
811 => pqh_acc_shd.g_old_rec.attribute13
812 ,p_attribute14_o
813 => pqh_acc_shd.g_old_rec.attribute14
814 ,p_attribute15_o
815 => pqh_acc_shd.g_old_rec.attribute15
816 ,p_attribute16_o
817 => pqh_acc_shd.g_old_rec.attribute16
818 ,p_attribute17_o
819 => pqh_acc_shd.g_old_rec.attribute17
820 ,p_attribute18_o
821 => pqh_acc_shd.g_old_rec.attribute18
822 ,p_attribute19_o
823 => pqh_acc_shd.g_old_rec.attribute19
824 ,p_attribute20_o
825 => pqh_acc_shd.g_old_rec.attribute20
826 ,p_attribute21_o
827 => pqh_acc_shd.g_old_rec.attribute21
828 ,p_attribute22_o
829 => pqh_acc_shd.g_old_rec.attribute22
830 ,p_attribute23_o
831 => pqh_acc_shd.g_old_rec.attribute23
832 ,p_attribute24_o
833 => pqh_acc_shd.g_old_rec.attribute24
834 ,p_attribute25_o
835 => pqh_acc_shd.g_old_rec.attribute25
836 ,p_attribute26_o
837 => pqh_acc_shd.g_old_rec.attribute26
838 ,p_attribute27_o
839 => pqh_acc_shd.g_old_rec.attribute27
840 ,p_attribute28_o
841 => pqh_acc_shd.g_old_rec.attribute28
842 ,p_attribute29_o
843 => pqh_acc_shd.g_old_rec.attribute29
844 ,p_attribute30_o
845 => pqh_acc_shd.g_old_rec.attribute30
846 ,p_object_version_number_o
847 => pqh_acc_shd.g_old_rec.object_version_number
848 );
849 --
850 exception
851 --
852 when hr_api.cannot_find_prog_unit then
853 --
854 hr_api.cannot_find_prog_unit_error
855 (p_module_name => 'PQH_ACCOMMODATIONS_F'
856 ,p_hook_type => 'AU');
857 --
858 end;
859 --
860 hr_utility.set_location(' Leaving:'||l_proc, 10);
861 End post_update;
862 --
863 -- ----------------------------------------------------------------------------
864 -- |-----------------------------< convert_defs >-----------------------------|
865 -- ----------------------------------------------------------------------------
866 -- {Start Of Comments}
867 --
868 -- Description:
869 -- The Convert_Defs procedure has one very important function:
870 -- It must return the record structure for the row with all system defaulted
871 -- values converted into its corresponding parameter value for update. When
872 -- we attempt to update a row through the Upd process , certain
873 -- parameters can be defaulted which enables flexibility in the calling of
874 -- the upd process (e.g. only attributes which need to be updated need to be
875 -- specified). For the upd process to determine which attributes
876 -- have NOT been specified we need to check if the parameter has a reserved
877 -- system default value. Therefore, for all parameters which have a
878 -- corresponding reserved system default mechanism specified we need to
879 -- check if a system default is being used. If a system default is being
880 -- used then we convert the defaulted value into its corresponding attribute
881 -- value held in the g_old_rec data structure.
882 --
883 -- Prerequisites:
884 -- This private function can only be called from the upd process.
885 --
886 -- In Parameters:
887 -- A Pl/Sql record structure.
888 --
889 -- Post Success:
890 -- The record structure will be returned with all system defaulted parameter
891 -- values converted into its current row attribute value.
892 --
893 -- Post Failure:
894 -- No direct error handling is required within this function. Any possible
895 -- errors within this procedure will be a PL/SQL value error due to
896 -- conversion of datatypes or data lengths.
897 --
898 -- Developer Implementation Notes:
899 -- None.
900 --
901 -- Access Status:
902 -- Internal Row Handler Use Only.
903 --
904 -- {End Of Comments}
905 -- ----------------------------------------------------------------------------
906 Procedure convert_defs
907 (p_rec in out nocopy pqh_acc_shd.g_rec_type
908 ) is
909 --
910 Begin
911 --
912 -- We must now examine each argument value in the
913 -- p_rec plsql record structure
914 -- to see if a system default is being used. If a system default
915 -- is being used then we must set to the 'current' argument value.
916 --
917 If (p_rec.accommodation_name = hr_api.g_varchar2) then
918 p_rec.accommodation_name :=
919 pqh_acc_shd.g_old_rec.accommodation_name;
920 End If;
921 If (p_rec.business_group_id = hr_api.g_number) then
922 p_rec.business_group_id :=
923 pqh_acc_shd.g_old_rec.business_group_id;
924 End If;
925 If (p_rec.location_id = hr_api.g_number) then
926 p_rec.location_id :=
927 pqh_acc_shd.g_old_rec.location_id;
928 End If;
929 If (p_rec.accommodation_desc = hr_api.g_varchar2) then
930 p_rec.accommodation_desc :=
931 pqh_acc_shd.g_old_rec.accommodation_desc;
932 End If;
933 If (p_rec.accommodation_type = hr_api.g_varchar2) then
934 p_rec.accommodation_type :=
935 pqh_acc_shd.g_old_rec.accommodation_type;
936 End If;
937 If (p_rec.style = hr_api.g_varchar2) then
938 p_rec.style :=
939 pqh_acc_shd.g_old_rec.style;
940 End If;
941 If (p_rec.address_line_1 = hr_api.g_varchar2) then
942 p_rec.address_line_1 :=
943 pqh_acc_shd.g_old_rec.address_line_1;
944 End If;
945 If (p_rec.address_line_2 = hr_api.g_varchar2) then
946 p_rec.address_line_2 :=
947 pqh_acc_shd.g_old_rec.address_line_2;
948 End If;
949 If (p_rec.address_line_3 = hr_api.g_varchar2) then
950 p_rec.address_line_3 :=
951 pqh_acc_shd.g_old_rec.address_line_3;
952 End If;
953 If (p_rec.town_or_city = hr_api.g_varchar2) then
954 p_rec.town_or_city :=
955 pqh_acc_shd.g_old_rec.town_or_city;
956 End If;
957 If (p_rec.country = hr_api.g_varchar2) then
958 p_rec.country :=
959 pqh_acc_shd.g_old_rec.country;
960 End If;
961 If (p_rec.postal_code = hr_api.g_varchar2) then
962 p_rec.postal_code :=
963 pqh_acc_shd.g_old_rec.postal_code;
964 End If;
965 If (p_rec.region_1 = hr_api.g_varchar2) then
966 p_rec.region_1 :=
967 pqh_acc_shd.g_old_rec.region_1;
968 End If;
969 If (p_rec.region_2 = hr_api.g_varchar2) then
970 p_rec.region_2 :=
971 pqh_acc_shd.g_old_rec.region_2;
972 End If;
973 If (p_rec.region_3 = hr_api.g_varchar2) then
974 p_rec.region_3 :=
975 pqh_acc_shd.g_old_rec.region_3;
976 End If;
977 If (p_rec.telephone_number_1 = hr_api.g_varchar2) then
978 p_rec.telephone_number_1 :=
979 pqh_acc_shd.g_old_rec.telephone_number_1;
980 End If;
981 If (p_rec.telephone_number_2 = hr_api.g_varchar2) then
982 p_rec.telephone_number_2 :=
983 pqh_acc_shd.g_old_rec.telephone_number_2;
984 End If;
985 If (p_rec.telephone_number_3 = hr_api.g_varchar2) then
986 p_rec.telephone_number_3 :=
987 pqh_acc_shd.g_old_rec.telephone_number_3;
988 End If;
989 If (p_rec.floor_number = hr_api.g_varchar2) then
990 p_rec.floor_number :=
991 pqh_acc_shd.g_old_rec.floor_number;
992 End If;
993 If (p_rec.floor_area = hr_api.g_number) then
994 p_rec.floor_area :=
995 pqh_acc_shd.g_old_rec.floor_area;
996 End If;
997 If (p_rec.floor_area_measure_unit = hr_api.g_varchar2) then
998 p_rec.floor_area_measure_unit :=
999 pqh_acc_shd.g_old_rec.floor_area_measure_unit;
1000 End If;
1001 If (p_rec.main_rooms = hr_api.g_number) then
1002 p_rec.main_rooms :=
1003 pqh_acc_shd.g_old_rec.main_rooms;
1004 End If;
1005 If (p_rec.family_size = hr_api.g_number) then
1006 p_rec.family_size :=
1007 pqh_acc_shd.g_old_rec.family_size;
1008 End If;
1009 If (p_rec.suitability_disabled = hr_api.g_varchar2) then
1010 p_rec.suitability_disabled :=
1011 pqh_acc_shd.g_old_rec.suitability_disabled;
1012 End If;
1013 If (p_rec.rental_value = hr_api.g_number) then
1014 p_rec.rental_value :=
1015 pqh_acc_shd.g_old_rec.rental_value;
1016 End If;
1017 If (p_rec.rental_value_currency = hr_api.g_varchar2) then
1018 p_rec.rental_value_currency :=
1019 pqh_acc_shd.g_old_rec.rental_value_currency;
1020 End If;
1021 If (p_rec.owner = hr_api.g_varchar2) then
1022 p_rec.owner :=
1023 pqh_acc_shd.g_old_rec.owner;
1024 End If;
1025 If (p_rec.comments = hr_api.g_varchar2) then
1026 p_rec.comments :=
1027 pqh_acc_shd.g_old_rec.comments;
1028 End If;
1029 If (p_rec.information_category = hr_api.g_varchar2) then
1030 p_rec.information_category :=
1031 pqh_acc_shd.g_old_rec.information_category;
1032 End If;
1033 If (p_rec.information1 = hr_api.g_varchar2) then
1034 p_rec.information1 :=
1035 pqh_acc_shd.g_old_rec.information1;
1036 End If;
1037 If (p_rec.information2 = hr_api.g_varchar2) then
1038 p_rec.information2 :=
1039 pqh_acc_shd.g_old_rec.information2;
1040 End If;
1041 If (p_rec.information3 = hr_api.g_varchar2) then
1042 p_rec.information3 :=
1043 pqh_acc_shd.g_old_rec.information3;
1044 End If;
1045 If (p_rec.information4 = hr_api.g_varchar2) then
1046 p_rec.information4 :=
1047 pqh_acc_shd.g_old_rec.information4;
1048 End If;
1049 If (p_rec.information5 = hr_api.g_varchar2) then
1050 p_rec.information5 :=
1051 pqh_acc_shd.g_old_rec.information5;
1052 End If;
1053 If (p_rec.information6 = hr_api.g_varchar2) then
1054 p_rec.information6 :=
1055 pqh_acc_shd.g_old_rec.information6;
1056 End If;
1057 If (p_rec.information7 = hr_api.g_varchar2) then
1058 p_rec.information7 :=
1059 pqh_acc_shd.g_old_rec.information7;
1060 End If;
1061 If (p_rec.information8 = hr_api.g_varchar2) then
1062 p_rec.information8 :=
1063 pqh_acc_shd.g_old_rec.information8;
1064 End If;
1065 If (p_rec.information9 = hr_api.g_varchar2) then
1066 p_rec.information9 :=
1067 pqh_acc_shd.g_old_rec.information9;
1068 End If;
1069 If (p_rec.information10 = hr_api.g_varchar2) then
1070 p_rec.information10 :=
1071 pqh_acc_shd.g_old_rec.information10;
1072 End If;
1073 If (p_rec.information11 = hr_api.g_varchar2) then
1074 p_rec.information11 :=
1075 pqh_acc_shd.g_old_rec.information11;
1076 End If;
1077 If (p_rec.information12 = hr_api.g_varchar2) then
1078 p_rec.information12 :=
1079 pqh_acc_shd.g_old_rec.information12;
1080 End If;
1081 If (p_rec.information13 = hr_api.g_varchar2) then
1082 p_rec.information13 :=
1083 pqh_acc_shd.g_old_rec.information13;
1084 End If;
1085 If (p_rec.information14 = hr_api.g_varchar2) then
1086 p_rec.information14 :=
1087 pqh_acc_shd.g_old_rec.information14;
1088 End If;
1089 If (p_rec.information15 = hr_api.g_varchar2) then
1090 p_rec.information15 :=
1091 pqh_acc_shd.g_old_rec.information15;
1092 End If;
1093 If (p_rec.information16 = hr_api.g_varchar2) then
1094 p_rec.information16 :=
1095 pqh_acc_shd.g_old_rec.information16;
1096 End If;
1097 If (p_rec.information17 = hr_api.g_varchar2) then
1098 p_rec.information17 :=
1099 pqh_acc_shd.g_old_rec.information17;
1100 End If;
1101 If (p_rec.information18 = hr_api.g_varchar2) then
1102 p_rec.information18 :=
1103 pqh_acc_shd.g_old_rec.information18;
1104 End If;
1105 If (p_rec.information19 = hr_api.g_varchar2) then
1106 p_rec.information19 :=
1107 pqh_acc_shd.g_old_rec.information19;
1108 End If;
1109 If (p_rec.information20 = hr_api.g_varchar2) then
1110 p_rec.information20 :=
1111 pqh_acc_shd.g_old_rec.information20;
1112 End If;
1113 If (p_rec.information21 = hr_api.g_varchar2) then
1114 p_rec.information21 :=
1115 pqh_acc_shd.g_old_rec.information21;
1116 End If;
1117 If (p_rec.information22 = hr_api.g_varchar2) then
1118 p_rec.information22 :=
1119 pqh_acc_shd.g_old_rec.information22;
1120 End If;
1121 If (p_rec.information23 = hr_api.g_varchar2) then
1122 p_rec.information23 :=
1123 pqh_acc_shd.g_old_rec.information23;
1124 End If;
1125 If (p_rec.information24 = hr_api.g_varchar2) then
1126 p_rec.information24 :=
1127 pqh_acc_shd.g_old_rec.information24;
1128 End If;
1129 If (p_rec.information25 = hr_api.g_varchar2) then
1130 p_rec.information25 :=
1131 pqh_acc_shd.g_old_rec.information25;
1132 End If;
1133 If (p_rec.information26 = hr_api.g_varchar2) then
1134 p_rec.information26 :=
1135 pqh_acc_shd.g_old_rec.information26;
1136 End If;
1137 If (p_rec.information27 = hr_api.g_varchar2) then
1138 p_rec.information27 :=
1139 pqh_acc_shd.g_old_rec.information27;
1140 End If;
1141 If (p_rec.information28 = hr_api.g_varchar2) then
1142 p_rec.information28 :=
1143 pqh_acc_shd.g_old_rec.information28;
1144 End If;
1145 If (p_rec.information29 = hr_api.g_varchar2) then
1146 p_rec.information29 :=
1147 pqh_acc_shd.g_old_rec.information29;
1148 End If;
1149 If (p_rec.information30 = hr_api.g_varchar2) then
1150 p_rec.information30 :=
1151 pqh_acc_shd.g_old_rec.information30;
1152 End If;
1153 If (p_rec.attribute_category = hr_api.g_varchar2) then
1154 p_rec.attribute_category :=
1155 pqh_acc_shd.g_old_rec.attribute_category;
1156 End If;
1157 If (p_rec.attribute1 = hr_api.g_varchar2) then
1158 p_rec.attribute1 :=
1159 pqh_acc_shd.g_old_rec.attribute1;
1160 End If;
1161 If (p_rec.attribute2 = hr_api.g_varchar2) then
1162 p_rec.attribute2 :=
1163 pqh_acc_shd.g_old_rec.attribute2;
1164 End If;
1165 If (p_rec.attribute3 = hr_api.g_varchar2) then
1166 p_rec.attribute3 :=
1167 pqh_acc_shd.g_old_rec.attribute3;
1168 End If;
1169 If (p_rec.attribute4 = hr_api.g_varchar2) then
1170 p_rec.attribute4 :=
1171 pqh_acc_shd.g_old_rec.attribute4;
1172 End If;
1173 If (p_rec.attribute5 = hr_api.g_varchar2) then
1174 p_rec.attribute5 :=
1175 pqh_acc_shd.g_old_rec.attribute5;
1176 End If;
1177 If (p_rec.attribute6 = hr_api.g_varchar2) then
1178 p_rec.attribute6 :=
1179 pqh_acc_shd.g_old_rec.attribute6;
1180 End If;
1181 If (p_rec.attribute7 = hr_api.g_varchar2) then
1182 p_rec.attribute7 :=
1183 pqh_acc_shd.g_old_rec.attribute7;
1184 End If;
1185 If (p_rec.attribute8 = hr_api.g_varchar2) then
1186 p_rec.attribute8 :=
1187 pqh_acc_shd.g_old_rec.attribute8;
1188 End If;
1189 If (p_rec.attribute9 = hr_api.g_varchar2) then
1190 p_rec.attribute9 :=
1191 pqh_acc_shd.g_old_rec.attribute9;
1192 End If;
1193 If (p_rec.attribute10 = hr_api.g_varchar2) then
1194 p_rec.attribute10 :=
1195 pqh_acc_shd.g_old_rec.attribute10;
1196 End If;
1197 If (p_rec.attribute11 = hr_api.g_varchar2) then
1198 p_rec.attribute11 :=
1199 pqh_acc_shd.g_old_rec.attribute11;
1200 End If;
1201 If (p_rec.attribute12 = hr_api.g_varchar2) then
1202 p_rec.attribute12 :=
1203 pqh_acc_shd.g_old_rec.attribute12;
1204 End If;
1205 If (p_rec.attribute13 = hr_api.g_varchar2) then
1206 p_rec.attribute13 :=
1207 pqh_acc_shd.g_old_rec.attribute13;
1208 End If;
1209 If (p_rec.attribute14 = hr_api.g_varchar2) then
1210 p_rec.attribute14 :=
1211 pqh_acc_shd.g_old_rec.attribute14;
1212 End If;
1213 If (p_rec.attribute15 = hr_api.g_varchar2) then
1214 p_rec.attribute15 :=
1215 pqh_acc_shd.g_old_rec.attribute15;
1216 End If;
1217 If (p_rec.attribute16 = hr_api.g_varchar2) then
1218 p_rec.attribute16 :=
1219 pqh_acc_shd.g_old_rec.attribute16;
1220 End If;
1221 If (p_rec.attribute17 = hr_api.g_varchar2) then
1222 p_rec.attribute17 :=
1223 pqh_acc_shd.g_old_rec.attribute17;
1224 End If;
1225 If (p_rec.attribute18 = hr_api.g_varchar2) then
1226 p_rec.attribute18 :=
1227 pqh_acc_shd.g_old_rec.attribute18;
1228 End If;
1229 If (p_rec.attribute19 = hr_api.g_varchar2) then
1230 p_rec.attribute19 :=
1231 pqh_acc_shd.g_old_rec.attribute19;
1232 End If;
1233 If (p_rec.attribute20 = hr_api.g_varchar2) then
1234 p_rec.attribute20 :=
1235 pqh_acc_shd.g_old_rec.attribute20;
1236 End If;
1237 If (p_rec.attribute21 = hr_api.g_varchar2) then
1238 p_rec.attribute21 :=
1239 pqh_acc_shd.g_old_rec.attribute21;
1240 End If;
1241 If (p_rec.attribute22 = hr_api.g_varchar2) then
1242 p_rec.attribute22 :=
1243 pqh_acc_shd.g_old_rec.attribute22;
1244 End If;
1245 If (p_rec.attribute23 = hr_api.g_varchar2) then
1246 p_rec.attribute23 :=
1247 pqh_acc_shd.g_old_rec.attribute23;
1248 End If;
1249 If (p_rec.attribute24 = hr_api.g_varchar2) then
1250 p_rec.attribute24 :=
1251 pqh_acc_shd.g_old_rec.attribute24;
1252 End If;
1253 If (p_rec.attribute25 = hr_api.g_varchar2) then
1254 p_rec.attribute25 :=
1255 pqh_acc_shd.g_old_rec.attribute25;
1256 End If;
1257 If (p_rec.attribute26 = hr_api.g_varchar2) then
1258 p_rec.attribute26 :=
1259 pqh_acc_shd.g_old_rec.attribute26;
1260 End If;
1261 If (p_rec.attribute27 = hr_api.g_varchar2) then
1262 p_rec.attribute27 :=
1263 pqh_acc_shd.g_old_rec.attribute27;
1264 End If;
1265 If (p_rec.attribute28 = hr_api.g_varchar2) then
1266 p_rec.attribute28 :=
1267 pqh_acc_shd.g_old_rec.attribute28;
1268 End If;
1269 If (p_rec.attribute29 = hr_api.g_varchar2) then
1270 p_rec.attribute29 :=
1271 pqh_acc_shd.g_old_rec.attribute29;
1272 End If;
1273 If (p_rec.attribute30 = hr_api.g_varchar2) then
1274 p_rec.attribute30 :=
1275 pqh_acc_shd.g_old_rec.attribute30;
1276 End If;
1277 --
1278 End convert_defs;
1279 --
1280 -- ----------------------------------------------------------------------------
1281 -- |---------------------------------< upd >----------------------------------|
1282 -- ----------------------------------------------------------------------------
1283 Procedure upd
1284 (p_effective_date in date
1285 ,p_datetrack_mode in varchar2
1286 ,p_rec in out nocopy pqh_acc_shd.g_rec_type
1287 ) is
1288 --
1289 l_proc varchar2(72) := g_package||'upd';
1290 l_validation_start_date date;
1291 l_validation_end_date date;
1292 --
1293 Begin
1294 hr_utility.set_location('Entering:'||l_proc, 5);
1295 --
1296 -- Ensure that the DateTrack update mode is valid
1297 --
1298 dt_api.validate_dt_upd_mode(p_datetrack_mode => p_datetrack_mode);
1299 --
1300 -- We must lock the row which we need to update.
1301 --
1302 pqh_acc_shd.lck
1303 (p_effective_date => p_effective_date
1304 ,p_datetrack_mode => p_datetrack_mode
1305 ,p_accommodation_id => p_rec.accommodation_id
1306 ,p_object_version_number => p_rec.object_version_number
1307 ,p_validation_start_date => l_validation_start_date
1308 ,p_validation_end_date => l_validation_end_date
1309 );
1310 --
1311 -- 1. During an update system defaults are used to determine if
1312 -- arguments have been defaulted or not. We must therefore
1313 -- derive the full record structure values to be updated.
1314 --
1315 -- 2. Call the supporting update validate operations.
1316 --
1317 pqh_acc_upd.convert_defs(p_rec);
1318 --
1319 pqh_acc_bus.update_validate
1320 (p_rec => p_rec
1321 ,p_effective_date => p_effective_date
1322 ,p_datetrack_mode => p_datetrack_mode
1323 ,p_validation_start_date => l_validation_start_date
1324 ,p_validation_end_date => l_validation_end_date
1325 );
1326 --
1327 -- Call to raise any errors on multi-message list
1328 hr_multi_message.end_validation_set;
1329 --
1330 -- Call the supporting pre-update operation
1331 --
1332 pre_update
1333 (p_rec => p_rec
1334 ,p_effective_date => p_effective_date
1335 ,p_datetrack_mode => p_datetrack_mode
1336 ,p_validation_start_date => l_validation_start_date
1337 ,p_validation_end_date => l_validation_end_date
1338 );
1339 --
1340 -- Update the row.
1341 --
1342 update_dml
1343 (p_rec => p_rec
1344 ,p_effective_date => p_effective_date
1345 ,p_datetrack_mode => p_datetrack_mode
1346 ,p_validation_start_date => l_validation_start_date
1347 ,p_validation_end_date => l_validation_end_date
1348 );
1349 --
1350 -- Call the supporting post-update operation
1351 --
1352 post_update
1353 (p_rec => p_rec
1354 ,p_effective_date => p_effective_date
1355 ,p_datetrack_mode => p_datetrack_mode
1356 ,p_validation_start_date => l_validation_start_date
1357 ,p_validation_end_date => l_validation_end_date
1358 );
1359 --
1360 -- Call to raise any errors on multi-message list
1361 hr_multi_message.end_validation_set;
1362 End upd;
1363 --
1364 -- ----------------------------------------------------------------------------
1365 -- |------------------------------< upd >-------------------------------------|
1366 -- ----------------------------------------------------------------------------
1367 Procedure upd
1368 (p_effective_date in date
1369 ,p_datetrack_mode in varchar2
1370 ,p_accommodation_id in number
1371 ,p_object_version_number in out nocopy number
1372 ,p_accommodation_name in varchar2 default hr_api.g_varchar2
1373 ,p_business_group_id in number default hr_api.g_number
1374 ,p_location_id in number default hr_api.g_number
1375 ,p_accommodation_desc in varchar2 default hr_api.g_varchar2
1376 ,p_accommodation_type in varchar2 default hr_api.g_varchar2
1377 ,p_style in varchar2 default hr_api.g_varchar2
1378 ,p_address_line_1 in varchar2 default hr_api.g_varchar2
1379 ,p_address_line_2 in varchar2 default hr_api.g_varchar2
1380 ,p_address_line_3 in varchar2 default hr_api.g_varchar2
1381 ,p_town_or_city in varchar2 default hr_api.g_varchar2
1382 ,p_country in varchar2 default hr_api.g_varchar2
1383 ,p_postal_code in varchar2 default hr_api.g_varchar2
1384 ,p_region_1 in varchar2 default hr_api.g_varchar2
1385 ,p_region_2 in varchar2 default hr_api.g_varchar2
1386 ,p_region_3 in varchar2 default hr_api.g_varchar2
1387 ,p_telephone_number_1 in varchar2 default hr_api.g_varchar2
1388 ,p_telephone_number_2 in varchar2 default hr_api.g_varchar2
1389 ,p_telephone_number_3 in varchar2 default hr_api.g_varchar2
1390 ,p_floor_number in varchar2 default hr_api.g_varchar2
1391 ,p_floor_area in number default hr_api.g_number
1392 ,p_floor_area_measure_unit in varchar2 default hr_api.g_varchar2
1393 ,p_main_rooms in number default hr_api.g_number
1394 ,p_family_size in number default hr_api.g_number
1395 ,p_suitability_disabled in varchar2 default hr_api.g_varchar2
1396 ,p_rental_value in number default hr_api.g_number
1397 ,p_rental_value_currency in varchar2 default hr_api.g_varchar2
1398 ,p_owner in varchar2 default hr_api.g_varchar2
1399 ,p_comments in varchar2 default hr_api.g_varchar2
1400 ,p_information_category in varchar2 default hr_api.g_varchar2
1401 ,p_information1 in varchar2 default hr_api.g_varchar2
1402 ,p_information2 in varchar2 default hr_api.g_varchar2
1403 ,p_information3 in varchar2 default hr_api.g_varchar2
1404 ,p_information4 in varchar2 default hr_api.g_varchar2
1405 ,p_information5 in varchar2 default hr_api.g_varchar2
1406 ,p_information6 in varchar2 default hr_api.g_varchar2
1407 ,p_information7 in varchar2 default hr_api.g_varchar2
1408 ,p_information8 in varchar2 default hr_api.g_varchar2
1409 ,p_information9 in varchar2 default hr_api.g_varchar2
1410 ,p_information10 in varchar2 default hr_api.g_varchar2
1411 ,p_information11 in varchar2 default hr_api.g_varchar2
1412 ,p_information12 in varchar2 default hr_api.g_varchar2
1413 ,p_information13 in varchar2 default hr_api.g_varchar2
1414 ,p_information14 in varchar2 default hr_api.g_varchar2
1415 ,p_information15 in varchar2 default hr_api.g_varchar2
1416 ,p_information16 in varchar2 default hr_api.g_varchar2
1417 ,p_information17 in varchar2 default hr_api.g_varchar2
1418 ,p_information18 in varchar2 default hr_api.g_varchar2
1419 ,p_information19 in varchar2 default hr_api.g_varchar2
1420 ,p_information20 in varchar2 default hr_api.g_varchar2
1421 ,p_information21 in varchar2 default hr_api.g_varchar2
1422 ,p_information22 in varchar2 default hr_api.g_varchar2
1423 ,p_information23 in varchar2 default hr_api.g_varchar2
1424 ,p_information24 in varchar2 default hr_api.g_varchar2
1425 ,p_information25 in varchar2 default hr_api.g_varchar2
1426 ,p_information26 in varchar2 default hr_api.g_varchar2
1427 ,p_information27 in varchar2 default hr_api.g_varchar2
1428 ,p_information28 in varchar2 default hr_api.g_varchar2
1429 ,p_information29 in varchar2 default hr_api.g_varchar2
1430 ,p_information30 in varchar2 default hr_api.g_varchar2
1431 ,p_attribute_category in varchar2 default hr_api.g_varchar2
1432 ,p_attribute1 in varchar2 default hr_api.g_varchar2
1433 ,p_attribute2 in varchar2 default hr_api.g_varchar2
1434 ,p_attribute3 in varchar2 default hr_api.g_varchar2
1435 ,p_attribute4 in varchar2 default hr_api.g_varchar2
1436 ,p_attribute5 in varchar2 default hr_api.g_varchar2
1437 ,p_attribute6 in varchar2 default hr_api.g_varchar2
1438 ,p_attribute7 in varchar2 default hr_api.g_varchar2
1439 ,p_attribute8 in varchar2 default hr_api.g_varchar2
1440 ,p_attribute9 in varchar2 default hr_api.g_varchar2
1441 ,p_attribute10 in varchar2 default hr_api.g_varchar2
1442 ,p_attribute11 in varchar2 default hr_api.g_varchar2
1443 ,p_attribute12 in varchar2 default hr_api.g_varchar2
1444 ,p_attribute13 in varchar2 default hr_api.g_varchar2
1445 ,p_attribute14 in varchar2 default hr_api.g_varchar2
1446 ,p_attribute15 in varchar2 default hr_api.g_varchar2
1447 ,p_attribute16 in varchar2 default hr_api.g_varchar2
1448 ,p_attribute17 in varchar2 default hr_api.g_varchar2
1449 ,p_attribute18 in varchar2 default hr_api.g_varchar2
1450 ,p_attribute19 in varchar2 default hr_api.g_varchar2
1451 ,p_attribute20 in varchar2 default hr_api.g_varchar2
1452 ,p_attribute21 in varchar2 default hr_api.g_varchar2
1453 ,p_attribute22 in varchar2 default hr_api.g_varchar2
1454 ,p_attribute23 in varchar2 default hr_api.g_varchar2
1455 ,p_attribute24 in varchar2 default hr_api.g_varchar2
1456 ,p_attribute25 in varchar2 default hr_api.g_varchar2
1457 ,p_attribute26 in varchar2 default hr_api.g_varchar2
1458 ,p_attribute27 in varchar2 default hr_api.g_varchar2
1459 ,p_attribute28 in varchar2 default hr_api.g_varchar2
1460 ,p_attribute29 in varchar2 default hr_api.g_varchar2
1461 ,p_attribute30 in varchar2 default hr_api.g_varchar2
1462 ,p_effective_start_date out nocopy date
1463 ,p_effective_end_date out nocopy date
1464 ) is
1465 --
1466 l_rec pqh_acc_shd.g_rec_type;
1467 l_proc varchar2(72) := g_package||'upd';
1468 --
1469 Begin
1470 hr_utility.set_location('Entering:'||l_proc, 5);
1471 --
1472 -- Call conversion function to turn arguments into the
1473 -- l_rec structure.
1474 --
1475 l_rec :=
1476 pqh_acc_shd.convert_args
1477 (p_accommodation_id
1478 ,p_accommodation_name
1479 ,null
1480 ,null
1481 ,p_business_group_id
1482 ,p_location_id
1483 ,p_accommodation_desc
1484 ,p_accommodation_type
1485 ,p_style
1486 ,p_address_line_1
1487 ,p_address_line_2
1488 ,p_address_line_3
1489 ,p_town_or_city
1490 ,p_country
1491 ,p_postal_code
1492 ,p_region_1
1493 ,p_region_2
1494 ,p_region_3
1495 ,p_telephone_number_1
1496 ,p_telephone_number_2
1497 ,p_telephone_number_3
1498 ,p_floor_number
1499 ,p_floor_area
1500 ,p_floor_area_measure_unit
1501 ,p_main_rooms
1502 ,p_family_size
1503 ,p_suitability_disabled
1504 ,p_rental_value
1505 ,p_rental_value_currency
1506 ,p_owner
1507 ,p_comments
1508 ,p_information_category
1509 ,p_information1
1510 ,p_information2
1511 ,p_information3
1512 ,p_information4
1513 ,p_information5
1514 ,p_information6
1515 ,p_information7
1516 ,p_information8
1517 ,p_information9
1518 ,p_information10
1519 ,p_information11
1520 ,p_information12
1521 ,p_information13
1522 ,p_information14
1523 ,p_information15
1524 ,p_information16
1525 ,p_information17
1526 ,p_information18
1527 ,p_information19
1528 ,p_information20
1529 ,p_information21
1530 ,p_information22
1531 ,p_information23
1532 ,p_information24
1533 ,p_information25
1534 ,p_information26
1535 ,p_information27
1536 ,p_information28
1537 ,p_information29
1538 ,p_information30
1539 ,p_attribute_category
1540 ,p_attribute1
1541 ,p_attribute2
1542 ,p_attribute3
1543 ,p_attribute4
1544 ,p_attribute5
1545 ,p_attribute6
1546 ,p_attribute7
1547 ,p_attribute8
1548 ,p_attribute9
1549 ,p_attribute10
1550 ,p_attribute11
1551 ,p_attribute12
1552 ,p_attribute13
1553 ,p_attribute14
1554 ,p_attribute15
1555 ,p_attribute16
1556 ,p_attribute17
1557 ,p_attribute18
1558 ,p_attribute19
1559 ,p_attribute20
1560 ,p_attribute21
1561 ,p_attribute22
1562 ,p_attribute23
1563 ,p_attribute24
1564 ,p_attribute25
1565 ,p_attribute26
1566 ,p_attribute27
1567 ,p_attribute28
1568 ,p_attribute29
1569 ,p_attribute30
1570 ,p_object_version_number
1571 );
1572 --
1573 -- Having converted the arguments into the
1574 -- plsql record structure we call the corresponding record
1575 -- business process.
1576 --
1577 pqh_acc_upd.upd
1578 (p_effective_date
1579 ,p_datetrack_mode
1580 ,l_rec
1581 );
1582 --
1583 -- Set the out parameters
1584 --
1585 p_object_version_number := l_rec.object_version_number;
1586 p_effective_start_date := l_rec.effective_start_date;
1587 p_effective_end_date := l_rec.effective_end_date;
1588 --
1589 --
1590 hr_utility.set_location(' Leaving:'||l_proc, 10);
1591 End upd;
1592 --
1593 end pqh_acc_upd;