1 Package per_pem_bus AUTHID CURRENT_USER as
2 /* $Header: pepemrhi.pkh 120.2.12020000.2 2012/09/07 10:39:45 srannama ship $ */
3 --
4 -- ---------------------------------------------------------------------------
5 -- |----------------------< set_security_group_id >--------------------------|
6 -- ---------------------------------------------------------------------------
7 -- {Start Of Comments}
8 --
9 -- Description:
10 -- Sets the security_group_id in CLIENT_INFO for the appropriate business
11 -- group context.
12 -- It is only valid to call this procedure when the primary key
13 -- is within a buisiness group context.
14 --
15 -- Prerequisites:
16 -- The primary key identified by p_previous_employer_id
17 -- already exists.
18 --
19 -- In Arguments:
20 -- p_previous_employer_id
21 --
22 --
23 -- Post Success:
24 -- The security_group_id will be set in CLIENT_INFO.
25 --
26 -- Post Failure:
27 -- An error is raised if the value does not exist.
28 -- An error is also raised when the primary key data is outside
29 -- of a buisiness group context.
30 --
31 -- Access Status:
32 -- Internal Development Use Only.
33 --
34 -- {End Of Comments}
35 -- ---------------------------------------------------------------------------
36 procedure set_security_group_id
37 (p_previous_employer_id in number
38 ,p_associated_column1 in varchar2 default null
39 );
40 --
41 --
42 -- ---------------------------------------------------------------------------
43 -- |---------------------< return_legislation_code >-------------------------|
44 -- ---------------------------------------------------------------------------
45 -- {Start Of Comments}
46 --
47 -- Description:
48 -- Return the legislation code for a specific primary key value
49 --
50 -- Prerequisites:
51 -- The primary key identified by p_previous_employer_id
52 -- already exists.
53 --
54 -- In Arguments:
55 -- p_previous_employer_id
56 --
57 --
58 -- Post Success:
59 -- The business group's legislation code will be returned.
60 --
61 -- Post Failure:
62 -- An error is raised if the value does not exist.
63 --
64 -- Access Status:
65 -- Internal Development Use Only.
66 --
67 -- {End Of Comments}
68 -- ---------------------------------------------------------------------------
69 FUNCTION return_legislation_code
70 (p_previous_employer_id in number
71 ) RETURN varchar2;
72 --
73 --
74 -- ----------------------------------------------------------------------------
75 -- |---------------------------< insert_validate >----------------------------|
76 -- ----------------------------------------------------------------------------
77 -- {Start of comments}
78 --
79 -- Description:
80 -- This procedure controls the execution of all insert business rules
81 -- validation.
82 --
83 -- Prerequisites:
84 -- This private procedure is called from ins procedure.
85 --
86 -- In Parameters:
87 -- A Pl/Sql record structure.
88 --
89 -- Post Success:
90 -- Processing continues.
91 --
92 -- Post Failure:
93 -- If a business rules fails the error will not be handled by this procedure
94 -- unless explicity coded.
95 --
96 -- Developer Implementation Notes:
97 -- For insert, your business rules should be executed from this procedure
98 -- and should ideally (unless really necessary) just be straight procedure
99 -- or function calls. Try and avoid using conditional branching logic.
100 --
101 -- Access Status:
102 -- Internal Row Handler Use Only.
103 --
104 -- {End of comments}
105 -- ----------------------------------------------------------------------------
106 Procedure insert_validate
107 (p_effective_date in date
108 ,p_rec in per_pem_shd.g_rec_type
109 );
110 --
111 -- ----------------------------------------------------------------------------
112 -- |---------------------------< update_validate >----------------------------|
113 -- ----------------------------------------------------------------------------
114 -- {Start Of Comments}
115 --
116 -- Description:
117 -- This procedure controls the execution of all update business rules
118 -- validation.
119 --
120 -- Prerequisites:
121 -- This private procedure is called from upd procedure.
122 --
123 -- In Parameters:
124 -- A Pl/Sql record structure.
125 --
126 -- Post Success:
127 -- Processing continues.
128 --
129 -- Post Failure:
130 -- If a business rules fails the error will not be handled by this procedure
131 -- unless explicity coded.
132 --
133 -- Access Status:
134 -- Internal Row Handler Use Only.
135 --
136 -- {End Of Comments}
137 -- ----------------------------------------------------------------------------
138 Procedure update_validate
139 (p_effective_date in date
140 ,p_rec in per_pem_shd.g_rec_type
141 );
142 --
143 -- ----------------------------------------------------------------------------
144 -- |---------------------------< delete_validate >----------------------------|
145 -- ----------------------------------------------------------------------------
146 -- {Start Of Comments}
147 --
148 -- Description:
149 -- This procedure controls the execution of all delete business rules
150 -- validation.
151 --
152 -- Prerequisites:
153 -- This private procedure is called from del procedure.
154 --
155 -- In Parameters:
156 -- A Pl/Sql record structure.
157 --
158 -- Post Success:
159 -- Processing continues.
160 --
161 -- Post Failure:
162 -- If a business rules fails the error will not be handled by this procedure
163 -- unless explicity coded.
164 --
165 -- Developer Implementation Notes:
166 -- For delete, your business rules should be executed from this procedure
167 -- and should ideally (unless really necessary) just be straight procedure
168 -- or function calls. Try and avoid using conditional branching logic.
169 --
170 -- Access Status:
171 -- Internal Row Handler Use Only.
172 --
173 -- {End Of Comments}
174 -- ----------------------------------------------------------------------------
175 Procedure delete_validate
176 (p_rec in per_pem_shd.g_rec_type
177 );
178 --
179 -- Bug 14316052
180 procedure chk_start_end_dates
181 (p_previous_employer_id
182 in per_previous_employers.previous_employer_id%type
183 ,p_object_version_number
184 in per_previous_employers.object_version_number%type
185 ,p_start_date
186 in per_previous_employers.start_date%type
187 ,p_end_date
188 in per_previous_employers.end_date%TYPE
189 ,p_effective_date
190 IN per_previous_employers.start_date%type
191 ,p_business_group_id
192 IN per_previous_employers.business_group_id%type
193 ,p_employer_type
194 IN per_previous_employers.employer_type%type);
195 --
196 procedure get_period_values
197 (p_start_date in per_previous_employers.start_date%type
198 ,p_end_date in per_previous_employers.end_date%type
199 ,p_period_years out nocopy per_previous_employers.period_years%type
200 ,p_period_months out nocopy per_previous_employers.period_months%type
201 ,p_period_days out nocopy per_previous_employers.period_days%type
202 );
203 --
204 procedure chk_all_assignments
205 (p_previous_employer_id
206 in per_previous_employers.previous_employer_id%type
207 ,p_object_version_number
208 in per_previous_employers.object_version_number%type
209 ,p_all_assignments
210 in per_previous_employers.all_assignments%type);
211 --
212 -- -----------------------------------------------------------------------
213 -- |---------------------------< chk_period_years >----------------------|
214 -- -----------------------------------------------------------------------
215 -- {Start Of Comments}
216 --
217 -- Description:
218 -- This procedure ensures that period_years is between 0 and 99
219 --
220 -- Pre Conditions:
221 -- g_old_rec has been populated with details of the values currently in
222 -- the database.
223 --
224 -- In Arguments:
225 -- p_period_years
226 -- p_previous_employer_id
227 -- p_object_version_number
228 --
229 -- Post Success:
230 -- Processing continues if period_years is between 0 and 99
231 --
232 -- Post Failure:
233 -- An application error is raised if period_years value is not in range
234 -- of 0 and 99.
235 --
236 -- {End Of Comments}
237 -- ----------------------------------------------------------------------------
238 procedure chk_period_years
239 (p_period_years in per_previous_employers.period_years%type
240 ,p_previous_employer_id
241 in per_previous_employers.previous_employer_id%type
242 ,p_object_version_number
243 in per_previous_employers.object_version_number%type);
244 --
245 -- -----------------------------------------------------------------------
246 -- |---------------------------< chk_period_months >---------------------|
247 -- -----------------------------------------------------------------------
248 -- {Start Of Comments}
249 --
250 -- Description:
251 -- This procedure ensures that period_months is between 0 and 11
252 --
253 -- Pre Conditions:
254 -- g_old_rec has been populated with details of the values currently in
255 -- the database.
256 --
257 -- In Arguments:
258 -- p_period_months
259 -- p_previous_employer_id
260 -- p_object_version_number
261 --
262 -- Post Success:
263 -- Processing continues if period_years is between 0 and 11
264 --
265 -- Post Failure:
266 -- An application error is raised if period_months value is not in range
267 -- of 0 and 11.
268 --
269 -- {End Of Comments}
270 -- ----------------------------------------------------------------------------
271 procedure chk_period_months
272 (p_period_months in per_previous_employers.period_months%type
273 ,p_previous_employer_id
274 in per_previous_employers.previous_employer_id%type
275 ,p_object_version_number
276 in per_previous_employers.object_version_number%type);
277 --
278 -- -----------------------------------------------------------------------
279 -- |---------------------------< chk_period_days >-----------------------|
280 -- -----------------------------------------------------------------------
281 -- {Start Of Comments}
282 --
283 -- Description:
284 -- This procedure ensures that period_days is between 0 and 365
285 --
286 -- Pre Conditions:
287 -- g_old_rec has been populated with details of the values currently in
288 -- the database.
289 --
290 -- In Arguments:
291 -- p_period_days
292 -- p_previous_employer_id
293 -- p_object_version_number
294 --
295 -- Post Success:
296 -- Processing continues if period_days is between 0 and 365
297 --
298 -- Post Failure:
299 -- An application error is raised if period_days value is not in range
300 -- of 0 and 365.
301 --
302 -- {End Of Comments}
303 -- ----------------------------------------------------------------------------
304 procedure chk_period_days
305 (p_period_days in per_previous_employers.period_days%type
306 ,p_previous_employer_id
307 in per_previous_employers.previous_employer_id%type
308 ,p_object_version_number
309 in per_previous_employers.object_version_number%type);
310 --
311 end per_pem_bus;