DBA Data[Home] [Help]

PACKAGE: APPS.PAY_PYR_BUS

Source


1 PACKAGE pay_pyr_bus as
2 /* $Header: pypyrrhi.pkh 120.0 2005/05/29 08:11:24 appldev noship $ */
3 --
4 --  ---------------------------------------------------------------------------
5 --  |--------------------------------< chk_name >-----------------------------|
6 --  ---------------------------------------------------------------------------
7 --
8 --  Desciption :
9 --
10 --    Validate name is mandatory
11 --    Validate name, rate_type is unique for rate_type <> 'A'
12 --    Validate name, rate_type, asg_rate_type is unique for rate_type='A'
13 --
14 --
15 --  Pre-conditions :
16 --
17 --
18 --  In Arguments :
19 --    p_name
20 --    p_rate_type
21 --    p_asg_rate_type
22 --
23 --  Post Success :
24 --    Processing continues
25 --
26 --  Post Failure :
27 --    An application error will be raised and processing is
28 --    terminated
29 --
30 --  Access Status :
31 --    Internal Table Handler Use only.
32 --
33 -- {End of Comments}
34 --
35 -- ---------------------------------------------------------------------------
36 --
37 PROCEDURE chk_name
38   (p_name                  IN pay_rates.name%TYPE
39   ,p_rate_id               IN pay_rates.rate_id%TYPE
40   ,p_business_group_id     IN pay_rates.business_group_id%TYPE
41   ,p_object_version_number IN pay_rates.object_version_number%TYPE
42   ,p_rate_type             IN pay_rates.rate_type%TYPE
43   ,p_asg_rate_type         IN pay_rates.asg_rate_type%TYPE);
44 --
45 --  ---------------------------------------------------------------------------
46 --  |----------------------------< chk_rate_basis >---------------------------|
47 --  ---------------------------------------------------------------------------
48 --
49 --
50 --  Desciption :
51 --
52 --    Validate rate_basis exists in hr_lookups for lookup_type RATE_BASIS
53 --
54 --
55 --  Pre-conditions :
56 --
57 --
58 --  In Arguments :
59 --    p_rate_basis
60 --    p_effective_date
61 --    p_rate_id
62 --    p_object_version_number
63 --
64 --  Post Success :
65 --    Processing continues
66 --
67 --  Post Failure :
68 --    An application error will be raised and processing is
69 --    terminated
70 --
71 --  Access Status :
72 --    Internal Table Handler Use only.
73 --
74 -- {End of Comments}
75 --
76 PROCEDURE chk_rate_basis
77   (p_rate_basis            IN pay_rates.rate_basis%TYPE
78   ,p_effective_date        IN DATE
79   ,p_rate_id               IN pay_rates.rate_id%TYPE
80   ,p_object_version_number IN pay_rates.object_version_number%TYPE);
81 --
82 --  ---------------------------------------------------------------------------
83 --  |----------------------------< chk_rate_uom >----------------------------|
84 --  ---------------------------------------------------------------------------
85 --
86 --
87 --  Desciption :
88 --
89 --    Validate rate_uom exists in hr_lookups for lookup_type RATE_UOM
90 --
91 --
92 --  Pre-conditions :
93 --
94 --
95 --  In Arguments :
96 --    p_rate_uom
97 --    p_effective_date
98 --    p_rate_id
99 --    p_object_version_number
100 --
101 --  Post Success :
102 --    Processing continues
103 --
104 --  Post Failure :
105 --    An application error will be raised and processing is
106 --    terminated
107 --
108 --  Access Status :
109 --    Internal Table Handler Use only.
110 --
111 -- {End of Comments}
112 --
113 PROCEDURE chk_rate_uom
114   (p_rate_uom              IN pay_rates.rate_uom%TYPE
115   ,p_effective_date        IN DATE
116   ,p_rate_id               IN pay_rates.rate_id%TYPE
117   ,p_object_version_number IN pay_rates.object_version_number%TYPE);
118 --
119 --  ---------------------------------------------------------------------------
120 --  |----------------------------< chk_rate_type >----------------------------|
121 --  ---------------------------------------------------------------------------
122 --
123 --
124 --  Desciption :
125 --
126 --    Validate rate_type exists in hr_lookups for lookup_type RATE_TYPE
127 --
128 --
129 --  Pre-conditions :
130 --
131 --
132 --  In Arguments :
133 --    p_rate_type
134 --    p_effective_date
135 --    p_rate_id
136 --    p_object_version_number
137 --
138 --  Post Success :
139 --    Processing continues
140 --
141 --  Post Failure :
142 --    An application error will be raised and processing is
143 --    terminated
144 --
145 --  Access Status :
146 --    Internal Table Handler Use only.
147 --
148 -- {End of Comments}
149 --
150 PROCEDURE chk_rate_type
151   (p_rate_type             IN pay_rates.rate_type%TYPE
152   ,p_effective_date        IN DATE
153   ,p_rate_id               IN pay_rates.rate_id%TYPE
154   ,p_object_version_number IN pay_rates.object_version_number%TYPE);
155 --
156 --  ---------------------------------------------------------------------------
157 --  |---------------------------< chk_parent_spine_id >------------------------|
158 --  ---------------------------------------------------------------------------
159 --
160 --  Desciption :
161 --
162 --    Validate parent_spine_id is refrenced from per_parent_spines_f.
163 --
164 --
165 --  Pre-conditions :
166 --
167 --
168 --  In Arguments :
169 --    p_rate_type
170 --    p_rate_id
171 --    p_effective_date
172 --    p_object_version_number
173 --
174 --  Post Success :
175 --    Processing continues
176 --
177 --  Post Failure :
178 --    An application error will be raised and processing is
179 --    terminated
180 --
181 --  Access Status :
182 --    Internal Table Handler Use only.
183 --
184 -- {End of Comments}
185 --
186 -- ---------------------------------------------------------------------------
187 --
188 PROCEDURE chk_parent_spine_id
189   (p_parent_spine_id       IN pay_rates.parent_spine_id%TYPE
190   ,p_rate_id               IN pay_rates.rate_id%TYPE
191   ,p_object_version_number IN pay_rates.object_version_number%TYPE );
192   --
193 --
194 -- ---------------------------------------------------------------------------
195 -- |----------------------< set_security_group_id >--------------------------|
196 -- ---------------------------------------------------------------------------
197 -- {Start Of Comments}
198 --
199 --  Description:
200 --    Sets the security_group_id IN CLIENT_INFO for the appropriate business
201 --    group context.
202 --
203 --  Prerequisites:
204 --    The primary key identified by p_rate_id
205 --     already exists.
206 --
207 --  In Arguments:
208 --    p_rate_id
209 --
210 --
211 --  Post Success:
212 --    The security_group_id will be set IN CLIENT_INFO.
213 --
214 --  Post Failure:
215 --    An error is raised if the value does not exist.
216 --
217 --  Access Status:
218 --    Internal Development Use Only.
219 --
220 -- {End Of Comments}
221 -- ---------------------------------------------------------------------------
222 PROCEDURE set_security_group_id
223   (p_rate_id                              IN NUMBER
224   ,p_associated_column1                   IN VARCHAR2 DEFAULT null
225   );
226 --
227 --
228 -- ---------------------------------------------------------------------------
229 -- |---------------------< return_legislation_code >-------------------------|
230 -- ---------------------------------------------------------------------------
231 -- {Start Of Comments}
232 --
233 --  Description:
234 --    RETURN the legislation code for a specific primary key value
235 --
236 --  Prerequisites:
237 --    The primary key identified by p_rate_id
238 --     already exists.
239 --
240 --  In Arguments:
241 --    p_rate_id
242 --
243 --
244 --  Post Success:
245 --    The business group's legislation code will be returned.
246 --
247 --  Post Failure:
248 --    An error is raised if the value does not exist.
249 --
250 --  Access Status:
251 --    Internal Development Use Only.
252 --
253 -- {End Of Comments}
254 -- ---------------------------------------------------------------------------
255 FUNCTION return_legislation_code
256   (p_rate_id                              IN     NUMBER
257   ) RETURN VARCHAR2;
258 --
259 --
260 -- ----------------------------------------------------------------------------
261 -- |---------------------------< insert_validate >----------------------------|
262 -- ----------------------------------------------------------------------------
263 -- {Start of comments}
264 --
265 -- Description:
266 --   This PROCEDURE controls the execution of all insert business rules
267 --   validation.
268 --
269 -- Prerequisites:
270 --   This private PROCEDURE is called from ins PROCEDURE.
271 --
272 -- In Parameters:
273 --   A Pl/Sql record structure.
274 --
275 -- Post Success:
276 --   Processing continues.
277 --
278 -- Post Failure:
279 --   If a business rules fails the error will not be handled by this PROCEDURE
280 --   unless explicity coded.
281 --
282 -- Developer Implementation Notes:
283 --   For insert, your business rules should be executed from this PROCEDURE
284 --   and should ideally (unless really necessary) just be straight PROCEDURE
285 --   or function calls. Try and avoid using conditional branching logic.
286 --
287 -- Access Status:
288 --   Internal Row Handler Use Only.
289 --
290 -- {End of comments}
291 -- ----------------------------------------------------------------------------
292 PROCEDURE insert_validate
293   (p_effective_date               IN DATE
294   ,p_rec                          IN pay_pyr_shd.g_rec_type
295   );
296 --
297 -- ----------------------------------------------------------------------------
298 -- |---------------------------< update_validate >----------------------------|
299 -- ----------------------------------------------------------------------------
300 -- {Start Of Comments}
301 --
302 -- Description:
303 --   This PROCEDURE controls the execution of all update business rules
304 --   validation.
305 --
306 -- Prerequisites:
307 --   This private PROCEDURE is called from upd PROCEDURE.
308 --
309 -- In Parameters:
310 --   A Pl/Sql record structure.
311 --
312 -- Post Success:
313 --   Processing continues.
314 --
315 -- Post Failure:
316 --   If a business rules fails the error will not be handled by this PROCEDURE
317 --   unless explicity coded.
318 --
319 -- Access Status:
320 --   Internal Row Handler Use Only.
321 --
322 -- {End Of Comments}
323 -- ----------------------------------------------------------------------------
324 PROCEDURE update_validate
325   (p_effective_date               IN DATE
326   ,p_rec                          IN pay_pyr_shd.g_rec_type
327   );
328 --
329 -- ----------------------------------------------------------------------------
330 -- |---------------------------< delete_validate >----------------------------|
331 -- ----------------------------------------------------------------------------
332 -- {Start Of Comments}
333 --
334 -- Description:
335 --   This PROCEDURE controls the execution of all delete business rules
336 --   validation.
337 --
338 -- Prerequisites:
339 --   This private PROCEDURE is called from del PROCEDURE.
340 --
341 -- In Parameters:
342 --   A Pl/Sql record structure.
343 --
344 -- Post Success:
345 --   Processing continues.
346 --
347 -- Post Failure:
348 --   If a business rules fails the error will not be handled by this PROCEDURE
349 --   unless explicity coded.
350 --
351 -- Developer Implementation Notes:
352 --   For delete, your business rules should be executed from this PROCEDURE
353 --   and should ideally (unless really necessary) just be straight PROCEDURE
354 --   or function calls. Try and avoid using conditional branching logic.
355 --
356 -- Access Status:
357 --   Internal Row Handler Use Only.
358 --
359 -- {End Of Comments}
360 -- ----------------------------------------------------------------------------
361 PROCEDURE delete_validate
365 END pay_pyr_bus;
362   (p_rec              IN pay_pyr_shd.g_rec_type
363   );
364 --