DBA Data[Home] [Help]

PACKAGE: APPS.PER_SUC_BUS

Source


1 Package per_suc_bus as
2 /* $Header: pesucrhi.pkh 120.1 2008/02/05 07:07:18 schowdhu noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |-----------------------< chk_succession_plan_id >-------------------------|
6 -- ----------------------------------------------------------------------------
7 -- {Start Of Comments}
8 --
9 -- Description
10 --   This procedure is used to check that the primary key for the succession
11 --   planning table is created properly. It should be null on insert and
12 --   should not be able to be updated.
13 --
14 -- Pre Conditions
15 --   None.
16 --
17 -- In Parameters
18 --   succession_plan_id                 PK of record being inserted or updated.
19 --   object_version_number              Object version number of record being
20 --                                      inserted or updated.
21 --
22 -- Post Success
23 --   Processing continues
24 --
25 -- Post Failure
26 --   Errors handled by the procedure
27 --
28 -- Access Status
29 --   Internal and External use.
30 --
31 -- {End Of Comments}
32 -- ----------------------------------------------------------------------------
33 Procedure chk_succession_plan_id(p_succession_plan_id          in number,
34                                  p_object_version_number       in number);
35 --
36 -- ----------------------------------------------------------------------------
37 -- |----------------------------< chk_person_id >-----------------------------|
38 -- ----------------------------------------------------------------------------
39 -- {Start Of Comments}
40 --
41 -- Description
42 --   This procedure is used to check that the person_id exists as of the
43 --   effective date.
44 --
45 -- Pre Conditions
46 --   None.
47 --
48 -- In Parameters
49 --   effective_date                     effective date
50 --   succession_plan_id                 PK of record being inserted or updated.
51 --   person_id                          id of person being inserted.
52 --   object_version_number              Object version number of record being
53 --                                      inserted or updated.
54 --
55 -- Post Success
56 --   Processing continues
57 --
58 -- Post Failure
59 --   Errors handled by the procedure
60 --
61 -- Access Status
62 --   Internal and External use.
63 --
64 -- {End Of Comments}
65 -- ----------------------------------------------------------------------------
66 Procedure chk_person_id(p_effective_date              in date,
67 			            p_succession_plan_id          in number,
68                         p_person_id                   in number,
69                         p_object_version_number       in number);
70 --
71 -- ----------------------------------------------------------------------------
72 -- |----------------------------< chk_position_id >---------------------------|
73 -- ----------------------------------------------------------------------------
74 -- {Start Of Comments}
75 --
76 -- Description
77 --   This procedure is used to check that the position_id exists as of
78 --   effective date.
79 --
80 -- Pre Conditions
81 --   None.
82 --
83 -- In Parameters
84 --   effective_date                     effective date
85 --   succession_plan_id                 PK of record being inserted or updated.
86 --   position_id                        id of position being inserted.
87 --   object_version_number              Object version number of record being
88 --                                      inserted or updated.
89 -- Post Success
90 --   Processing continues
91 --
92 -- Post Failure
93 --   Errors handled by the procedure
94 --
95 -- Access Status
96 --   Internal and External use.
97 --
98 -- {End Of Comments}
99 -- ----------------------------------------------------------------------------
100 Procedure chk_position_id(p_effective_date              in date,
101 			              p_succession_plan_id          in number,
102                           p_position_id                 in number,
103                           p_object_version_number       in number);
104 --
105 -- ----------------------------------------------------------------------------
106 -- |----------------------------< chk_successee >---------------------------|
107 -- ----------------------------------------------------------------------------
108 -- {Start Of Comments}
109 --
110 -- Description
111 --   This procedure is used to check that the successee_id(job_id or position_id
112 --   or successe_person_id) exists as of effective date.
113 --
114 -- Pre Conditions
115 --   None.
116 --
117 -- In Parameters
118 --   effective_date                     effective date
119 --   succession_plan_id                 PK of record being inserted or updated.
120 --   job_id                             id of job being inserted.
121 --   position_id                        id of position being inserted.
122 --   successe_person_id                 id of successee person being inserted.
123 --   object_version_number              Object version number of record being
124 --                                      inserted or updated.
125 
126 
127 -- Post Success
128 --   Processing continues
129 --
130 -- Post Failure
131 --   Errors handled by the procedure
132 --
133 -- Access Status
134 --   Internal and External use.
135 --
136 -- {End Of Comments}
137 -- ----------------------------------------------------------------------------
138 Procedure chk_successee(p_effective_date              in date,
139 			            p_succession_plan_id          in number,
140 						p_job_id                      in number,
141                         p_position_id                 in number,
142 						p_successee_person_id         in number,
143                         p_object_version_number       in number);
144 --
145 -- ----------------------------------------------------------------------------
146 -- |-----------------------------< chk_time_scale >---------------------------|
147 -- ----------------------------------------------------------------------------
148 -- {Start Of Comments}
149 --
150 -- Description
151 --   This procedure is used to check that the time_scale lookup falles within
152 --   the per_time_scales lookup.
153 --
154 -- Pre Conditions
155 --   None.
156 --
157 -- In Parameters
158 --   succession_plan_id                 PK of record being inserted or updated.
159 --   time_scale                         time_scale lookup.
160 --   object_version_number              Object version number of record being
161 --                                      inserted or updated.
162 --   effective_date                     effective date
163 --
164 -- Post Success
165 --   Processing continues
166 --
167 -- Post Failure
168 --   Error handled by procedure
169 --
170 -- Access Status
171 --   Internal and External use.
172 --
173 -- {End Of Comments}
174 -- ----------------------------------------------------------------------------
175 Procedure chk_time_scale(p_succession_plan_id          in number,
176                          p_time_scale                  in varchar2,
177                          p_object_version_number       in number,
178                          p_effective_date              in date);
179 --
180 -- ----------------------------------------------------------------------------
181 -- |----------------------------< chk_start_date >----------------------------|
182 -- ----------------------------------------------------------------------------
183 -- {Start Of Comments}
184 --
185 -- Description
186 --   This procedure is used to check that the start_date has been populated.
187 --
188 -- Pre Conditions
189 --   None.
190 --
191 -- In Parameters
192 --   succession_plan_id                 PK of record being inserted or updated.
193 --   start_date                         start date of succession plan record.
194 --   object_version_number              Object version number of record being
195 --                                      inserted or updated.
196 -- Post Success
197 --   Processing continues
198 --
199 -- Post Failure
200 --   Errors handled by the procedure
201 --
202 -- Access Status
203 --   Internal and External use.
204 --
205 -- {End Of Comments}
206 -- ----------------------------------------------------------------------------
207 Procedure chk_start_date(p_succession_plan_id          in number,
208                          p_start_date                  in date,
209                          p_object_version_number       in number);
210 --
211 -- ----------------------------------------------------------------------------
212 -- |----------------------------< chk_end_date >------------------------------|
213 -- ----------------------------------------------------------------------------
214 -- {Start Of Comments}
215 --
216 -- Description
217 --   This procedure is used to check that the end date is later than the
218 --   start date.
219 --
220 -- Pre Conditions
221 --   None.
222 --
223 -- In Parameters
224 --   succession_plan_id                 PK of record being inserted or updated.
225 --   start_date                         start date of succession plan record.
226 --   end_date                           end date of succession plan record.
227 --   object_version_number              Object version number of record being
228 --                                      inserted or updated.
229 -- Post Success
230 --   Processing continues
231 --
232 -- Post Failure
233 --   Errors handled by the procedure
234 --
235 -- Access Status
236 --   Internal and External use.
237 --
238 -- {End Of Comments}
239 -- ----------------------------------------------------------------------------
240 Procedure chk_end_date(p_succession_plan_id          in number,
241                        p_start_date                  in date,
242                        p_end_date                    in date,
243                        p_object_version_number       in number);
244 --
245 -- ----------------------------------------------------------------------------
246 -- |----------------------< chk_available_for_promotion >---------------------|
247 -- ----------------------------------------------------------------------------
248 -- {Start Of Comments}
249 --
250 -- Description
251 --   This procedure is used to check that the available_for_promotion field
252 --   falls within the 'YES_NO' lookup.
253 --
254 -- Pre Conditions
255 --   None.
256 --
257 -- In Parameters
258 --   succession_plan_id                 PK of record being inserted or updated.
259 --   available_for_promotion            available_for_promotion lookup.
260 --   object_version_number              Object version number of record being
261 --                                      inserted or updated.
262 --   effective_date                     effective date
263 --
264 -- Post Success
265 --   Processing continues
266 --
267 -- Post Failure
268 --   Error handled by procedure
269 --
270 -- Access Status
271 --   Internal and External use.
272 --
273 -- {End Of Comments}
274 -- ----------------------------------------------------------------------------
275 Procedure chk_available_for_promotion(p_succession_plan_id          in number,
276                                       p_available_for_promotion     in varchar2,
277                                       p_object_version_number       in number,
278                                       p_effective_date              in date);
279 --
280 -- ----------------------------------------------------------------------------
281 -- |----------------------------< chk_date >----------------------------------|
282 -- ----------------------------------------------------------------------------
283 -- {Start Of Comments}
284 --
285 -- Description
286 --   This procedure is used to check that the record being inserted or
287 --   updated is unique.
288 --
289 -- Pre Conditions
290 --   None.
291 --
292 -- In Parameters
293 --   succession_plan_id                 PK of record being inserted or updated.
294 --   person_id                          id of person being inserted.
295 --   position_id                        id of position being inserted.
296 --   start_date                         start date of succession plan record
297 --   end_date                           end date of succession plan record
298 --   object_version_number              Object version number of record being
299 --                                      inserted or updated.
300 -- Post Success
301 --   Processing continues
302 --
303 -- Post Failure
304 --   Errors handled by the procedure
305 --
306 -- Access Status
307 --   Internal and External use.
308 --
309 -- {End Of Comments}
310 -- ----------------------------------------------------------------------------
311 Procedure chk_date(p_succession_plan_id          in number,
312                    p_position_id                 in number,
313                    p_person_id                   in number,
314                    p_start_date                  in date,
315                    p_end_date                    in date,
316                    p_object_version_number       in number,
317 				   p_job_id                      in number,
318 				   p_successee_person_id         in number);
319 --
320 -- ----------------------------------------------------------------------------
321 -- |---------------------------< insert_validate >----------------------------|
322 -- ----------------------------------------------------------------------------
323 -- {Start Of Comments}
324 --
325 -- Description:
326 --   This procedure controls the execution of all insert business rules
327 --   validation.
328 --
329 -- Prerequisites:
330 --   This private procedure is called from ins procedure.
331 --
332 -- In Parameters:
333 --   A Pl/Sql record structre.
334 --
335 -- Post Success:
336 --   Processing continues.
337 --
338 -- Post Failure:
339 --   If a business rules fails the error will not be handled by this procedure
340 --   unless explicity coded.
341 --
342 -- Developer Implementation Notes:
343 --   For insert, your business rules should be executed from this procedure and
344 --   should ideally (unless really necessary) just be straight procedure or
345 --   function calls. Try and avoid using conditional branching logic.
346 --
347 -- Access Status:
348 --   Internal Row Handler Use Only.
349 --
350 -- {End Of Comments}
351 -- ----------------------------------------------------------------------------
352 Procedure insert_validate(p_rec            in per_suc_shd.g_rec_type,
353 			  p_effective_date in date);
354 --
355 -- ----------------------------------------------------------------------------
356 -- |---------------------------< update_validate >----------------------------|
357 -- ----------------------------------------------------------------------------
358 -- {Start Of Comments}
359 --
360 -- Description:
361 --   This procedure controls the execution of all update business rules
362 --   validation.
363 --
364 -- Prerequisites:
365 --   This private procedure is called from upd procedure.
366 --
367 -- In Parameters:
368 --   A Pl/Sql record structre.
369 --
370 -- Post Success:
371 --   Processing continues.
372 --
373 -- Post Failure:
374 --   If a business rules fails the error will not be handled by this procedure
375 --   unless explicity coded.
376 --
377 -- Developer Implementation Notes:
378 --   For update, your business rules should be executed from this procedure and
379 --   should ideally (unless really necessary) just be straight procedure or
380 --   function calls. Try and avoid using conditional branching logic.
381 --
382 -- Access Status:
383 --   Internal Row Handler Use Only.
384 --
385 -- {End Of Comments}
386 -- ----------------------------------------------------------------------------
387 Procedure update_validate(p_rec            in per_suc_shd.g_rec_type,
388 			  p_effective_date in date);
389 --
393 -- {Start Of Comments}
390 -- ----------------------------------------------------------------------------
391 -- |---------------------------< delete_validate >----------------------------|
392 -- ----------------------------------------------------------------------------
394 --
395 -- Description:
396 --   This procedure controls the execution of all delete business rules
397 --   validation.
398 --
399 -- Prerequisites:
400 --   This private procedure is called from del procedure.
401 --
402 -- In Parameters:
403 --   A Pl/Sql record structre.
404 --
405 -- Post Success:
406 --   Processing continues.
407 --
408 -- Post Failure:
409 --   If a business rules fails the error will not be handled by this procedure
410 --   unless explicity coded.
411 --
412 -- Developer Implementation Notes:
413 --   For delete, your business rules should be executed from this procedure and
414 --   should ideally (unless really necessary) just be straight procedure or
415 --   function calls. Try and avoid using conditional branching logic.
416 --
417 -- Access Status:
418 --   Internal Row Handler Use Only.
419 --
420 -- {End Of Comments}
421 -- ----------------------------------------------------------------------------
422 Procedure delete_validate(p_rec in per_suc_shd.g_rec_type);
423 --
424 
425 ---- Bug#3207986 start
426 
427 procedure chk_person_start_date( p_person_id per_people_f.person_id%TYPE,
428                                  p_start_date per_assignments_f.effective_start_date%TYPE);
429 
430 ---- Bug#3207986 end
431 end per_suc_bus;