1: Package Body per_seu_bus as
2: /* $Header: peseurhi.pkb 120.4 2005/11/09 13:59:48 vbanner noship $ */
3: --
4: -- ----------------------------------------------------------------------------
5: -- | Private Global Definitions |
4: -- ----------------------------------------------------------------------------
5: -- | Private Global Definitions |
6: -- ----------------------------------------------------------------------------
7: --
8: g_package varchar2(33) := 'per_seu_bus.'; -- Global package name
9: g_debug boolean := hr_utility.debug_enabled;
10: --
11: -- The following two global variables are only to be
12: -- used by the return_legislation_code function.
144: ,p_argument => 'security_user_id'
145: ,p_argument_value => p_security_user_id
146: );
147: --
148: if ( nvl(per_seu_bus.g_security_user_id, hr_api.g_number)
149: = p_security_user_id) then
150: --
151: -- The legislation code has already been found with a previous
152: -- call to this function. Just return the value in the global
151: -- The legislation code has already been found with a previous
152: -- call to this function. Just return the value in the global
153: -- variable.
154: --
155: l_legislation_code := per_seu_bus.g_legislation_code;
156: hr_utility.set_location(l_proc, 20);
157: else
158: --
159: -- The ID is different to the last call to this function
179: -- Set the global variables so the values are
180: -- available for the next call to this function.
181: --
182: close csr_leg_code;
183: per_seu_bus.g_security_user_id := p_security_user_id;
184: per_seu_bus.g_legislation_code := l_legislation_code;
185: end if;
186: hr_utility.set_location(' Leaving:'|| l_proc, 40);
187: return l_legislation_code;
180: -- available for the next call to this function.
181: --
182: close csr_leg_code;
183: per_seu_bus.g_security_user_id := p_security_user_id;
184: per_seu_bus.g_legislation_code := l_legislation_code;
185: end if;
186: hr_utility.set_location(' Leaving:'|| l_proc, 40);
187: return l_legislation_code;
188: end return_legislation_code;
575: --
576: --
577: -- This table does not have a mandatory business_group_id
578: -- column, so client_info is not populated by calling the
579: -- per_seu_bus.set_security_group_id procedure.
580: -- Here, validation is performed without a business group context,
581: -- so any lookup code validation should use HR_STANDARD_LOOKUPS and not
582: -- HR_LOOKUPs.
583: --
586: -- Exclusive validation.
587: --
588: -- Validate the security profile.
589: --
590: per_seu_bus.chk_security_profile_id
591: (p_security_user_id => p_rec.security_user_id
592: ,p_security_profile_id => p_rec.security_profile_id
593: ,p_object_version_number => p_rec.object_version_number);
594:
598:
599: --
600: -- Validate the user.
601: --
602: per_seu_bus.chk_user_id
603: (p_security_user_id => p_rec.security_user_id
604: ,p_user_id => p_rec.user_id
605: ,p_object_version_number => p_rec.object_version_number
606: ,p_effective_date => p_effective_date);
607:
608: --
609: -- Validate the process_in_next_run_flag
610: --
611: per_seu_bus.chk_process_in_next_run_flag
612: (p_security_user_id => p_rec.security_user_id
613: ,p_process_in_next_run_flag => p_rec.process_in_next_run_flag
614: ,p_object_version_number => p_rec.object_version_number);
615:
626: -- Dependent validation.
627: --
628: -- Association uniqueness check.
629: --
630: per_seu_bus.chk_association_unique
631: (p_security_user_id => p_rec.security_user_id
632: ,p_user_id => p_rec.user_id
633: ,p_security_profile_id => p_rec.security_profile_id
634: ,p_object_version_number => p_rec.object_version_number);
660: --
661: --
662: -- This table does not have a mandatory business_group_id
663: -- column, so client_info is not populated by calling the
664: -- per_seu_bus.set_security_group_id procedure.
665: -- Here, validation is performed without a business group context,
666: -- so any lookup code validation should use HR_STANDARD_LOOKUPS and not
667: -- HR_LOOKUPS.
668: --
675:
676: --
677: -- Validate the security profile.
678: --
679: per_seu_bus.chk_security_profile_id
680: (p_security_user_id => p_rec.security_user_id
681: ,p_security_profile_id => p_rec.security_profile_id
682: ,p_object_version_number => p_rec.object_version_number);
683:
687:
688: --
689: -- Validate the user.
690: --
691: per_seu_bus.chk_user_id
692: (p_security_user_id => p_rec.security_user_id
693: ,p_user_id => p_rec.user_id
694: ,p_object_version_number => p_rec.object_version_number
695: ,p_effective_date => p_effective_date);
696:
697: --
698: -- Validate the process_in_next_run_flag
699: --
700: per_seu_bus.chk_process_in_next_run_flag
701: (p_security_user_id => p_rec.security_user_id
702: ,p_process_in_next_run_flag => p_rec.process_in_next_run_flag
703: ,p_object_version_number => p_rec.object_version_number);
704:
715: -- Dependent validation.
716: --
717: -- Association uniqueness check.
718: --
719: per_seu_bus.chk_association_unique
720: (p_security_user_id => p_rec.security_user_id
721: ,p_user_id => p_rec.user_id
722: ,p_security_profile_id => p_rec.security_profile_id
723: ,p_object_version_number => p_rec.object_version_number);
744: --
745: hr_utility.set_location(' Leaving:'||l_proc, 10);
746: End delete_validate;
747: --
748: end per_seu_bus;