1 Package pay_etu_bus as
2 /* $Header: pyeturhi.pkh 120.0 2005/05/29 04:45:36 appldev noship $ */
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_element_type_usage_id
17 -- already exists.
18 --
19 -- In Arguments:
20 -- p_element_type_usage_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_element_type_usage_id in number
38 );
39 --
40 --
41 -- ---------------------------------------------------------------------------
42 -- |---------------------< return_legislation_code >-------------------------|
43 -- ---------------------------------------------------------------------------
44 -- {Start Of Comments}
45 --
46 -- Description:
47 -- Return the legislation code for a specific primary key value
48 --
49 -- Prerequisites:
50 -- The primary key identified by p_element_type_usage_id
51 -- already exists.
52 --
53 -- In Arguments:
54 -- p_element_type_usage_id
55 --
56 --
57 -- Post Success:
58 -- The business group's legislation code will be returned.
59 --
60 -- Post Failure:
61 -- An error is raised if the value does not exist.
62 --
63 -- Access Status:
64 -- Internal Development Use Only.
65 --
66 -- {End Of Comments}
67 -- ---------------------------------------------------------------------------
68 FUNCTION return_legislation_code
69 (p_element_type_usage_id in number
70 ) RETURN varchar2;
71 --
72 -- ---------------------------------------------------------------------------
73 -- |--------------------------< chk_run_type_id >----------------------------|
74 -- ---------------------------------------------------------------------------
75 --
76 -- Description:
77 -- Checks the validity of the run_type_id entered by carrying out
78 -- the following:
79 -- - check that the run_type_id exists
80 -- - check that the following rules apply:
81 --
82 -- Mode Run Type Available Components Resulting usage
83 -- ------ ----------- ------------------------------- ---------------
84 -- USER USER USER, STARTUP, GENERIC USER
85 -- USER STARTUP USER, STARTUP, GENERIC USER
86 -- USER GENERIC USER, STARTUP, GENERIC USER
87 -- STARTUP USER This mode cannot access USER Error
88 -- run types
89 -- STARTUP STARTUP STARTUP, GENERIC STARTUP
90 -- STARTUP GENERIC STARTUP, GENERIC STARTUP
91 -- GENERIC USER This mode cannot access USER Error
92 -- run types
93 -- GENERIC STARTUP This mode cannot access STARTUP Error
94 -- run types
95 -- GENERIC GENERIC GENERIC GENERIC
96 --
97 -- Pre-conditions:
98 -- None
99 --
100 -- In Arguments:
101 -- p_element_type_usage_id
102 -- p_run_type_id
103 -- p_effective_date
104 -- p_business_group_id
105 -- p_legislation_code
106 --
107 -- Post Success:
108 -- If the run_type_id is valid then processing continues
109 --
110 -- Post Failure:
111 -- If any of the following cases are true then an application error will be
112 -- raised and processing is terminated:
113 --
114 -- a) run_type_id does not exist
115 --
116 -- Access Status:
117 -- Internal Row Handler Use Only.
118 --
119 -- ---------------------------------------------------------------------------
120 PROCEDURE chk_run_type_id
121 (p_element_type_usage_id in number
122 ,p_run_type_id in number
123 ,p_effective_date in date
124 ,p_business_group_id in number
125 ,p_legislation_code in varchar2);
126 --
127 -- ---------------------------------------------------------------------------
128 -- |------------------------< chk_element_type_id >--------------------------|
129 -- ---------------------------------------------------------------------------
130 --
131 -- Description:
132 -- Checks the validity of the element_type_id entered by carrying out
133 -- the following:
134 -- - check that the element_type_id exists
135 -- - check that the following rules apply:
136 --
137 -- Mode Element Type Available Components Resulting usage
138 -- ------ ----------- ------------------------------- ---------------
139 -- USER USER USER, STARTUP, GENERIC USER
140 -- USER STARTUP USER, STARTUP, GENERIC USER
141 -- USER GENERIC USER, STARTUP, GENERIC USER
142 -- STARTUP USER This mode cannot access USER Error
143 -- element types.
144 -- STARTUP STARTUP STARTUP, GENERIC STARTUP
145 -- STARTUP GENERIC STARTUP, GENERIC STARTUP
146 -- GENERIC USER This mode cannot access USER Error
147 -- element types.
148 -- GENERIC STARTUP This mode cannot access STARTUP Error
149 -- element types.
150 -- GENERIC GENERIC GENERIC GENERIC
151 --
152 -- Pre-conditions:
153 -- None
154 --
155 -- In Arguments:
156 -- p_element_type_usage_id
157 -- p_element_type_id
158 -- p_effective_date
159 -- p_business_group_id
160 -- p_legislation_code
161 --
162 -- Post Success:
163 -- If the element_type_id is valid then processing continues
164 --
165 -- Post Failure:
166 -- If any of the following cases are true then an application error will be
167 -- raised and processing is terminated:
168 --
169 -- a) element_type_id does not exist
170 --
171 -- Access Status:
172 -- Internal Row Handler Use Only.
173 --
174 -- ---------------------------------------------------------------------------
175 PROCEDURE chk_element_type_id
176 (p_element_type_usage_id in number
177 ,p_element_type_id in number
178 ,p_effective_date in date
179 ,p_business_group_id in number
180 ,p_legislation_code in varchar2);
181 --
182 -- ----------------------------------------------------------------------------
183 -- |-------------------------< chk_inclusion_flag >---------------------------|
184 -- ----------------------------------------------------------------------------
185 -- {Start Of Comments}
186 --
187 -- Description:
188 -- This procedure is used to ensure that the inclusion_flag is one of the
189 -- following:
190 -- Y - Yes
191 -- N - No
192 --
193 -- Pre Conditions:
194 -- g_old_rec has been populated with details of the values currently in
195 -- the database.
196 --
197 -- In Arguments:
198 -- p_rec has been populated with the updated values the user would like the
199 -- record set to.
200 --
201 -- Post Success:
202 -- Processing continues if a valid inclusion_flag has been entered.
203 --
204 -- Post Failure:
205 -- An application error is raised if an invalid inclusion_flag has been entered.
206 --
207 -- {End Of Comments}
208 -- ----------------------------------------------------------------------------
209 Procedure chk_inclusion_flag
210 (p_effective_date in date
211 ,p_validation_start_date in date
212 ,p_validation_end_date in date
213 ,p_inclusion_flag in varchar2);
214 --
215 -- ---------------------------------------------------------------------------
216 -- |--------------------------< chk_bg_leg_code >----------------------------|
217 -- ---------------------------------------------------------------------------
218 --
219 -- Description:
220 -- Checks the validity of the business_group_id and legislation code entered
221 -- by enforcing the following:
222 --
223 -- Mode Business Group ID Legislation Code
224 -- ------------- -------------------- ------------------------------
225 -- USER NOT NULL NULL
226 -- STARTUP NULL NOT NULL
227 -- GENERIC NULL NULL
228 --
229 -- Pre-conditions:
230 -- None
231 --
232 -- In Arguments:
233 -- p_business_group_id
234 -- p_legislation_code
235 --
236 -- Post Success:
237 -- If the combination is valid then processing continues
238 --
239 -- Post Failure:
240 -- If any of the following cases are true then an application error will be
241 -- raised and processing is terminated:
242 --
243 -- a) Combination of business_group_id and legislation_code is anything other
244 -- than detailed above.
245 --
246 -- Access Status:
247 -- Internal Row Handler Use Only.
248 --
249 -- ---------------------------------------------------------------------------
250 PROCEDURE chk_bg_leg_code
251 (p_business_group_id in number
252 ,p_legislation_code in varchar2);
253 --
254 -- ----------------------------------------------------------------------------
255 -- |---------------------------< insert_validate >----------------------------|
256 -- ----------------------------------------------------------------------------
257 -- {Start Of Comments}
258 --
259 -- Description:
260 -- This procedure controls the execution of all insert business rules
261 -- validation.
262 --
263 -- Prerequisites:
264 -- This private procedure is called from ins procedure.
265 --
266 -- In Parameters:
267 -- A Pl/Sql record structre.
268 --
269 -- Post Success:
270 -- Processing continues.
271 --
272 -- Post Failure:
273 -- If a business rules fails the error will not be handled by this procedure
274 -- unless explicity coded.
275 --
276 -- Developer Implementation Notes:
277 -- For insert, your business rules should be executed from this procedure and
278 -- should ideally (unless really necessary) just be straight procedure or
279 -- function calls. Try and avoid using conditional branching logic.
280 --
281 -- Access Status:
282 -- Internal Row Handler Use Only.
283 --
284 -- {End Of Comments}
285 -- ----------------------------------------------------------------------------
286 Procedure insert_validate
287 (p_rec in pay_etu_shd.g_rec_type
288 ,p_effective_date in date
289 ,p_datetrack_mode in varchar2
290 ,p_validation_start_date in date
291 ,p_validation_end_date in date
292 );
293 --
294 -- ----------------------------------------------------------------------------
295 -- |---------------------------< update_validate >----------------------------|
296 -- ----------------------------------------------------------------------------
297 -- {Start Of Comments}
298 --
299 -- Description:
300 -- This procedure controls the execution of all update business rules
301 -- validation.
302 --
303 -- Prerequisites:
304 -- This private procedure is called from upd procedure.
305 --
306 -- In Parameters:
307 -- A Pl/Sql record structre.
308 --
309 -- Post Success:
310 -- Processing continues.
311 --
312 -- Post Failure:
313 -- If a business rules fails the error will not be handled by this procedure
314 -- unless explicity coded.
315 --
316 -- Developer Implementation Notes:
317 -- For update, your business rules should be executed from this procedure and
318 -- should ideally (unless really necessary) just be straight procedure or
319 -- function calls. Try and avoid using conditional branching logic.
320 --
321 -- Access Status:
322 -- Internal Row Handler Use Only.
323 --
324 -- {End Of Comments}
325 -- ----------------------------------------------------------------------------
326 Procedure update_validate
327 (p_rec in pay_etu_shd.g_rec_type
328 ,p_effective_date in date
329 ,p_datetrack_mode in varchar2
330 ,p_validation_start_date in date
331 ,p_validation_end_date in date
332 );
333 --
334 -- ----------------------------------------------------------------------------
335 -- |---------------------------< delete_validate >----------------------------|
336 -- ----------------------------------------------------------------------------
337 -- {Start Of Comments}
338 --
339 -- Description:
340 -- This procedure controls the execution of all delete business rules
341 -- validation.
342 --
343 -- Prerequisites:
344 -- This private procedure is called from del procedure.
345 --
346 -- In Parameters:
347 -- A Pl/Sql record structure.
348 --
349 -- Post Success:
350 -- Processing continues.
351 --
352 -- Post Failure:
353 -- If a business rules fails the error will not be handled by this procedure
354 -- unless explicity coded.
355 --
356 -- Developer Implementation Notes:
357 -- For delete, your business rules should be executed from this procedure and
358 -- should ideally (unless really necessary) just be straight procedure or
359 -- function calls. Try and avoid using conditional branching logic.
360 --
361 -- Access Status:
362 -- Internal Row Handler Use Only.
363 --
364 -- {End Of Comments}
365 -- ----------------------------------------------------------------------------
366 Procedure delete_validate
367 (p_rec in pay_etu_shd.g_rec_type
368 ,p_effective_date in date
369 ,p_datetrack_mode in varchar2
370 ,p_validation_start_date in date
371 ,p_validation_end_date in date
372 );
373 --
374 end pay_etu_bus;