[Home] [Help]
PACKAGE BODY: APPS.HR_ADI_LOB_BUS
Source
1 Package Body hr_adi_lob_bus as
2 /* $Header: hrlobrhi.pkb 120.0 2005/05/31 01:18:46 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Private Global Definitions |
6 -- ----------------------------------------------------------------------------
7 --
8 g_package varchar2(33) := ' hr_adi_lob_bus.'; -- Global package name
9 --
10 -- The following two global variables are only to be
11 -- used by the return_legislation_code function.
12 --
13 -- g_legislation_code varchar2(150) default null;
14 -- g_file_id number default null;
15 --
16 -- ---------------------------------------------------------------------------
17 -- |----------------------< set_security_group_id >--------------------------|
18 -- ---------------------------------------------------------------------------
19 --
20 -- Procedure set_security_group_id
21 -- (p_file_id in number
22 -- ) is
23 --
24 --
25 -- Declare local variables
26 --
27 -- l_proc varchar2(72) := g_package||'set_security_group_id';
28 --
29 -- begin
30 --
31 -- hr_utility.set_location('Entering:'|| l_proc, 10);
32 --
33 -- Ensure that all the mandatory parameter are not null
34 --
35 -- hr_api.mandatory_arg_error
36 -- (p_api_name => l_proc
37 -- ,p_argument => 'file_id'
38 -- ,p_argument_value => p_file_id
39 -- );
40 --
41 -- hr_utility.set_location(' Leaving:'|| l_proc, 20);
42 --
43 -- end set_security_group_id;
44 --
45 -- ---------------------------------------------------------------------------
46 -- |---------------------< return_legislation_code >-------------------------|
47 -- ---------------------------------------------------------------------------
48 --
49 -- Function return_legislation_code
50 -- (p_file_id in number
51 -- )
52 -- Return Varchar2 Is
53 --
54 -- Declare local variables
55 --
56 -- l_legislation_code varchar2(150);
57 -- l_proc varchar2(72) := g_package||'return_legislation_code';
58 --
59 -- Begin
60 --
61 -- hr_utility.set_location('Entering:'|| l_proc, 10);
62 --
63 -- Ensure that all the mandatory parameter are not null
64 --
65 -- hr_api.mandatory_arg_error
66 -- (p_api_name => l_proc
67 -- ,p_argument => 'file_id'
68 -- ,p_argument_value => p_file_id
69 -- );
70 --
71 -- hr_utility.set_location(' Leaving:'|| l_proc, 40);
72 -- return l_legislation_code;
73 -- end return_legislation_code;
74 --
75 -- ----------------------------------------------------------------------------
76 -- |-----------------------< chk_non_updateable_args >------------------------|
77 -- ----------------------------------------------------------------------------
78 -- {Start Of Comments}
79 --
80 -- Description:
81 -- This procedure is used to ensure that non updateable attributes have
82 -- not been updated. If an attribute has been updated an error is generated.
83 --
84 -- Pre Conditions:
85 -- g_old_rec has been populated with details of the values currently in
86 -- the database.
87 --
88 -- In Arguments:
89 -- p_rec has been populated with the updated values the user would like the
90 -- record set to.
91 --
92 -- Post Success:
93 -- Processing continues if all the non updateable attributes have not
94 -- changed.
95 --
96 -- Post Failure:
97 -- An application error is raised if any of the non updatable attributes
98 -- have been altered.
99 --
100 -- {End Of Comments}
101 -- ----------------------------------------------------------------------------
102 Procedure chk_non_updateable_args
103 (p_effective_date in date
104 ,p_rec in hr_adi_lob_shd.g_rec_type
105 ) IS
106 --
107 l_proc varchar2(72) := g_package || 'chk_non_updateable_args';
108 l_error EXCEPTION;
109 l_argument varchar2(30);
110 --
111 Begin
112 --
113 -- Only proceed with the validation if a row exists for the current
114 -- record in the HR Schema.
115 --
116 IF NOT hr_adi_lob_shd.api_updating
117 (p_file_id => p_rec.file_id
118 ) THEN
119 fnd_message.set_name('PER', 'HR_6153_ALL_PROCEDURE_FAIL');
120 fnd_message.set_token('PROCEDURE ', l_proc);
121 fnd_message.set_token('STEP ', '5');
122 fnd_message.raise_error;
123 END IF;
124 --
125 EXCEPTION
126 WHEN l_error THEN
127 hr_api.argument_changed_error
128 (p_api_name => l_proc
129 ,p_argument => l_argument);
130 WHEN OTHERS THEN
131 RAISE;
132 hr_utility.set_location(' Leaving:'|| l_proc, 10);
133 End chk_non_updateable_args;
134 --
135 -- ----------------------------------------------------------------------------
136 -- |---------------------------< insert_validate >----------------------------|
137 -- ----------------------------------------------------------------------------
138 Procedure insert_validate
139 (p_effective_date in date
140 ,p_rec in hr_adi_lob_shd.g_rec_type
141 ) is
142 --
143 l_proc varchar2(72) := g_package||'insert_validate';
144 --
145 Begin
146 hr_utility.set_location('Entering:'||l_proc, 5);
147 --
148 -- Call all supporting business operations
149 --
150 --
151 -- "-- CLIENT_INFO not set. No lookup validation or joins to HR_LOOKUPS."
152 --
153 -- Validate Dependent Attributes
154 --
155 --
156 hr_utility.set_location(' Leaving:'||l_proc, 10);
157 End insert_validate;
158 --
159 -- ----------------------------------------------------------------------------
160 -- |---------------------------< update_validate >----------------------------|
161 -- ----------------------------------------------------------------------------
162 Procedure update_validate
163 (p_effective_date in date
164 ,p_rec in hr_adi_lob_shd.g_rec_type
165 ) is
166 --
167 l_proc varchar2(72) := g_package||'update_validate';
168 --
169 Begin
170 hr_utility.set_location('Entering:'||l_proc, 5);
171 --
172 -- Call all supporting business operations
173 --
174 --
175 -- "-- CLIENT_INFO not set. No lookup validation or joins to HR_LOOKUPS."
176 --
177 -- Validate Dependent Attributes
178 --
179 chk_non_updateable_args
180 (p_effective_date => p_effective_date
181 ,p_rec => p_rec
182 );
183 --
184 --
185 hr_utility.set_location(' Leaving:'||l_proc, 10);
186 End update_validate;
187 --
188 -- ----------------------------------------------------------------------------
189 -- |---------------------------< delete_validate >----------------------------|
190 -- ----------------------------------------------------------------------------
191 Procedure delete_validate
192 (p_rec in hr_adi_lob_shd.g_rec_type
193 ) is
194 --
195 l_proc varchar2(72) := g_package||'delete_validate';
196 --
197 Begin
198 hr_utility.set_location('Entering:'||l_proc, 5);
199 --
200 -- Call all supporting business operations
201 --
202 hr_utility.set_location(' Leaving:'||l_proc, 10);
203 End delete_validate;
204 --
205 end hr_adi_lob_bus;