DBA Data[Home] [Help]

PACKAGE: APPS.PER_SHA_BUS

Source


1 Package per_sha_bus as
2 /* $Header: pesharhi.pkh 120.0 2005/05/31 21:03:59 appldev noship $ */
3 --
4 --  ---------------------------------------------------------------------------
5 --  |---------------------< chk_non_updateable_args >-------------------------|
6 --  ---------------------------------------------------------------------------
7 --
8 --  Desciption :
9 --    Ensure that no updateable arguments are not being updated
10 --
11 --  Pre-conditions :
12 --    None
13 --
14 --  In Arguments :
15 --    p_rec
16 --
17 --  Post Success :
18 --    Processing continues
19 --
20 --  Post Failure :
21 --    An application error will be raised and processing is
22 --    terminated
23 --
24 --  Access Status :
25 --    Internal Table Handler Use only.
26 --
27 -- {End of Comments}
28 --
29 -- ---------------------------------------------------------------------------
30 procedure chk_non_updateable_args
31   (p_rec              in    per_sha_shd.g_rec_type);
32 --
33 --  ---------------------------------------------------------------------------
34 --  |-------------------------< chk_date_not_taken >--------------------------|
35 --  ---------------------------------------------------------------------------
36 --
37 --  Desciption :
38 --    DATE_NOT_TAKEN is mandatory
39 --    DATE_NOT_TAKEN cannot be updated if the ACTUAL_DATE_TAKEN is not NULL
40 --
41 --  Pre-conditions :
42 --    Format for date_not_taken must be correct
43 --
44 --  In Arguments :
45 --    p_std_holiday_absences_id
46 --    p_date_not_taken
47 --    p_actual_date_taken
48 --    p_expired
49 --    p_object_version_number
50 --
51 --  Post Success :
52 --    Processing continues
53 --
54 --  Post Failure :
55 --    An application error will be raised and processing is
56 --    terminated
57 --
58 --  Access Status :
59 --    Internal Table Handler Use only.
60 --
61 -- {End of Comments}
62 --
63 -- ---------------------------------------------------------------------------
64 procedure chk_date_not_taken
65   (p_std_holiday_absences_id in per_std_holiday_absences.std_holiday_absences_id%TYPE
66   ,p_date_not_taken          in	per_std_holiday_absences.date_not_taken%TYPE
67   ,p_actual_date_taken	     in	per_std_holiday_absences.actual_date_taken%TYPE
68   ,p_expired      	     in	per_std_holiday_absences.expired%TYPE
69   ,p_object_version_number   in per_std_holiday_absences.object_version_number%TYPE
70     );
71 --
72 --  ---------------------------------------------------------------------------
73 --  |---------------------------< chk_person_id >-----------------------------|
74 --  ---------------------------------------------------------------------------
75 --
76 --  Desciption :
77 --    PERSON_ID is mandatory
78 --    PERSON_ID must exist in PER_PEOPLE_F for the date_of the holiday,
79 --     DATE_NOT_TAKEN
80 --
81 --  Pre-conditions :
82 --    None
83 --
84 --  In Arguments :
85 --    p_std_holiday_absences_id
86 --    p_person_id
87 --    p_date_not_taken
88 --
89 --  Post Success :
90 --    Processing continues
91 --
92 --  Post Failure :
93 --    An application error will be raised and processing is
94 --    terminated
95 --
96 --  Access Status :
97 --    Internal Table Handler Use only.
98 --
99 -- {End of Comments}
100 --
101 -- ---------------------------------------------------------------------------
102 procedure chk_person_id
103   (p_std_holiday_absences_id in per_std_holiday_absences.std_holiday_absences_id%TYPE
104   ,p_person_id   	     in	per_std_holiday_absences.person_id%TYPE
105   ,p_date_not_taken          in	per_std_holiday_absences.date_not_taken%TYPE
106     );
107 --
108 --  ---------------------------------------------------------------------------
109 --  |----------------------< chk_standard_holiday_id >------------------------|
110 --  ---------------------------------------------------------------------------
111 --
112 --  Desciption :
113 --    STANDARD_HOLIDAY_ID is mandatory
114 --    STANDARD_HOLIDAY_ID must exist in PER_STANDARD_HOLIDAYS
115 --
116 --  Pre-conditions :
117 --    None
118 --
119 --  In Arguments :
120 --    p_std_holiday_absences_id
121 --    p_standard_holiday_id
122 --    p_actual_date_taken
123 --    p_expired
124 --    p_object_version_number
125 --
126 --  Post Success :
127 --    Processing continues
128 --
129 --  Post Failure :
130 --    An application error will be raised and processing is
131 --    terminated
132 --
133 --  Access Status :
134 --    Internal Table Handler Use only.
135 --
136 -- {End of Comments}
137 --
138 -- ---------------------------------------------------------------------------
139 procedure chk_standard_holiday_id
140   (p_std_holiday_absences_id in per_std_holiday_absences.std_holiday_absences_id%TYPE
141   ,p_standard_holiday_id     in	per_std_holiday_absences.standard_holiday_id%TYPE
142   ,p_actual_date_taken	     in	per_std_holiday_absences.actual_date_taken%TYPE
143   ,p_expired                 in	per_std_holiday_absences.expired%TYPE
144   ,p_object_version_number   in per_std_holiday_absences.object_version_number%TYPE
145     );
146 --
147 --  ---------------------------------------------------------------------------
148 --  |-----------------------< chk_actual_date_taken >-------------------------|
149 --  ---------------------------------------------------------------------------
150 --
151 --  Desciption :
152 --    ACTUAL_DATE_TAKEN must not overlap with any of the Standard Holidays
153 --    defined for the current Legislation/Sub-legislation
154 --
155 --  Pre-conditions :
156 --    None
157 --
158 --  In Arguments :
159 --    p_std_holiday_absences_id
160 --    p_actual_date_taken
161 --    p_person_id
162 --    p_expired
163 --    p_object_version_number
164 --
165 --  Post Success :
166 --    Processing continues
167 --
168 --  Post Failure :
169 --    An application error will be raised and processing is
170 --    terminated
171 --
172 --  Access Status :
173 --    Internal Table Handler Use only.
174 --
175 -- {End of Comments}
176 --
177 -- ---------------------------------------------------------------------------
178 procedure chk_actual_date_taken
179   (p_std_holiday_absences_id in per_std_holiday_absences.std_holiday_absences_id%TYPE
180   ,p_actual_date_taken	     in	per_std_holiday_absences.actual_date_taken%TYPE
181   ,p_person_id       	     in	per_std_holiday_absences.person_id%TYPE
182   ,p_expired        	     in	per_std_holiday_absences.expired%TYPE
183   ,p_object_version_number   in per_std_holiday_absences.object_version_number%TYPE
184     );
185 --
186 --  ---------------------------------------------------------------------------
187 --  |-----------------------------< chk_expired >-----------------------------|
188 --  ---------------------------------------------------------------------------
189 --
190 --  Desciption :
191 --    EXPIRED cannot be entered if the ACTUAL_DATE_TAKEN is not NULL
192 --
193 --  Pre-conditions :
194 --    This must be either 'Y' or 'N'
195 --
196 --  In Arguments :
197 --    p_std_holiday_absences_id
198 --    p_expired
199 --    p_actual_date_taken
200 --    p_object_version_number
201 --
202 --  Post Success :
203 --    Processing continues
204 --
205 --  Post Failure :
206 --    An application error will be raised and processing is
207 --    terminated
208 --
209 --  Access Status :
210 --    Internal Table Handler Use only.
211 --
212 -- {End of Comments}
213 --
214 -- ---------------------------------------------------------------------------
215 procedure chk_expired
216   (p_std_holiday_absences_id in per_std_holiday_absences.std_holiday_absences_id%TYPE
217   ,p_expired                 in	per_std_holiday_absences.expired%TYPE
218   ,p_actual_date_taken	     in	per_std_holiday_absences.actual_date_taken%TYPE
219   ,p_object_version_number   in per_std_holiday_absences.object_version_number%TYPE
220     );
221 --
222 -- ----------------------------------------------------------------------------
223 -- |---------------------------< insert_validate >----------------------------|
224 -- ----------------------------------------------------------------------------
225 -- {Start Of Comments}
226 --
227 -- Description:
228 --   This procedure controls the execution of all insert business rules
229 --   validation.
230 --
231 -- Prerequisites:
232 --   This private procedure is called from ins procedure.
233 --
234 -- In Parameters:
235 --   A Pl/Sql record structre.
236 --
237 -- Post Success:
238 --   Processing continues.
239 --
240 -- Post Failure:
241 --   If a business rules fails the error will not be handled by this procedure
242 --   unless explicity coded.
243 --
244 -- Developer Implementation Notes:
245 --   For insert, your business rules should be executed from this procedure and
246 --   should ideally (unless really necessary) just be straight procedure or
247 --   function calls. Try and avoid using conditional branching logic.
248 --
249 -- Access Status:
250 --   Internal Row Handler Use Only.
251 --
252 -- {End Of Comments}
253 -- ----------------------------------------------------------------------------
254 Procedure insert_validate(p_rec in per_sha_shd.g_rec_type);
255 --
256 -- ----------------------------------------------------------------------------
257 -- |---------------------------< update_validate >----------------------------|
258 -- ----------------------------------------------------------------------------
259 -- {Start Of Comments}
260 --
261 -- Description:
262 --   This procedure controls the execution of all update business rules
263 --   validation.
264 --
265 -- Prerequisites:
266 --   This private procedure is called from upd procedure.
267 --
268 -- In Parameters:
269 --   A Pl/Sql record structre.
270 --
271 -- Post Success:
272 --   Processing continues.
273 --
274 -- Post Failure:
275 --   If a business rules fails the error will not be handled by this procedure
276 --   unless explicity coded.
277 --
278 -- Developer Implementation Notes:
279 --   For update, your business rules should be executed from this procedure and
280 --   should ideally (unless really necessary) just be straight procedure or
281 --   function calls. Try and avoid using conditional branching logic.
282 --
283 -- Access Status:
284 --   Internal Row Handler Use Only.
285 --
286 -- {End Of Comments}
287 -- ----------------------------------------------------------------------------
288 Procedure update_validate(p_rec in per_sha_shd.g_rec_type);
289 --
290 -- ----------------------------------------------------------------------------
291 -- |---------------------------< delete_validate >----------------------------|
292 -- ----------------------------------------------------------------------------
293 -- {Start Of Comments}
294 --
295 -- Description:
296 --   This procedure controls the execution of all delete business rules
297 --   validation.
298 --
299 -- Prerequisites:
300 --   This private procedure is called from del procedure.
301 --
302 -- In Parameters:
303 --   A Pl/Sql record structre.
304 --
305 -- Post Success:
306 --   Processing continues.
307 --
308 -- Post Failure:
309 --   If a business rules fails the error will not be handled by this procedure
310 --   unless explicity coded.
311 --
312 -- Developer Implementation Notes:
313 --   For delete, your business rules should be executed from this procedure and
314 --   should ideally (unless really necessary) just be straight procedure or
315 --   function calls. Try and avoid using conditional branching logic.
316 --
317 -- Access Status:
318 --   Internal Row Handler Use Only.
319 --
320 -- {End Of Comments}
321 -- ----------------------------------------------------------------------------
322 Procedure delete_validate(p_rec in per_sha_shd.g_rec_type);
323 --
324 --  ---------------------------------------------------------------------------
325 --  |---------------------< return_legislation_code >-------------------------|
326 --  ---------------------------------------------------------------------------
327 --
328 --  Description:
329 --    Return the legislation code for a specific person
330 --
331 --  Prerequisites:
332 --    The person identified by p_person_id already exists.
333 --
334 --  In Arguments:
335 --    p_person_id
336 --
337 --  Post Success:
338 --    If the person is found this function will return the person's business
339 --    group legislation code.
340 --
341 --  Post Failure:
342 --    An error is raised if the person does not exist.
343 --
344 --  Access Status:
345 --    Internal Development Use Only.
346 --
347 function return_legislation_code
348   (p_std_holiday_absences_id             in number
349   ) return varchar2;
350 --
351 end per_sha_bus;