[Home] [Help]
PACKAGE BODY: APPS.PER_EQT_BUS
Source
1 Package Body per_eqt_bus as
2 /* $Header: peeqtrhi.pkb 115.15 2004/03/30 18:11:30 ynegoro ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' per_eqt_bus.'; -- Global package name
9 --
10 -- ----------------------------------------------------------------------------
11 -- |----------------------< chk_qualification_type_id >-----------------------|
12 -- ----------------------------------------------------------------------------
13 Procedure chk_qualification_type_id(p_qualification_type_id in number,
14 p_object_version_number in number) is
15 --
16 l_proc varchar2(72) := g_package||'chk_qualification_type_id';
17 l_api_updating boolean;
18 --
19 Begin
20 hr_utility.set_location('Entering:'||l_proc, 5);
21 --
22 l_api_updating := per_eqt_shd.api_updating
23 (p_qualification_type_id => p_qualification_type_id,
24 p_object_version_number => p_object_version_number);
25 --
26 if (l_api_updating and
27 nvl(p_qualification_type_id,hr_api.g_number)
28 <> per_eqt_shd.g_old_rec.qualification_type_id or
29 not l_api_updating) then
30 --
31 if p_qualification_type_id is not null and
32 not l_api_updating then
33 --
34 -- raise error as PK not null
35 --
36 per_eqt_shd.constraint_error('PER_QUALIFICATION_TYPES_PK');
37 --
38 end if;
39 --
40 -- check if qualification_type_id has been updated
41 --
42 if nvl(p_qualification_type_id,hr_api.g_number)
43 <> per_eqt_shd.g_old_rec.qualification_type_id
44 and l_api_updating then
45 --
46 -- raise error as update is not allowed
47 --
48 per_eqt_shd.constraint_error('PER_QUALIFICATION_TYPES_PK');
49 --
50 end if;
51 --
52 end if;
53 --
54 hr_utility.set_location('Leaving:'||l_proc,5);
55 --
56 end chk_qualification_type_id;
57 --
58 -- ----------------------------------------------------------------------------
59 -- |-----------------------------< chk_category >-----------------------------|
60 -- ----------------------------------------------------------------------------
61 --
62 -- Description
63 -- This procedure is used to check that the category lookup exists within the
64 -- lookup 'PER_CATEGORIES'.
65 --
66 -- Pre Conditions
67 -- None.
68 --
69 -- In Parameters
70 -- qualification_type_id PK of record being inserted or updated.
71 -- category value of lookup_code
72 -- effective_date effective date
73 -- object_version_number Object version number of record being
74 -- inserted or updated.
75 --
76 -- Post Success
77 -- Processing continues
78 --
79 -- Post Failure
80 -- Error handled by procedure
81 --
82 -- Access Status
83 -- Internal table handler use only.
84 --
85 Procedure chk_category(p_qualification_type_id in number,
86 p_category in varchar2,
87 p_effective_date in date,
88 p_object_version_number in number) is
89 --
90 l_proc varchar2(72) := g_package||'chk_category';
91 l_api_updating boolean;
92 --
93 Begin
94 --
95 hr_utility.set_location('Entering:'||l_proc, 5);
96 --
97 l_api_updating := per_eqt_shd.api_updating
98 (p_qualification_type_id => p_qualification_type_id,
99 p_object_version_number => p_object_version_number);
100 --
101 if (l_api_updating
102 and nvl(p_category,hr_api.g_varchar2)
103 <> per_eqt_shd.g_old_rec.category
104 or not l_api_updating) then
105 --
106 -- check if value of category exists in lookup 'PER_CATEGORIES'
107 --
108 if hr_api.not_exists_in_leg_lookups(p_lookup_type => 'PER_CATEGORIES',
109 p_lookup_code => p_category,
110 p_effective_date => p_effective_date) then
111 --
112 -- raise error as does not exist as lookup
113 --
114 hr_utility.set_message(801,'HR_51880_EQT_CAT_LKP');
115 hr_utility.raise_error;
116 --
117 end if;
118 --
119 end if;
120 --
121 hr_utility.set_location('Leaving:'||l_proc,10);
122 --
123 end chk_category;
124 -- ----------------------------------------------------------------------------
125 -- |-----------------------< chk_qualification_delete >-----------------------|
126 -- ----------------------------------------------------------------------------
127 Procedure chk_qualification_delete(p_qualification_type_id in number) is
128 --
129 l_proc varchar2(72) := g_package||'chk_qualification_delete';
130 l_api_updating boolean;
131 l_dummy varchar2(1);
132 --
133 cursor c1 is
134 select null
135 from per_qualifications per
136 where per.qualification_type_id = p_qualification_type_id;
137 --
138 -- BUG3356369
139 --
140 cursor c2 is
141 select null
142 from per_competence_elements comp
143 where comp.qualification_type_id = p_qualification_type_id;
144 Begin
145 --
146 hr_utility.set_location('Entering:'||l_proc, 5);
147 --
148 open c1;
149 --
150 fetch c1 into l_dummy;
151 --
152 if c1%found then
153 --
154 -- error cannot delete qualification_type_id as it is used in the
155 -- per_qualifications table
156 --
157 close c1;
158 hr_utility.set_message(801,'HR_51537_EQT_QUAL_TAB_REF');
159 hr_utility.raise_error;
160 --
161 end if;
162 --
163 close c1;
164 --
165 hr_utility.set_location(l_proc,10);
166 --
167 open c2;
168 --
169 fetch c2 into l_dummy;
170 --
171 if c2%found then
172 --
173 -- error cannot delete qualification_type_id as it is used in the
174 -- per_competence_elements table
175 --
176 close c2;
177 hr_utility.set_message(800,'HR_449133_QUA_FWK_EQT_TAB_REF');
178 hr_utility.raise_error;
179 --
180 end if;
181 --
182 close c2;
183 hr_utility.set_location('Leaving:'||l_proc,20);
184 --
185 end chk_qualification_delete;
186 --
187 -------------------------------------------------------------------------------
188 -------------------------< chk_qual_framework_id >-----------------------------
189 -------------------------------------------------------------------------------
190 --
191 -- Description:
192 -- This procedure checks that a qual_framework_id is unique
193 --
194 -- Pre_conditions:
195 -- None.
196 --
197 -- In Arguments:
198 -- p_qualification_type_id
199 -- p_qual_framework_id
200 -- p_object_version_number
201 --
202 -- Post Success:
203 -- Process continues if :
204 -- All the in parameters are valid.
205 --
206 -- Post Failure:
207 -- Error raised.
208 --
209 -- Access Status
210 -- Internal Table Handler Use Only.
211 --
212 --
213 procedure chk_qual_framework_id
214 (p_qualification_type_id in per_qualification_types.qualification_type_id%TYPE
215 ,p_qual_framework_id in per_qualification_types.qual_framework_id%TYPE
216 ,p_object_version_number in per_qualification_types.object_version_number%TYPE
217 )
218 is
219 --
220 --
221 -- declare cursor
222 --
223 cursor csr_qual_framework_id is
224 select 1 from per_qualification_types
225 where qual_framework_id = p_qual_framework_id;
226
227 --
228 l_proc varchar2(72) := g_package||'chk_qual_framework_id';
229 l_api_updating boolean;
230 l_exists varchar2(1);
231 --
232 begin
233 hr_utility.set_location('Entering:'|| l_proc, 10);
234 --
235 -- Only proceed with validation if :
236 -- a) The current g_old_rec is current and
237 -- b) The value for qualification_type type has changed
238 --
239 l_api_updating := per_eqt_shd.api_updating
240 (p_qualification_type_id => p_qualification_type_id
241 ,p_object_version_number => p_object_version_number);
242 --
243 if p_qual_framework_id is not null then
244 if ( (l_api_updating and nvl(per_eqt_shd.g_old_rec.qual_framework_id,
245 hr_api.g_number)
246 <> nvl(p_qual_framework_id,hr_api.g_number)
247 ) or
248 (NOT l_api_updating)
249 ) then
250 --
251 hr_utility.set_location(l_proc, 20);
252 open csr_qual_framework_id;
253 fetch csr_qual_framework_id into l_exists;
254 if csr_qual_framework_id%FOUND then
255 close csr_qual_framework_id;
256 --
257 hr_utility.set_location(l_proc, 30);
258 --
259 hr_utility.set_message(800, 'HR_449144_QUA_FWK_ID_EXISTS');
260 hr_utility.raise_error;
261 --
262 END IF;
263 close csr_qual_framework_id;
264 end if;
265 end if;
266 --
267 hr_utility.set_location('Leaving: '|| l_proc, 40);
268 --
269 end chk_qual_framework_id;
270 --
271 --
272 -------------------------------------------------------------------------------
273 -------------------------< chk_qualification_type >----------------------------
274 -------------------------------------------------------------------------------
275 --
276 -- Description:
277 -- This procedure checks that a qualification type exists in HR_LOOKUPS
278 -- for the lookup type 'PER_QUAL_FWK_QUAL_TYPE'.
279 --
280 -- Pre_conditions:
281 -- None.
282 --
283 -- In Arguments:
284 -- p_qualification_type_id
285 -- p_qualification_type
286 -- p_object_version_number
287 -- p_effective_date
288 --
289 -- Post Success:
290 -- Process continues if :
291 -- All the in parameters are valid.
292 --
293 -- Post Failure:
294 -- Error raised.
295 --
296 -- Access Status
297 -- Internal Table Handler Use Only.
298 --
299 --
300 procedure chk_qualification_type
301 (p_qualification_type_id in per_qualification_types.qualification_type_id%TYPE
302 ,p_qualification_type in per_qualification_types.qualification_type%TYPE
303 ,p_object_version_number in per_qualification_types.object_version_number%TYPE
304 ,p_effective_date in date
305 )
306 is
307 --
308 l_proc varchar2(72) := g_package||'chk_qualification_type';
309 l_api_updating boolean;
310 --
311 begin
312 hr_utility.set_location('Entering:'|| l_proc, 10);
313 --
314 -- Only proceed with validation if :
315 -- a) The current g_old_rec is current and
316 -- b) The value for qualification_type type has changed
317 --
318 l_api_updating := per_eqt_shd.api_updating
319 (p_qualification_type_id => p_qualification_type_id
320 ,p_object_version_number => p_object_version_number);
321 --
322 if p_qualification_type is not null then
323 if ( (l_api_updating and nvl(per_eqt_shd.g_old_rec.qualification_type,
324 hr_api.g_varchar2)
325 <> nvl(p_qualification_type,hr_api.g_varchar2)
326 ) or
327 (NOT l_api_updating)
328 ) then
329 --
330 hr_utility.set_location(l_proc, 20);
331 --
332 -- Check that the category exists in HR_LOOKUPS
333 --
334 IF hr_api.not_exists_in_hr_lookups
335 (p_effective_date => p_effective_date
336 ,p_lookup_type => 'PER_QUAL_FWK_QUAL_TYPE'
337 ,p_lookup_code => p_qualification_type) THEN
338 --
339 hr_utility.set_location(l_proc, 30);
340 --
341 hr_utility.set_message(800, 'HR_449101_QUA_FWK_QUAL_TYP_LKP');
342 hr_utility.raise_error;
343 --
344 END IF;
345 end if;
346 end if;
347 --
348 hr_utility.set_location('Leaving: '|| l_proc, 40);
349 --
350 end chk_qualification_type;
351 --
352 -------------------------------------------------------------------------------
353 ----------------------------< chk_credit_type >--------------------------------
354 -------------------------------------------------------------------------------
355 --
356 -- Description:
357 -- This procedure checks that a credit_type exists in HR_LOOKUPS
358 -- for the lookup type 'PER_QUAL_FWK_CREDIT_TYPE'.
359 --
360 -- Pre_conditions:
361 -- None.
362 --
363 -- In Arguments:
364 -- p_qualification_type_id
365 -- p_credit_type
366 -- p_object_version_number
367 -- p_effective_date
368 --
369 -- Post Success:
370 -- Process continues if :
371 -- All the in parameters are valid.
372 --
373 -- Post Failure:
374 -- Error raised.
375 --
376 -- Access Status
377 -- Internal Table Handler Use Only.
378 --
379 --
380 procedure chk_credit_type
381 (p_qualification_type_id in per_qualification_types.qualification_type_id%TYPE
382 ,p_credit_type in per_qualification_types.credit_type%TYPE
383 ,p_object_version_number in per_qualification_types.object_version_number%TYPE
384 ,p_effective_date in date
385 )
386 is
387 --
388 l_proc varchar2(72) := g_package||'chk_credit_type';
389 l_api_updating boolean;
390 --
391 begin
392 hr_utility.set_location('Entering:'|| l_proc, 10);
393 --
394 -- Only proceed with validation if :
395 -- a) The current g_old_rec is current and
396 -- b) The value for credit type has changed
397 --
398 l_api_updating := per_eqt_shd.api_updating
399 (p_qualification_type_id => p_qualification_type_id
400 ,p_object_version_number => p_object_version_number);
401 --
402 if p_credit_type is not null then
403 if ( (l_api_updating and nvl(per_eqt_shd.g_old_rec.credit_type,
404 hr_api.g_varchar2)
405 <> nvl(p_credit_type,hr_api.g_varchar2)
406 ) or
407 (NOT l_api_updating)
408 ) then
409 --
410 hr_utility.set_location(l_proc, 20);
411 --
412 -- Check that the category exists in HR_LOOKUPS
413 --
414 IF hr_api.not_exists_in_hr_lookups
415 (p_effective_date => p_effective_date
416 ,p_lookup_type => 'PER_QUAL_FWK_CREDIT_TYPE'
417 ,p_lookup_code => p_credit_type) THEN
418 --
419 hr_utility.set_location(l_proc, 30);
420 --
424 END IF;
421 hr_utility.set_message(800, 'HR_449092_QUA_FWK_CRDT_TYP_LKP');
422 hr_utility.raise_error;
423 --
425 end if;
426 end if;
427 --
428 hr_utility.set_location('Leaving: '|| l_proc, 40);
429 --
430 end chk_credit_type;
431 --
432 --
433 -------------------------------------------------------------------------------
434 ----------------------------< chk_level_type >--------------------------------
435 -------------------------------------------------------------------------------
436 --
437 -- Description:
438 -- This procedure checks that a level_type exists in HR_LOOKUPS
439 -- for the lookup type 'PER_QUAL_FWK_LEVEL_TYPE'.
440 --
441 -- Pre_conditions:
442 -- None.
443 --
444 -- In Arguments:
445 -- p_qualification_type_id
446 -- p_level_type
447 -- p_object_version_number
448 -- p_effective_date
449 --
450 -- Post Success:
451 -- Process continues if :
452 -- All the in parameters are valid.
453 --
454 -- Post Failure:
455 -- Error raised.
456 --
457 -- Access Status
458 -- Internal Table Handler Use Only.
459 --
460 --
461 procedure chk_level_type
462 (p_qualification_type_id in per_qualification_types.qualification_type_id%TYPE
463 ,p_level_type in per_qualification_types.level_type%TYPE
464 ,p_object_version_number in per_qualification_types.object_version_number%TYPE
465 ,p_effective_date in date
466 )
467 is
468 --
469 l_proc varchar2(72) := g_package||'chk_level_type';
470 l_api_updating boolean;
471 --
472 begin
473 hr_utility.set_location('Entering:'|| l_proc, 10);
474 --
475 -- Only proceed with validation if :
476 -- a) The current g_old_rec is current and
477 -- b) The value for level type has changed
478 --
479 l_api_updating := per_eqt_shd.api_updating
480 (p_qualification_type_id => p_qualification_type_id
481 ,p_object_version_number => p_object_version_number);
482 --
483 if p_level_type is not null then
484 if ( (l_api_updating and nvl(per_eqt_shd.g_old_rec.level_type,
485 hr_api.g_varchar2)
486 <> nvl(p_level_type,hr_api.g_varchar2)
487 ) or
488 (NOT l_api_updating)
489 ) then
490 --
491 hr_utility.set_location(l_proc, 20);
492 --
493 -- Check that the category exists in HR_LOOKUPS
494 --
495 IF hr_api.not_exists_in_hr_lookups
496 (p_effective_date => p_effective_date
497 ,p_lookup_type => 'PER_QUAL_FWK_LEVEL_TYPE'
498 ,p_lookup_code => p_level_type) THEN
499 --
500 hr_utility.set_location(l_proc, 30);
501 --
502 hr_utility.set_message(800, 'HR_449090_QUA_FWK_LVL_TYPE_LKP');
503 hr_utility.raise_error;
504 --
505 END IF;
506 end if;
507 end if;
508 --
509 hr_utility.set_location('Leaving: '|| l_proc, 40);
510 --
511 end chk_level_type;
512 --
513 --
514 -------------------------------------------------------------------------------
515 ----------------------------< chk_level_number >--------------------------------
516 -------------------------------------------------------------------------------
517 --
518 -- Description:
519 -- This procedure checks that a level_number exists in HR_LOOKUPS
520 -- for the lookup type 'PER_QUAL_FWK_LEVEL'.
521 --
522 -- Pre_conditions:
523 -- None.
524 --
525 -- In Arguments:
526 -- p_qualification_type_id
527 -- p_level_number
528 -- p_object_version_number
529 -- p_effective_date
530 --
531 -- Post Success:
532 -- Process continues if :
533 -- All the in parameters are valid.
534 --
535 -- Post Failure:
536 -- Error raised.
537 --
538 -- Access Status
539 -- Internal Table Handler Use Only.
540 --
541 --
542 procedure chk_level_number
543 (p_qualification_type_id in per_qualification_types.qualification_type_id%TYPE
544 ,p_level_number in per_qualification_types.level_number%TYPE
545 ,p_object_version_number in per_qualification_types.object_version_number%TYPE
546 ,p_effective_date in date
547 )
548 is
549 --
550 l_proc varchar2(72) := g_package||'chk_level_number';
551 l_api_updating boolean;
552 --
553 begin
554 hr_utility.set_location('Entering:'|| l_proc, 10);
555 --
556 -- Only proceed with validation if :
557 -- a) The current g_old_rec is current and
558 -- b) The value for level has changed
559 --
560 l_api_updating := per_eqt_shd.api_updating
561 (p_qualification_type_id => p_qualification_type_id
562 ,p_object_version_number => p_object_version_number);
563 --
564 if p_level_number is not null then
565 if ( (l_api_updating and nvl(per_eqt_shd.g_old_rec.level_number,
566 hr_api.g_number)
567 <> nvl(p_level_number,hr_api.g_number)
568 ) or
569 (NOT l_api_updating)
570 ) then
574 -- Check that the category exists in HR_LOOKUPS
571 --
572 hr_utility.set_location(l_proc, 20);
573 --
575 --
576 IF hr_api.not_exists_in_hr_lookups
577 (p_effective_date => p_effective_date
578 ,p_lookup_type => 'PER_QUAL_FWK_LEVEL'
579 ,p_lookup_code => p_level_number) THEN
580 --
581 hr_utility.set_location(l_proc, 30);
582 --
583 hr_utility.set_message(800, 'HR_449091_QUA_FWK_LEVEL_LKP');
584 hr_utility.raise_error;
585 --
586 END IF;
587 end if;
588 end if;
589 --
590 hr_utility.set_location('Leaving: '|| l_proc, 40);
591 --
592 end chk_level_number;
593 --
594 --
595 -------------------------------------------------------------------------------
596 ----------------------------------< chk_field >--------------------------------
597 -------------------------------------------------------------------------------
598 --
599 -- Description:
600 -- This procedure checks that a field exists in HR_LOOKUPS
601 -- for the lookup type 'PER_QUAL_FWK_FIELD'.
602 --
603 -- Pre_conditions:
604 -- None.
605 --
606 -- In Arguments:
607 -- p_qualification_type_id
608 -- p_field
609 -- p_object_version_number
610 -- p_effective_date
611 --
612 -- Post Success:
613 -- Process continues if :
614 -- All the in parameters are valid.
615 --
616 -- Post Failure:
617 -- Error raised.
618 --
619 -- Access Status
620 -- Internal Table Handler Use Only.
621 --
622 --
623 procedure chk_field
624 (p_qualification_type_id in per_qualification_types.qualification_type_id%TYPE
625 ,p_field in per_qualification_types.field%TYPE
626 ,p_object_version_number in per_qualification_types.object_version_number%TYPE
627 ,p_effective_date in date
628 )
629 is
630 --
631 l_proc varchar2(72) := g_package||'chk_field';
632 l_api_updating boolean;
633 --
634 begin
635 hr_utility.set_location('Entering:'|| l_proc, 10);
636 --
637 -- Only proceed with validation if :
638 -- a) The current g_old_rec is current and
639 -- b) The value for field has changed
640 --
641 l_api_updating := per_eqt_shd.api_updating
642 (p_qualification_type_id => p_qualification_type_id
643 ,p_object_version_number => p_object_version_number);
644 --
645 if p_field is not null then
646 if ( (l_api_updating and nvl(per_eqt_shd.g_old_rec.field,
647 hr_api.g_varchar2)
648 <> nvl(p_field,hr_api.g_varchar2)
649 ) or
650 (NOT l_api_updating)
651 ) then
652 --
653 hr_utility.set_location(l_proc, 20);
654 --
655 -- Check that the category exists in HR_LOOKUPS
656 --
657 IF hr_api.not_exists_in_hr_lookups
658 (p_effective_date => p_effective_date
659 ,p_lookup_type => 'PER_QUAL_FWK_FIELD'
660 ,p_lookup_code => p_field) THEN
661 --
662 hr_utility.set_location(l_proc, 30);
663 --
664 hr_utility.set_message(800, 'HR_449093_QUA_FWK_FIELD_LKP');
665 hr_utility.raise_error;
666 --
667 END IF;
668 end if;
669 end if;
670 --
671 hr_utility.set_location('Leaving: '|| l_proc, 40);
672 --
673 end chk_field;
674 --
675 --
676 -------------------------------------------------------------------------------
677 ----------------------------< chk_sub_field >----------------------------------
678 -------------------------------------------------------------------------------
679 --
680 -- Description:
681 -- This procedure checks that a sub_field exists in HR_LOOKUPS
682 -- for the lookup type 'PER_QUAL_FWK_SUB_FIELD'.
683 --
684 -- Pre_conditions:
685 -- None.
686 --
687 -- In Arguments:
688 -- p_qualification_type_id
689 -- p_sub_field
690 -- p_object_version_number
691 -- p_effective_date
692 --
693 -- Post Success:
694 -- Process continues if :
695 -- All the in parameters are valid.
696 --
697 -- Post Failure:
698 -- Error raised.
699 --
700 -- Access Status
701 -- Internal Table Handler Use Only.
702 --
703 --
704 procedure chk_sub_field
705 (p_qualification_type_id in per_qualification_types.qualification_type_id%TYPE
706 ,p_sub_field in per_qualification_types.sub_field%TYPE
707 ,p_object_version_number in per_qualification_types.object_version_number%TYPE
708 ,p_effective_date in date
709 )
710 is
711 --
712 l_proc varchar2(72) := g_package||'chk_sub_field';
713 l_api_updating boolean;
714 --
715 begin
716 hr_utility.set_location('Entering:'|| l_proc, 10);
717 --
718 -- Only proceed with validation if :
719 -- a) The current g_old_rec is current and
720 -- b) The value for sub field has changed
721 --
722 l_api_updating := per_eqt_shd.api_updating
726 if p_sub_field is not null then
723 (p_qualification_type_id => p_qualification_type_id
724 ,p_object_version_number => p_object_version_number);
725 --
727 if ( (l_api_updating and nvl(per_eqt_shd.g_old_rec.sub_field,
728 hr_api.g_varchar2)
729 <> nvl(p_sub_field,hr_api.g_varchar2)
730 ) or
731 (NOT l_api_updating)
732 ) then
733 --
734 hr_utility.set_location(l_proc, 20);
735 --
736 -- Check that the category exists in HR_LOOKUPS
737 --
738 IF hr_api.not_exists_in_hr_lookups
739 (p_effective_date => p_effective_date
740 ,p_lookup_type => 'PER_QUAL_FWK_SUB_FIELD'
741 ,p_lookup_code => p_sub_field) THEN
742 --
743 hr_utility.set_location(l_proc, 30);
747 --
744 --
745 hr_utility.set_message(800, 'HR_449094_QUA_FWK_SUB_FLD_LKP');
746 hr_utility.raise_error;
748 END IF;
749 end if;
750 end if;
751 --
752 hr_utility.set_location('Leaving: '|| l_proc, 40);
753 --
754 end chk_sub_field;
755 --
756 --
757 -------------------------------------------------------------------------------
758 -------------------------------< chk_provider >--------------------------------
759 -------------------------------------------------------------------------------
760 --
761 -- Description:
765 -- Pre_conditions:
762 -- This procedure checks that a provider exists in HR_LOOKUPS
763 -- for the lookup type 'PER_QUAL_FWK_PROVIDER'.
764 --
766 -- None.
767 --
768 -- In Arguments:
769 -- p_qualification_type_id
770 -- p_provider
771 -- p_object_version_number
772 -- p_effective_date
773 --
774 -- Post Success:
775 -- Process continues if :
776 -- All the in parameters are valid.
777 --
778 -- Post Failure:
779 -- Error raised.
780 --
781 -- Access Status
782 -- Internal Table Handler Use Only.
783 --
784 --
785 procedure chk_provider
786 (p_qualification_type_id in per_qualification_types.qualification_type_id%TYPE
787 ,p_provider in per_qualification_types.provider%TYPE
788 ,p_object_version_number in per_qualification_types.object_version_number%TYPE
789 ,p_effective_date in date
790 )
791 is
792 --
793 l_proc varchar2(72) := g_package||'chk_provider';
794 l_api_updating boolean;
795 --
796 begin
797 hr_utility.set_location('Entering:'|| l_proc, 10);
798 --
799 -- Only proceed with validation if :
800 -- a) The current g_old_rec is current and
801 -- b) The value for provider has changed
802 --
803 l_api_updating := per_eqt_shd.api_updating
804 (p_qualification_type_id => p_qualification_type_id
805 ,p_object_version_number => p_object_version_number);
806 --
807 if p_provider is not null then
808 if ( (l_api_updating and nvl(per_eqt_shd.g_old_rec.provider,
809 hr_api.g_varchar2)
810 <> nvl(p_provider,hr_api.g_varchar2)
811 ) or
812 (NOT l_api_updating)
813 ) then
814 --
815 hr_utility.set_location(l_proc, 20);
816 --
817 -- Check that the category exists in HR_LOOKUPS
818 --
819 IF hr_api.not_exists_in_hr_lookups
820 (p_effective_date => p_effective_date
821 ,p_lookup_type => 'PER_QUAL_FWK_PROVIDER'
822 ,p_lookup_code => p_provider) THEN
823 --
824 hr_utility.set_location(l_proc, 30);
825 --
826 hr_utility.set_message(800, 'HR_449095_QUA_FWK_PROVIDER_LKP');
827 hr_utility.raise_error;
828 --
829 END IF;
830 end if;
831 end if;
832 --
833 hr_utility.set_location('Leaving: '|| l_proc, 40);
834 --
835 end chk_provider;
836 --
837 --
838 -------------------------------------------------------------------------------
839 ------------------------< chk_qa_organization >--------------------------------
840 -------------------------------------------------------------------------------
841 --
842 -- Description:
843 -- This procedure checks that a qa_organization exists in HR_LOOKUPS
844 -- for the lookup type 'PER_QUAL_FWK_QA_ORG'.
845 --
846 -- Pre_conditions:
847 -- None.
848 --
849 -- In Arguments:
850 -- p_qualification_type_id
851 -- p_qa_organization
852 -- p_object_version_number
853 -- p_effective_date
854 --
855 -- Post Success:
856 -- Process continues if :
857 -- All the in parameters are valid.
858 --
859 -- Post Failure:
860 -- Error raised.
861 --
862 -- Access Status
863 -- Internal Table Handler Use Only.
864 --
865 --
866 procedure chk_qa_organization
867 (p_qualification_type_id in per_qualification_types.qualification_type_id%TYPE
868 ,p_qa_organization in per_qualification_types.qa_organization%TYPE
872 is
869 ,p_object_version_number in per_qualification_types.object_version_number%TYPE
870 ,p_effective_date in date
871 )
873 --
874 l_proc varchar2(72) := g_package||'chk_qa_organization';
875 l_api_updating boolean;
876 --
877 begin
878 hr_utility.set_location('Entering:'|| l_proc, 10);
879 --
880 -- Only proceed with validation if :
881 -- a) The current g_old_rec is current and
882 -- b) The value for qa organization has changed
883 --
884 l_api_updating := per_eqt_shd.api_updating
885 (p_qualification_type_id => p_qualification_type_id
886 ,p_object_version_number => p_object_version_number);
887 --
888 if p_qa_organization is not null then
889 if ( (l_api_updating and nvl(per_eqt_shd.g_old_rec.qa_organization,
890 hr_api.g_varchar2)
891 <> nvl(p_qa_organization,hr_api.g_varchar2)
892 ) or
893 (NOT l_api_updating)
894 ) then
895 --
896 hr_utility.set_location(l_proc, 20);
897 --
898 -- Check that the category exists in HR_LOOKUPS
899 --
900 IF hr_api.not_exists_in_hr_lookups
901 (p_effective_date => p_effective_date
902 ,p_lookup_type => 'PER_QUAL_FWK_QA_ORG'
903 ,p_lookup_code => p_qa_organization) THEN
904 --
905 hr_utility.set_location(l_proc, 30);
906 --
907 hr_utility.set_message(800, 'HR_449096_QUA_FWK_QA_ORG_LKP');
908 hr_utility.raise_error;
909 --
910 END IF;
911 end if;
912 end if;
913 --
914 hr_utility.set_location('Leaving: '|| l_proc, 40);
915 --
916 end chk_qa_organization;
917 --
918 -- -----------------------------------------------------------------------
919 -- |------------------------------< chk_df >-----------------------------|
920 -- -----------------------------------------------------------------------
921 --
922 -- Description:
923 -- Validates the all Descriptive Flexfield values.
924 --
925 -- Pre-conditions:
926 -- All other columns have been validated. Must be called as the
927 -- last step from insert_validate and update_validate.
928 --
929 -- In Arguments:
930 -- p_rec
931 --
932 -- Post Success:
933 -- If the Descriptive Flexfield structure column and data values are
934 -- all valid this procedure will end normally and processing will
935 -- continue.
936 --
937 -- Post Failure:
938 -- If the Descriptive Flexfield structure column value or any of
939 -- the data values are invalid then an application error is raised as
940 -- a PL/SQL exception.
941 --
942 -- Access Status:
943 -- Internal Row Handler Use Only.
944 --
945 procedure chk_df
946 (p_rec in per_eqt_shd.g_rec_type) is
947 --
948 l_proc varchar2(72) := g_package||'chk_df';
949 --
950 begin
951 hr_utility.set_location('Entering:'||l_proc, 10);
952 --
953 if ((p_rec.qualification_type_id is not null) and (
954 nvl(per_eqt_shd.g_old_rec.attribute_category, hr_api.g_varchar2) <>
955 nvl(p_rec.attribute_category, hr_api.g_varchar2) or
956 nvl(per_eqt_shd.g_old_rec.attribute1, hr_api.g_varchar2) <>
957 nvl(p_rec.attribute1, hr_api.g_varchar2) or
958 nvl(per_eqt_shd.g_old_rec.attribute2, hr_api.g_varchar2) <>
959 nvl(p_rec.attribute2, hr_api.g_varchar2) or
960 nvl(per_eqt_shd.g_old_rec.attribute3, hr_api.g_varchar2) <>
961 nvl(p_rec.attribute3, hr_api.g_varchar2) or
962 nvl(per_eqt_shd.g_old_rec.attribute4, hr_api.g_varchar2) <>
963 nvl(p_rec.attribute4, hr_api.g_varchar2) or
964 nvl(per_eqt_shd.g_old_rec.attribute5, hr_api.g_varchar2) <>
965 nvl(p_rec.attribute5, hr_api.g_varchar2) or
966 nvl(per_eqt_shd.g_old_rec.attribute6, hr_api.g_varchar2) <>
967 nvl(p_rec.attribute6, hr_api.g_varchar2) or
968 nvl(per_eqt_shd.g_old_rec.attribute7, hr_api.g_varchar2) <>
969 nvl(p_rec.attribute7, hr_api.g_varchar2) or
970 nvl(per_eqt_shd.g_old_rec.attribute8, hr_api.g_varchar2) <>
971 nvl(p_rec.attribute8, hr_api.g_varchar2) or
972 nvl(per_eqt_shd.g_old_rec.attribute9, hr_api.g_varchar2) <>
973 nvl(p_rec.attribute9, hr_api.g_varchar2) or
974 nvl(per_eqt_shd.g_old_rec.attribute10, hr_api.g_varchar2) <>
975 nvl(p_rec.attribute10, hr_api.g_varchar2) or
976 nvl(per_eqt_shd.g_old_rec.attribute11, hr_api.g_varchar2) <>
977 nvl(p_rec.attribute11, hr_api.g_varchar2) or
978 nvl(per_eqt_shd.g_old_rec.attribute12, hr_api.g_varchar2) <>
979 nvl(p_rec.attribute12, hr_api.g_varchar2) or
980 nvl(per_eqt_shd.g_old_rec.attribute13, hr_api.g_varchar2) <>
981 nvl(p_rec.attribute13, hr_api.g_varchar2) or
982 nvl(per_eqt_shd.g_old_rec.attribute14, hr_api.g_varchar2) <>
983 nvl(p_rec.attribute14, hr_api.g_varchar2) or
984 nvl(per_eqt_shd.g_old_rec.attribute15, hr_api.g_varchar2) <>
985 nvl(p_rec.attribute15, hr_api.g_varchar2) or
986 nvl(per_eqt_shd.g_old_rec.attribute16, hr_api.g_varchar2) <>
987 nvl(p_rec.attribute16, hr_api.g_varchar2) or
988 nvl(per_eqt_shd.g_old_rec.attribute17, hr_api.g_varchar2) <>
989 nvl(p_rec.attribute17, hr_api.g_varchar2) or
990 nvl(per_eqt_shd.g_old_rec.attribute18, hr_api.g_varchar2) <>
991 nvl(p_rec.attribute18, hr_api.g_varchar2) or
992 nvl(per_eqt_shd.g_old_rec.attribute19, hr_api.g_varchar2) <>
993 nvl(p_rec.attribute19, hr_api.g_varchar2) or
994 nvl(per_eqt_shd.g_old_rec.attribute20, hr_api.g_varchar2) <>
995 nvl(p_rec.attribute20, hr_api.g_varchar2)))
996 or
997 (p_rec.qualification_type_id is null) then
998 --
999 -- Only execute the validation if absolutely necessary:
1000 -- a) During update, the structure column value or any
1004 hr_dflex_utility.ins_or_upd_descflex_attribs
1001 -- of the attribute values have actually changed.
1002 -- b) During insert.
1003 --
1005 (p_appl_short_name => 'PER'
1006 ,p_descflex_name => 'PER_QUALIFICATION_TYPES'
1007 ,p_attribute_category => p_rec.attribute_category
1008 ,p_attribute1_name => 'ATTRIBUTE1'
1009 ,p_attribute1_value => p_rec.attribute1
1010 ,p_attribute2_name => 'ATTRIBUTE2'
1011 ,p_attribute2_value => p_rec.attribute2
1012 ,p_attribute3_name => 'ATTRIBUTE3'
1013 ,p_attribute3_value => p_rec.attribute3
1014 ,p_attribute4_name => 'ATTRIBUTE4'
1015 ,p_attribute4_value => p_rec.attribute4
1016 ,p_attribute5_name => 'ATTRIBUTE5'
1017 ,p_attribute5_value => p_rec.attribute5
1018 ,p_attribute6_name => 'ATTRIBUTE6'
1019 ,p_attribute6_value => p_rec.attribute6
1020 ,p_attribute7_name => 'ATTRIBUTE7'
1021 ,p_attribute7_value => p_rec.attribute7
1022 ,p_attribute8_name => 'ATTRIBUTE8'
1023 ,p_attribute8_value => p_rec.attribute8
1024 ,p_attribute9_name => 'ATTRIBUTE9'
1025 ,p_attribute9_value => p_rec.attribute9
1026 ,p_attribute10_name => 'ATTRIBUTE10'
1027 ,p_attribute10_value => p_rec.attribute10
1028 ,p_attribute11_name => 'ATTRIBUTE11'
1029 ,p_attribute11_value => p_rec.attribute11
1030 ,p_attribute12_name => 'ATTRIBUTE12'
1031 ,p_attribute12_value => p_rec.attribute12
1032 ,p_attribute13_name => 'ATTRIBUTE13'
1033 ,p_attribute13_value => p_rec.attribute13
1034 ,p_attribute14_name => 'ATTRIBUTE14'
1035 ,p_attribute14_value => p_rec.attribute14
1036 ,p_attribute15_name => 'ATTRIBUTE15'
1037 ,p_attribute15_value => p_rec.attribute15
1038 ,p_attribute16_name => 'ATTRIBUTE16'
1039 ,p_attribute16_value => p_rec.attribute16
1040 ,p_attribute17_name => 'ATTRIBUTE17'
1041 ,p_attribute17_value => p_rec.attribute17
1042 ,p_attribute18_name => 'ATTRIBUTE18'
1043 ,p_attribute18_value => p_rec.attribute18
1044 ,p_attribute19_name => 'ATTRIBUTE19'
1045 ,p_attribute19_value => p_rec.attribute19
1046 ,p_attribute20_name => 'ATTRIBUTE20'
1047 ,p_attribute20_value => p_rec.attribute20
1048 );
1049 end if;
1050 --
1051 hr_utility.set_location(' Leaving:'||l_proc, 20);
1052
1053 end chk_df;
1054
1055 -- mvankada
1056 -- -----------------------------------------------------------------------
1057 -- |------------------------------< chk_ddf >-----------------------------|
1058 -- -----------------------------------------------------------------------
1059 --
1060 -- Description:
1061 -- Validates the all Developer Descriptive Flexfield values.
1062 --
1063 -- Pre-conditions:
1064 -- All other columns have been validated. Must be called as the
1065 -- last step from insert_validate and update_validate.
1066 --
1067 -- In Arguments:
1068 -- p_rec
1069 --
1070 -- Post Success:
1071 -- If the Developer Descriptive Flexfield structure column and data values
1072 -- are all valid this procedure will end normally and processing will
1073 -- continue.
1074 --
1075 -- Post Failure:
1076 -- If the Developer Descriptive Flexfield structure column value or any of
1077 -- the data values are invalid then an application error is raised as
1078 -- a PL/SQL exception.
1079 --
1080 -- Access Status:
1081 -- Internal Row Handler Use Only.
1082 --
1083 procedure chk_ddf
1084 (p_rec in per_eqt_shd.g_rec_type) is
1085 --
1086 l_proc varchar2(72) := g_package||'chk_ddf';
1087 --
1088 begin
1089 hr_utility.set_location('Entering:'||l_proc, 10);
1090 --
1091
1092 if ((p_rec.qualification_type_id is not null) and (
1093 nvl(per_eqt_shd.g_old_rec.information_category, hr_api.g_varchar2) <>
1094 nvl(p_rec.information_category, hr_api.g_varchar2) or
1095 nvl(per_eqt_shd.g_old_rec.information1, hr_api.g_varchar2) <>
1096 nvl(p_rec.information1, hr_api.g_varchar2) or
1097 nvl(per_eqt_shd.g_old_rec.information2, hr_api.g_varchar2) <>
1098 nvl(p_rec.information2, hr_api.g_varchar2) or
1099 nvl(per_eqt_shd.g_old_rec.information3, hr_api.g_varchar2) <>
1100 nvl(p_rec.information3, hr_api.g_varchar2) or
1101 nvl(per_eqt_shd.g_old_rec.information4, hr_api.g_varchar2) <>
1102 nvl(p_rec.information4, hr_api.g_varchar2) or
1103 nvl(per_eqt_shd.g_old_rec.information5, hr_api.g_varchar2) <>
1104 nvl(p_rec.information5, hr_api.g_varchar2) or
1105 nvl(per_eqt_shd.g_old_rec.information6, hr_api.g_varchar2) <>
1106 nvl(p_rec.information6, hr_api.g_varchar2) or
1107 nvl(per_eqt_shd.g_old_rec.information7, hr_api.g_varchar2) <>
1108 nvl(p_rec.information7, hr_api.g_varchar2) or
1109 nvl(per_eqt_shd.g_old_rec.information8, hr_api.g_varchar2) <>
1110 nvl(p_rec.information8, hr_api.g_varchar2) or
1111 nvl(per_eqt_shd.g_old_rec.information9, hr_api.g_varchar2) <>
1112 nvl(p_rec.information9, hr_api.g_varchar2) or
1113 nvl(per_eqt_shd.g_old_rec.information10, hr_api.g_varchar2) <>
1114 nvl(p_rec.information10, hr_api.g_varchar2) or
1115 nvl(per_eqt_shd.g_old_rec.information11, hr_api.g_varchar2) <>
1116 nvl(p_rec.information11, hr_api.g_varchar2) or
1120 nvl(p_rec.information13, hr_api.g_varchar2) or
1117 nvl(per_eqt_shd.g_old_rec.information12, hr_api.g_varchar2) <>
1118 nvl(p_rec.information12, hr_api.g_varchar2) or
1119 nvl(per_eqt_shd.g_old_rec.information13, hr_api.g_varchar2) <>
1121 nvl(per_eqt_shd.g_old_rec.information14, hr_api.g_varchar2) <>
1122 nvl(p_rec.information14, hr_api.g_varchar2) or
1123 nvl(per_eqt_shd.g_old_rec.information15, hr_api.g_varchar2) <>
1124 nvl(p_rec.information15, hr_api.g_varchar2) or
1125 nvl(per_eqt_shd.g_old_rec.information16, hr_api.g_varchar2) <>
1126 nvl(p_rec.information16, hr_api.g_varchar2) or
1127 nvl(per_eqt_shd.g_old_rec.information17, hr_api.g_varchar2) <>
1128 nvl(p_rec.information17, hr_api.g_varchar2) or
1129 nvl(per_eqt_shd.g_old_rec.information18, hr_api.g_varchar2) <>
1130 nvl(p_rec.information18, hr_api.g_varchar2) or
1131 nvl(per_eqt_shd.g_old_rec.information19, hr_api.g_varchar2) <>
1132 nvl(p_rec.information19, hr_api.g_varchar2) or
1133 nvl(per_eqt_shd.g_old_rec.information20, hr_api.g_varchar2) <>
1134 nvl(p_rec.information20, hr_api.g_varchar2) or
1135 nvl(per_eqt_shd.g_old_rec.information21, hr_api.g_varchar2) <>
1136 nvl(p_rec.information21, hr_api.g_varchar2) or
1137 nvl(per_eqt_shd.g_old_rec.information22, hr_api.g_varchar2) <>
1138 nvl(p_rec.information22, hr_api.g_varchar2) or
1139 nvl(per_eqt_shd.g_old_rec.information23, hr_api.g_varchar2) <>
1140 nvl(p_rec.information23, hr_api.g_varchar2) or
1141 nvl(per_eqt_shd.g_old_rec.information24, hr_api.g_varchar2) <>
1142 nvl(p_rec.information24, hr_api.g_varchar2) or
1143 nvl(per_eqt_shd.g_old_rec.information25, hr_api.g_varchar2) <>
1144 nvl(p_rec.information25, hr_api.g_varchar2) or
1145 nvl(per_eqt_shd.g_old_rec.information26, hr_api.g_varchar2) <>
1146 nvl(p_rec.information26, hr_api.g_varchar2) or
1147 nvl(per_eqt_shd.g_old_rec.information27, hr_api.g_varchar2) <>
1148 nvl(p_rec.information27, hr_api.g_varchar2) or
1149 nvl(per_eqt_shd.g_old_rec.information28, hr_api.g_varchar2) <>
1150 nvl(p_rec.information28, hr_api.g_varchar2) or
1151 nvl(per_eqt_shd.g_old_rec.information29, hr_api.g_varchar2) <>
1152 nvl(p_rec.information29, hr_api.g_varchar2) or
1153 nvl(per_eqt_shd.g_old_rec.information30, hr_api.g_varchar2) <>
1154 nvl(p_rec.information30, hr_api.g_varchar2)))
1155 or
1156 (p_rec.qualification_type_id is null) then
1157 --
1158 -- Only execute the validation if absolutely necessary:
1159 -- a) During update, the structure column value or any
1160 -- of the attribute values have actually changed.
1161 -- b) During insert.
1162 --
1163 hr_dflex_utility.ins_or_upd_descflex_attribs
1164 (p_appl_short_name => 'PER'
1165 ,p_descflex_name => 'Qualification Types DDF'
1166 ,p_attribute_category => p_rec.information_category
1167 ,p_attribute1_name => 'INFORMATION1'
1168 ,p_attribute1_value => p_rec.information1
1169 ,p_attribute2_name => 'INFORMATION2'
1170 ,p_attribute2_value => p_rec.information2
1171 ,p_attribute3_name => 'INFORMATION3'
1172 ,p_attribute3_value => p_rec.information3
1173 ,p_attribute4_name => 'INFORMATION4'
1174 ,p_attribute4_value => p_rec.information4
1175 ,p_attribute5_name => 'INFORMATION5'
1176 ,p_attribute5_value => p_rec.information5
1177 ,p_attribute6_name => 'INFORMATION6'
1178 ,p_attribute6_value => p_rec.information6
1179 ,p_attribute7_name => 'INFORMATION7'
1180 ,p_attribute7_value => p_rec.information7
1181 ,p_attribute8_name => 'INFORMATION8'
1182 ,p_attribute8_value => p_rec.information8
1183 ,p_attribute9_name => 'INFORMATION9'
1184 ,p_attribute9_value => p_rec.information9
1185 ,p_attribute10_name => 'INFORMATION10'
1186 ,p_attribute10_value => p_rec.information10
1187 ,p_attribute11_name => 'INFORMATION11'
1188 ,p_attribute11_value => p_rec.information11
1189 ,p_attribute12_name => 'INFORMATION12'
1190 ,p_attribute12_value => p_rec.information12
1191 ,p_attribute13_name => 'INFORMATION13'
1192 ,p_attribute13_value => p_rec.information13
1193 ,p_attribute14_name => 'INFORMATION14'
1194 ,p_attribute14_value => p_rec.information14
1195 ,p_attribute15_name => 'INFORMATION15'
1196 ,p_attribute15_value => p_rec.information15
1197 ,p_attribute16_name => 'INFORMATION16'
1198 ,p_attribute16_value => p_rec.information16
1199 ,p_attribute17_name => 'INFORMATION17'
1200 ,p_attribute17_value => p_rec.information17
1201 ,p_attribute18_name => 'INFORMATION18'
1202 ,p_attribute18_value => p_rec.information18
1203 ,p_attribute19_name => 'INFORMATION19'
1204 ,p_attribute19_value => p_rec.information19
1205 ,p_attribute20_name => 'INFORMATION20'
1206 ,p_attribute20_value => p_rec.information20
1207 ,p_attribute21_name => 'INFORMATION21'
1208 ,p_attribute21_value => p_rec.information21
1209 ,p_attribute22_name => 'INFORMATION22'
1210 ,p_attribute22_value => p_rec.information22
1211 ,p_attribute23_name => 'INFORMATION23'
1212 ,p_attribute23_value => p_rec.information23
1213 ,p_attribute24_name => 'INFORMATION24'
1214 ,p_attribute24_value => p_rec.information24
1215 ,p_attribute25_name => 'INFORMATION25'
1216 ,p_attribute25_value => p_rec.information25
1217 ,p_attribute26_name => 'INFORMATION26'
1218 ,p_attribute26_value => p_rec.information26
1219 ,p_attribute27_name => 'INFORMATION27'
1220 ,p_attribute27_value => p_rec.information27
1221 ,p_attribute28_name => 'INFORMATION28'
1222 ,p_attribute28_value => p_rec.information28
1223 ,p_attribute29_name => 'INFORMATION29'
1224 ,p_attribute29_value => p_rec.information29
1225 ,p_attribute30_name => 'INFORMATION30'
1226 ,p_attribute30_value => p_rec.information30
1230 hr_utility.set_location(' Leaving:'||l_proc, 20);
1227 );
1228 end if;
1229
1231
1232 end chk_ddf;
1233
1234
1235 -- ----------------------------------------------------------------------------
1236 -- |---------------------------< insert_validate >----------------------------|
1237 -- ----------------------------------------------------------------------------
1238 Procedure insert_validate(p_rec in per_eqt_shd.g_rec_type,
1239 p_effective_date in date) is
1240 --
1241 l_proc varchar2(72) := g_package||'insert_validate';
1242 --
1243 Begin
1244 --
1245 hr_utility.set_location('Entering:'||l_proc, 5);
1246 --
1247 -- As this data is not within the context of a business group
1248 -- the set_security_group_id procedure has zero passed
1249 -- to it as the default security_group_id.
1250 --
1251 -- Fix for bug 2723065
1252 -- Commented line which hardcodes security profile to '0'
1253 -- hr_api.set_security_group_id(p_security_group_id => 0);
1254 --
1255 hr_utility.set_location('Entering:'||l_proc, 7);
1256 --
1257 -- Call all supporting business operations
1258 --
1259 -- Business Rule Mapping
1260 -- =====================
1261 -- CHK_QUALIFICATION_TYPE_ID
1262 --
1263 chk_qualification_type_id(p_rec.qualification_type_id,
1264 p_rec.object_version_number);
1265
1266 --
1267 -- Business Rule Mapping
1268 -- =====================
1269 -- CHK_CATEGORY
1270 --
1271 chk_category(p_rec.qualification_type_id,
1272 p_rec.category,
1273 p_effective_date,
1274 p_rec.object_version_number);
1275
1276 --
1277 -- Business Rule Mapping
1278 -- =====================
1279 -- CHK_QUAL_FRAMEWORK_ID
1280 --
1281 per_eqt_bus.chk_qual_framework_id
1282 (p_qualification_type_id => p_rec.qualification_type_id
1283 ,p_qual_framework_id => p_rec.qual_framework_id
1284 ,p_object_version_number => p_rec.object_version_number
1285 );
1286
1287 hr_utility.set_location(l_proc, 40);
1288 --
1289 -- Business Rule Mapping
1290 -- =====================
1291 -- CHK_QUALIFICATION_TYPE
1292 --
1293 per_eqt_bus.chk_qualification_type
1294 (p_qualification_type_id => p_rec.qualification_type_id
1295 ,p_qualification_type => p_rec.qualification_type
1296 ,p_object_version_number => p_rec.object_version_number
1297 ,p_effective_date => p_effective_date
1298 );
1299 hr_utility.set_location(l_proc, 50);
1300 --
1301 -- Business Rule Mapping
1302 -- =====================
1303 -- CHK_CREDIT_TYPE
1304 --
1305 per_eqt_bus.chk_credit_type
1306 (p_qualification_type_id => p_rec.qualification_type_id
1307 ,p_credit_type => p_rec.credit_type
1308 ,p_object_version_number => p_rec.object_version_number
1309 ,p_effective_date => p_effective_date
1310 );
1311 hr_utility.set_location(l_proc, 60);
1312 --
1313 -- Business Rule Mapping
1314 -- =====================
1315 -- CHK_LEVEL_TYPE
1316 --
1317 per_eqt_bus.chk_level_type
1318 (p_qualification_type_id => p_rec.qualification_type_id
1319 ,p_level_type => p_rec.level_type
1320 ,p_object_version_number => p_rec.object_version_number
1321 ,p_effective_date => p_effective_date
1322 );
1323 hr_utility.set_location(l_proc, 70);
1324 --
1325 -- Business Rule Mapping
1326 -- =====================
1327 -- CHK_LEVEL_LEVEL
1328 --
1329 per_eqt_bus.chk_level_number
1330 (p_qualification_type_id => p_rec.qualification_type_id
1331 ,p_level_number => p_rec.level_number
1332 ,p_object_version_number => p_rec.object_version_number
1333 ,p_effective_date => p_effective_date
1334 );
1335 hr_utility.set_location(l_proc, 80);
1336 --
1337 -- Business Rule Mapping
1338 -- =====================
1339 -- CHK_FIELD
1340 --
1341 per_eqt_bus.chk_field
1342 (p_qualification_type_id => p_rec.qualification_type_id
1343 ,p_field => p_rec.field
1344 ,p_object_version_number => p_rec.object_version_number
1345 ,p_effective_date => p_effective_date
1346 );
1347 hr_utility.set_location(l_proc, 90);
1348 --
1349 -- Business Rule Mapping
1350 -- =====================
1351 -- CHK_SUB_FIELD
1352 --
1353 per_eqt_bus.chk_sub_field
1354 (p_qualification_type_id => p_rec.qualification_type_id
1355 ,p_sub_field => p_rec.sub_field
1356 ,p_object_version_number => p_rec.object_version_number
1357 ,p_effective_date => p_effective_date
1358 );
1359 hr_utility.set_location(l_proc, 100);
1360 --
1361 -- Business Rule Mapping
1362 -- =====================
1363 -- CHK_PROVIDER
1364 --
1365 -- Rule check provider
1366 --
1367 per_eqt_bus.chk_provider
1368 (p_qualification_type_id => p_rec.qualification_type_id
1369 ,p_provider => p_rec.provider
1370 ,p_object_version_number => p_rec.object_version_number
1371 ,p_effective_date => p_effective_date
1372 );
1373 hr_utility.set_location(l_proc, 110);
1374 --
1375 -- Business Rule Mapping
1376 -- =====================
1377 -- CHK_QA_ORGANIZATION
1378 --
1379 per_eqt_bus.chk_qa_organization
1380 (p_qualification_type_id => p_rec.qualification_type_id
1381 ,p_qa_organization => p_rec.qa_organization
1382 ,p_object_version_number => p_rec.object_version_number
1383 ,p_effective_date => p_effective_date
1384 );
1385 hr_utility.set_location(l_proc, 120);
1386 --
1387 -- Descriptive Flex Check
1388 -- ======================
1389 --
1390 per_eqt_bus.chk_df(p_rec => p_rec);
1391 --
1392 -- mvankada
1393 --
1394 -- Developer Descriptive Flex Check
1395 -- ================================
1396 --
1397 per_eqt_bus.chk_ddf(p_rec => p_rec);
1398 --
1399 hr_utility.set_location(' Leaving:'||l_proc, 10);
1400 --
1401 End insert_validate;
1402 --
1403 -- ----------------------------------------------------------------------------
1404 -- |---------------------------< update_validate >----------------------------|
1405 -- ----------------------------------------------------------------------------
1406 Procedure update_validate(p_rec in per_eqt_shd.g_rec_type,
1407 p_effective_date in date) is
1408 --
1409 l_proc varchar2(72) := g_package||'update_validate';
1410 --
1411 Begin
1412 --
1413 hr_utility.set_location('Entering:'||l_proc, 5);
1414 --
1415 -- As this data is not within the context of a business group
1416 -- the set_security_group_id procedure has zero passed
1417 -- to it as the default security_group_id.
1418 --
1419 -- Fix for bug 2723065
1420 -- Commented line which hardcodes security profile to '0'
1421 --hr_api.set_security_group_id(p_security_group_id => 0);
1422 --
1423 -- Call all supporting business operations
1424 --
1425 -- Business Rule Mapping
1426 -- =====================
1427 -- CHK_QUALIFICATION_TYPE_ID
1428 --
1429 chk_qualification_type_id(p_rec.qualification_type_id,
1430 p_rec.object_version_number);
1431
1432 --
1433 --
1434 -- Business Rule Mapping
1435 -- =====================
1436 -- CHK_CATEGORY
1437 --
1438 chk_category(p_rec.qualification_type_id,
1439 p_rec.category,
1440 p_effective_date,
1441 p_rec.object_version_number);
1442
1443 --
1444 -- Business Rule Mapping
1445 -- =====================
1446 -- CHK_QUAL_FRAMEWORK_ID
1447 --
1448 per_eqt_bus.chk_qual_framework_id
1449 (p_qualification_type_id => p_rec.qualification_type_id
1450 ,p_qual_framework_id => p_rec.qual_framework_id
1451 ,p_object_version_number => p_rec.object_version_number
1452 );
1453 hr_utility.set_location(l_proc, 40);
1454
1455 --
1456 -- Business Rule Mapping
1457 -- =====================
1458 -- CHK_QUALIFICATION_TYPE
1459 --
1460 per_eqt_bus.chk_qualification_type
1461 (p_qualification_type_id => p_rec.qualification_type_id
1462 ,p_qualification_type => p_rec.qualification_type
1463 ,p_object_version_number => p_rec.object_version_number
1464 ,p_effective_date => p_effective_date
1465 );
1466 hr_utility.set_location(l_proc, 50);
1467
1468 --
1469 -- Business Rule Mapping
1470 -- =====================
1471 -- CHK_CREDIT_TYPE
1472 --
1473 per_eqt_bus.chk_credit_type
1474 (p_qualification_type_id => p_rec.qualification_type_id
1475 ,p_credit_type => p_rec.credit_type
1476 ,p_object_version_number => p_rec.object_version_number
1477 ,p_effective_date => p_effective_date
1478 );
1479 hr_utility.set_location(l_proc, 60);
1480
1481 --
1482 -- Business Rule Mapping
1483 -- =====================
1484 -- CHK_LEVEL_TYPE
1485 --
1486 per_eqt_bus.chk_level_type
1487 (p_qualification_type_id => p_rec.qualification_type_id
1488 ,p_level_type => p_rec.level_type
1489 ,p_object_version_number => p_rec.object_version_number
1490 ,p_effective_date => p_effective_date
1491 );
1492 hr_utility.set_location(l_proc, 70);
1493 --
1494 -- Business Rule Mapping
1495 -- =====================
1496 -- CHK_LEVEL_LEVEL
1497 --
1498 per_eqt_bus.chk_level_number
1499 (p_qualification_type_id => p_rec.qualification_type_id
1500 ,p_level_number => p_rec.level_number
1501 ,p_object_version_number => p_rec.object_version_number
1502 ,p_effective_date => p_effective_date
1503 );
1504 hr_utility.set_location(l_proc, 80);
1505 --
1506 -- Business Rule Mapping
1507 -- =====================
1508 -- CHK_FIELD
1509 --
1510 per_eqt_bus.chk_field
1511 (p_qualification_type_id => p_rec.qualification_type_id
1512 ,p_field => p_rec.field
1513 ,p_object_version_number => p_rec.object_version_number
1514 ,p_effective_date => p_effective_date
1515 );
1516 hr_utility.set_location(l_proc, 90);
1517 --
1518 -- Business Rule Mapping
1519 -- =====================
1520 -- CHK_SUB_FIELD
1521 --
1522 per_eqt_bus.chk_sub_field
1523 (p_qualification_type_id => p_rec.qualification_type_id
1524 ,p_sub_field => p_rec.sub_field
1525 ,p_object_version_number => p_rec.object_version_number
1526 ,p_effective_date => p_effective_date
1527 );
1528 hr_utility.set_location(l_proc, 100);
1529 --
1530 -- Business Rule Mapping
1531 -- =====================
1532 -- CHK_PROVIDER
1533 --
1534 -- Rule check provider
1535 --
1536 per_eqt_bus.chk_provider
1537 (p_qualification_type_id => p_rec.qualification_type_id
1538 ,p_provider => p_rec.provider
1539 ,p_object_version_number => p_rec.object_version_number
1540 ,p_effective_date => p_effective_date
1541 );
1542 hr_utility.set_location(l_proc, 110);
1543 --
1544 -- Business Rule Mapping
1545 -- =====================
1546 -- CHK_QA_ORGANIZATION
1547 --
1548 per_eqt_bus.chk_qa_organization
1549 (p_qualification_type_id => p_rec.qualification_type_id
1550 ,p_qa_organization => p_rec.qa_organization
1551 ,p_object_version_number => p_rec.object_version_number
1552 ,p_effective_date => p_effective_date
1553 );
1554 hr_utility.set_location(l_proc, 120);
1555 --
1556 -- Descriptive Flex Check
1557 -- ======================
1558 --
1559 per_eqt_bus.chk_df(p_rec => p_rec);
1560
1561 -- mvankada
1562
1563 -- Developer Descriptive Flex Check
1564 -- ======================
1565 --
1566 per_eqt_bus.chk_ddf(p_rec => p_rec);
1567 --
1568 hr_utility.set_location(' Leaving:'||l_proc, 10);
1569 --
1570 End update_validate;
1571 --
1572 -- ----------------------------------------------------------------------------
1573 -- |---------------------------< delete_validate >----------------------------|
1574 -- ----------------------------------------------------------------------------
1575 Procedure delete_validate(p_rec in per_eqt_shd.g_rec_type) is
1576 --
1577 l_proc varchar2(72) := g_package||'delete_validate';
1578 --
1579 Begin
1580 hr_utility.set_location('Entering:'||l_proc, 5);
1581 --
1582 -- Call all supporting business operations
1583 --
1584 -- Business Rule Mapping
1585 -- =====================
1586 -- CHK_QUALIFICATION_DELETE
1587 --
1588 chk_qualification_delete(p_rec.qualification_type_id);
1589 --
1590 hr_utility.set_location(' Leaving:'||l_proc, 10);
1591 End delete_validate;
1592 --
1593 end per_eqt_bus;