1: Package Body hxc_resource_rules_utils as
2: /* $Header: hxchrrutl.pkb 120.3.12010000.2 2008/08/05 12:03:04 ubhat ship $ */
3: --
4: g_debug boolean :=hr_utility.debug_enabled;
5:
711:
712: IF ( SUBSTR( p_type,1,3) = 'SCL' )
713: THEN
714: if g_debug then
715: hr_utility.set_location('gaz - num of segs is '||to_Char(hxc_resource_rules_utils.g_scl_num_of_segs), 999);
716: end if;
717: IF ( hxc_resource_rules_utils.g_scl_num_of_segs IS NULL )
718: THEN
719: OPEN csr_get_scl_segs;
713: THEN
714: if g_debug then
715: hr_utility.set_location('gaz - num of segs is '||to_Char(hxc_resource_rules_utils.g_scl_num_of_segs), 999);
716: end if;
717: IF ( hxc_resource_rules_utils.g_scl_num_of_segs IS NULL )
718: THEN
719: OPEN csr_get_scl_segs;
720: FETCH csr_get_scl_segs
721: INTO hxc_resource_rules_utils.g_scl_num_of_segs
717: IF ( hxc_resource_rules_utils.g_scl_num_of_segs IS NULL )
718: THEN
719: OPEN csr_get_scl_segs;
720: FETCH csr_get_scl_segs
721: INTO hxc_resource_rules_utils.g_scl_num_of_segs
722: , hxc_resource_rules_utils.g_scl_delimiter
723: , hxc_resource_rules_utils.g_scl_id_flex_num;
724: CLOSE csr_get_scl_segs;
725:
718: THEN
719: OPEN csr_get_scl_segs;
720: FETCH csr_get_scl_segs
721: INTO hxc_resource_rules_utils.g_scl_num_of_segs
722: , hxc_resource_rules_utils.g_scl_delimiter
723: , hxc_resource_rules_utils.g_scl_id_flex_num;
724: CLOSE csr_get_scl_segs;
725:
726: END IF;
719: OPEN csr_get_scl_segs;
720: FETCH csr_get_scl_segs
721: INTO hxc_resource_rules_utils.g_scl_num_of_segs
722: , hxc_resource_rules_utils.g_scl_delimiter
723: , hxc_resource_rules_utils.g_scl_id_flex_num;
724: CLOSE csr_get_scl_segs;
725:
726: END IF;
727: if g_debug then
724: CLOSE csr_get_scl_segs;
725:
726: END IF;
727: if g_debug then
728: hr_utility.set_location('gaz - num of segs is '||to_Char(hxc_resource_rules_utils.g_scl_num_of_segs), 999);
729: end if;
730:
731: -- get sequence
732:
729: end if;
730:
731: -- get sequence
732:
733: l_sequence := hxc_resource_rules_utils.get_sequence ( p_type );
734:
735: -- get value
736:
737: if g_debug then
735: -- get value
736:
737: if g_debug then
738: hr_utility.set_location('gaz - params are ', 999);
739: hr_utility.set_location('gaz - p id_flex_num '||to_char(hxc_resource_rules_utils.g_scl_id_flex_num) , 999);
740: hr_utility.set_location('gaz - p sequence '||to_char(l_Sequence) , 999);
741: hr_utility.set_location('gaz - p max sequence '||to_char(hxc_resource_rules_utils.g_scl_num_of_segs) , 999);
742: hr_utility.set_location('gaz - p delim '||hxc_resource_rules_utils.g_scl_delimiter , 999);
743: hr_utility.set_location('gaz - p type '||p_type , 999);
737: if g_debug then
738: hr_utility.set_location('gaz - params are ', 999);
739: hr_utility.set_location('gaz - p id_flex_num '||to_char(hxc_resource_rules_utils.g_scl_id_flex_num) , 999);
740: hr_utility.set_location('gaz - p sequence '||to_char(l_Sequence) , 999);
741: hr_utility.set_location('gaz - p max sequence '||to_char(hxc_resource_rules_utils.g_scl_num_of_segs) , 999);
742: hr_utility.set_location('gaz - p delim '||hxc_resource_rules_utils.g_scl_delimiter , 999);
743: hr_utility.set_location('gaz - p type '||p_type , 999);
744: hr_utility.set_location('gaz - p value '||p_value , 999);
745: end if;
738: hr_utility.set_location('gaz - params are ', 999);
739: hr_utility.set_location('gaz - p id_flex_num '||to_char(hxc_resource_rules_utils.g_scl_id_flex_num) , 999);
740: hr_utility.set_location('gaz - p sequence '||to_char(l_Sequence) , 999);
741: hr_utility.set_location('gaz - p max sequence '||to_char(hxc_resource_rules_utils.g_scl_num_of_segs) , 999);
742: hr_utility.set_location('gaz - p delim '||hxc_resource_rules_utils.g_scl_delimiter , 999);
743: hr_utility.set_location('gaz - p type '||p_type , 999);
744: hr_utility.set_location('gaz - p value '||p_value , 999);
745: end if;
746:
744: hr_utility.set_location('gaz - p value '||p_value , 999);
745: end if;
746:
747: FOR scl IN csr_get_scl_meaning (
748: p_id_flex_num => hxc_resource_rules_utils.g_scl_id_flex_num
749: , p_sequence => l_sequence
750: , p_max_sequence=> hxc_resource_rules_utils.g_scl_num_of_segs
751: , p_delimiter => hxc_resource_rules_utils.g_scl_delimiter
752: , p_type => p_type
746:
747: FOR scl IN csr_get_scl_meaning (
748: p_id_flex_num => hxc_resource_rules_utils.g_scl_id_flex_num
749: , p_sequence => l_sequence
750: , p_max_sequence=> hxc_resource_rules_utils.g_scl_num_of_segs
751: , p_delimiter => hxc_resource_rules_utils.g_scl_delimiter
752: , p_type => p_type
753: , p_value => p_value )
754: LOOP
747: FOR scl IN csr_get_scl_meaning (
748: p_id_flex_num => hxc_resource_rules_utils.g_scl_id_flex_num
749: , p_sequence => l_sequence
750: , p_max_sequence=> hxc_resource_rules_utils.g_scl_num_of_segs
751: , p_delimiter => hxc_resource_rules_utils.g_scl_delimiter
752: , p_type => p_type
753: , p_value => p_value )
754: LOOP
755:
763:
764: ELSIF ( SUBSTR( p_type,1,6) = 'PEOPLE' )
765: THEN
766: if g_debug then
767: hr_utility.set_location('gaz - num of segs is '||to_Char(hxc_resource_rules_utils.g_people_num_of_segs), 999);
768: end if;
769: IF ( hxc_resource_rules_utils.g_people_num_of_segs IS NULL )
770: THEN
771: OPEN csr_get_people_segs;
765: THEN
766: if g_debug then
767: hr_utility.set_location('gaz - num of segs is '||to_Char(hxc_resource_rules_utils.g_people_num_of_segs), 999);
768: end if;
769: IF ( hxc_resource_rules_utils.g_people_num_of_segs IS NULL )
770: THEN
771: OPEN csr_get_people_segs;
772: FETCH csr_get_people_segs
773: INTO hxc_resource_rules_utils.g_people_num_of_segs
769: IF ( hxc_resource_rules_utils.g_people_num_of_segs IS NULL )
770: THEN
771: OPEN csr_get_people_segs;
772: FETCH csr_get_people_segs
773: INTO hxc_resource_rules_utils.g_people_num_of_segs
774: , hxc_resource_rules_utils.g_people_delimiter
775: , hxc_resource_rules_utils.g_people_id_flex_num;
776: CLOSE csr_get_people_segs;
777:
770: THEN
771: OPEN csr_get_people_segs;
772: FETCH csr_get_people_segs
773: INTO hxc_resource_rules_utils.g_people_num_of_segs
774: , hxc_resource_rules_utils.g_people_delimiter
775: , hxc_resource_rules_utils.g_people_id_flex_num;
776: CLOSE csr_get_people_segs;
777:
778: END IF;
771: OPEN csr_get_people_segs;
772: FETCH csr_get_people_segs
773: INTO hxc_resource_rules_utils.g_people_num_of_segs
774: , hxc_resource_rules_utils.g_people_delimiter
775: , hxc_resource_rules_utils.g_people_id_flex_num;
776: CLOSE csr_get_people_segs;
777:
778: END IF;
779: if g_debug then
776: CLOSE csr_get_people_segs;
777:
778: END IF;
779: if g_debug then
780: hr_utility.set_location('gaz - num of segs is '||to_Char(hxc_resource_rules_utils.g_people_num_of_segs), 999);
781: end if;
782:
783: -- get sequence
784:
781: end if;
782:
783: -- get sequence
784:
785: l_sequence := hxc_resource_rules_utils.get_sequence ( p_type, hxc_resource_rules_utils.g_people_id_flex_num );
786:
787: -- get value
788:
789: if g_debug then
787: -- get value
788:
789: if g_debug then
790: hr_utility.set_location('gaz - params are ', 999);
791: hr_utility.set_location('gaz - p id_flex_num '||to_char(hxc_resource_rules_utils.g_people_id_flex_num) , 999);
792: hr_utility.set_location('gaz - l sequence '||to_char(l_Sequence) , 999);
793: hr_utility.set_location('gaz - p max sequence '||to_char(hxc_resource_rules_utils.g_people_num_of_segs) , 999);
794: hr_utility.set_location('gaz - p delim '||hxc_resource_rules_utils.g_people_delimiter , 999);
795: hr_utility.set_location('gaz - p type '||p_type , 999);
789: if g_debug then
790: hr_utility.set_location('gaz - params are ', 999);
791: hr_utility.set_location('gaz - p id_flex_num '||to_char(hxc_resource_rules_utils.g_people_id_flex_num) , 999);
792: hr_utility.set_location('gaz - l sequence '||to_char(l_Sequence) , 999);
793: hr_utility.set_location('gaz - p max sequence '||to_char(hxc_resource_rules_utils.g_people_num_of_segs) , 999);
794: hr_utility.set_location('gaz - p delim '||hxc_resource_rules_utils.g_people_delimiter , 999);
795: hr_utility.set_location('gaz - p type '||p_type , 999);
796: hr_utility.set_location('gaz - p value '||p_value , 999);
797: end if;
790: hr_utility.set_location('gaz - params are ', 999);
791: hr_utility.set_location('gaz - p id_flex_num '||to_char(hxc_resource_rules_utils.g_people_id_flex_num) , 999);
792: hr_utility.set_location('gaz - l sequence '||to_char(l_Sequence) , 999);
793: hr_utility.set_location('gaz - p max sequence '||to_char(hxc_resource_rules_utils.g_people_num_of_segs) , 999);
794: hr_utility.set_location('gaz - p delim '||hxc_resource_rules_utils.g_people_delimiter , 999);
795: hr_utility.set_location('gaz - p type '||p_type , 999);
796: hr_utility.set_location('gaz - p value '||p_value , 999);
797: end if;
798:
796: hr_utility.set_location('gaz - p value '||p_value , 999);
797: end if;
798:
799: FOR people IN csr_get_people_meaning (
800: p_id_flex_num => hxc_resource_rules_utils.g_people_id_flex_num
801: , p_sequence => l_sequence
802: , p_max_sequence=> hxc_resource_rules_utils.g_people_num_of_segs
803: , p_delimiter => hxc_resource_rules_utils.g_people_delimiter
804: , p_type => p_type
798:
799: FOR people IN csr_get_people_meaning (
800: p_id_flex_num => hxc_resource_rules_utils.g_people_id_flex_num
801: , p_sequence => l_sequence
802: , p_max_sequence=> hxc_resource_rules_utils.g_people_num_of_segs
803: , p_delimiter => hxc_resource_rules_utils.g_people_delimiter
804: , p_type => p_type
805: , p_value => p_value )
806: LOOP
799: FOR people IN csr_get_people_meaning (
800: p_id_flex_num => hxc_resource_rules_utils.g_people_id_flex_num
801: , p_sequence => l_sequence
802: , p_max_sequence=> hxc_resource_rules_utils.g_people_num_of_segs
803: , p_delimiter => hxc_resource_rules_utils.g_people_delimiter
804: , p_type => p_type
805: , p_value => p_value )
806: LOOP
807:
819:
820: ELSIF ( SUBSTR( p_type,1,5) = 'GRADE' )
821: THEN
822: if g_debug then
823: hr_utility.set_location('gaz - num of segs is '||to_Char(hxc_resource_rules_utils.g_grade_num_of_segs), 999);
824: end if;
825: IF ( hxc_resource_rules_utils.g_grade_num_of_segs IS NULL )
826: THEN
827: OPEN csr_get_grade_segs;
821: THEN
822: if g_debug then
823: hr_utility.set_location('gaz - num of segs is '||to_Char(hxc_resource_rules_utils.g_grade_num_of_segs), 999);
824: end if;
825: IF ( hxc_resource_rules_utils.g_grade_num_of_segs IS NULL )
826: THEN
827: OPEN csr_get_grade_segs;
828: FETCH csr_get_grade_segs
829: INTO hxc_resource_rules_utils.g_grade_num_of_segs
825: IF ( hxc_resource_rules_utils.g_grade_num_of_segs IS NULL )
826: THEN
827: OPEN csr_get_grade_segs;
828: FETCH csr_get_grade_segs
829: INTO hxc_resource_rules_utils.g_grade_num_of_segs
830: , hxc_resource_rules_utils.g_grade_delimiter
831: , hxc_resource_rules_utils.g_grade_id_flex_num;
832: CLOSE csr_get_grade_segs;
833:
826: THEN
827: OPEN csr_get_grade_segs;
828: FETCH csr_get_grade_segs
829: INTO hxc_resource_rules_utils.g_grade_num_of_segs
830: , hxc_resource_rules_utils.g_grade_delimiter
831: , hxc_resource_rules_utils.g_grade_id_flex_num;
832: CLOSE csr_get_grade_segs;
833:
834: END IF;
827: OPEN csr_get_grade_segs;
828: FETCH csr_get_grade_segs
829: INTO hxc_resource_rules_utils.g_grade_num_of_segs
830: , hxc_resource_rules_utils.g_grade_delimiter
831: , hxc_resource_rules_utils.g_grade_id_flex_num;
832: CLOSE csr_get_grade_segs;
833:
834: END IF;
835: if g_debug then
832: CLOSE csr_get_grade_segs;
833:
834: END IF;
835: if g_debug then
836: hr_utility.set_location('gaz - num of segs is '||to_Char(hxc_resource_rules_utils.g_grade_num_of_segs), 999);
837: end if;
838:
839: -- get sequence
840:
837: end if;
838:
839: -- get sequence
840:
841: l_sequence := hxc_resource_rules_utils.get_sequence ( p_type, hxc_resource_rules_utils.g_grade_id_flex_num );
842:
843: -- get value
844:
845: if g_debug then
843: -- get value
844:
845: if g_debug then
846: hr_utility.set_location('gaz - params are ', 999);
847: hr_utility.set_location('gaz - p id_flex_num '||to_char(hxc_resource_rules_utils.g_grade_id_flex_num) , 999);
848: hr_utility.set_location('gaz - l sequence '||to_char(l_Sequence) , 999);
849: hr_utility.set_location('gaz - p max sequence '||to_char(hxc_resource_rules_utils.g_grade_num_of_segs) , 999);
850: hr_utility.set_location('gaz - p delim '||hxc_resource_rules_utils.g_grade_delimiter , 999);
851: hr_utility.set_location('gaz - p type '||p_type , 999);
845: if g_debug then
846: hr_utility.set_location('gaz - params are ', 999);
847: hr_utility.set_location('gaz - p id_flex_num '||to_char(hxc_resource_rules_utils.g_grade_id_flex_num) , 999);
848: hr_utility.set_location('gaz - l sequence '||to_char(l_Sequence) , 999);
849: hr_utility.set_location('gaz - p max sequence '||to_char(hxc_resource_rules_utils.g_grade_num_of_segs) , 999);
850: hr_utility.set_location('gaz - p delim '||hxc_resource_rules_utils.g_grade_delimiter , 999);
851: hr_utility.set_location('gaz - p type '||p_type , 999);
852: hr_utility.set_location('gaz - p value '||p_value , 999);
853: end if;
846: hr_utility.set_location('gaz - params are ', 999);
847: hr_utility.set_location('gaz - p id_flex_num '||to_char(hxc_resource_rules_utils.g_grade_id_flex_num) , 999);
848: hr_utility.set_location('gaz - l sequence '||to_char(l_Sequence) , 999);
849: hr_utility.set_location('gaz - p max sequence '||to_char(hxc_resource_rules_utils.g_grade_num_of_segs) , 999);
850: hr_utility.set_location('gaz - p delim '||hxc_resource_rules_utils.g_grade_delimiter , 999);
851: hr_utility.set_location('gaz - p type '||p_type , 999);
852: hr_utility.set_location('gaz - p value '||p_value , 999);
853: end if;
854:
852: hr_utility.set_location('gaz - p value '||p_value , 999);
853: end if;
854:
855: FOR grade IN csr_get_grade_meaning (
856: p_id_flex_num => hxc_resource_rules_utils.g_grade_id_flex_num
857: , p_sequence => l_sequence
858: , p_max_sequence=> hxc_resource_rules_utils.g_grade_num_of_segs
859: , p_delimiter => hxc_resource_rules_utils.g_grade_delimiter
860: , p_type => p_type
854:
855: FOR grade IN csr_get_grade_meaning (
856: p_id_flex_num => hxc_resource_rules_utils.g_grade_id_flex_num
857: , p_sequence => l_sequence
858: , p_max_sequence=> hxc_resource_rules_utils.g_grade_num_of_segs
859: , p_delimiter => hxc_resource_rules_utils.g_grade_delimiter
860: , p_type => p_type
861: , p_value => p_value )
862: LOOP
855: FOR grade IN csr_get_grade_meaning (
856: p_id_flex_num => hxc_resource_rules_utils.g_grade_id_flex_num
857: , p_sequence => l_sequence
858: , p_max_sequence=> hxc_resource_rules_utils.g_grade_num_of_segs
859: , p_delimiter => hxc_resource_rules_utils.g_grade_delimiter
860: , p_type => p_type
861: , p_value => p_value )
862: LOOP
863:
1329: return(FALSE);
1330: end if;
1331: END chk_criteria_exists;
1332:
1333: END hxc_resource_rules_utils;