DBA Data[Home] [Help]

PACKAGE: APPS.PER_APL_BUS

Source


1 Package per_apl_bus as
2 /* $Header: peaplrhi.pkh 120.1 2005/10/25 00:30:44 risgupta noship $ */
3 --
4 --
5 -- ----------------------------------------------------------------------------
6 -- |----------------------< chk_termination_reason >--------------------------|
7 -- ----------------------------------------------------------------------------
8 -- {Start Of Comments}
9 --
10 -- Description:
11 --   This procedure is used to validate the application termination reason
12 --
13 -- Pre Conditions:
14 --   None
15 --
16 -- In Parameters:
17 --   p_termination_reason
18 --   p_application_id
19 --   p_effective_date
20 --   p_object_version_number
21 --
22 -- Post Success:
23 --   If no violations of the business rules are detected then processing
24 --   continues.
25 --
26 -- Post Failure:
27 --   The following errors are detected and raised :
28 --      - termination reason does not exist in HR_LOOKUPS table
29 --
30 -- Developer Implementation Notes:
31 --
32 -- Access Status:
33 --   Internal Table Handler Use Only.
34 --
35 -- {End Of Comments}
36 -- ----------------------------------------------------------------------------
37 Procedure chk_termination_reason
38    (p_termination_reason    in per_applications.termination_reason%TYPE
39    ,p_application_id        in per_applications.application_id%TYPE
40    ,p_effective_date        in date
41    ,p_object_version_number in per_applications.object_version_number%TYPE);
42 --
43 -- ----------------------------------------------------------------------------
44 -- |---------------------< chk_date_received_person_id >----------------------|
45 -- ----------------------------------------------------------------------------
46 -- {Start Of Comments}
47 --
48 -- Description:
49 --   This procedure is used to validate the person_id and date_received
50 --   attributes.
51 --
52 -- Pre Conditions:
53 --   None.
54 --
55 -- In Parameters:
56 --   p_person_id
57 --   p_business_group_id
58 --   p_date_received
59 --   p_projected_hire_date
60 --   p_date_end
61 --   p_object_version_number
62 --
63 -- Post Success:
64 --   If no violations of the business rules are detected then processing
65 --   continues.
66 --
67 -- Post Failure:
68 --   The following errors are detected and raised :
69 --      - person_id is mandatory
70 --      - The business_group_id for the specified person_id must be the same
71 --        as the application business_group_id
72 --      - system_person_type must be 'APL','EMP_APL','APL_EX_APL','EX_EMP_APL'
73 --      - date_received is mandatory
74 --      - date_received <= date_end
75 --      - If set date_received <= projected_hire_date
76 --      - date_received,person_id combination not exists in per_applications
77 --      - person_id,date_received foreign key check into per_people_f table
78 --
79 -- Developer Implementation Notes:
80 --   Update validation is covered by check_non_updateable_args.
81 
82 -- Access Status:
83 --   Internal Table Handler Use Only.
84 --
85 -- {End Of Comments}
86 -- ----------------------------------------------------------------------------
87 Procedure chk_date_received_person_id
88        (p_person_id             in per_applications.person_id%TYPE
89        ,p_business_group_id     in per_applications.business_group_id%TYPE
90        ,p_date_received         in per_applications.date_received%TYPE
91        ,p_date_end              in per_applications.date_end%TYPE
92        ,p_projected_hire_date   in per_applications.projected_hire_date%TYPE
93        ,p_application_id        in per_applications.application_id%TYPE
94        ,p_object_version_number in per_applications.object_version_number%TYPE
95        );
96 --
97 -- ----------------------------------------------------------------------------
98 -- |----------------< chk_projected_hire_date >-----------------|
99 -- ----------------------------------------------------------------------------
100 -- {Start Of Comments}
101 --
102 -- Description:
103 --   This procedure validate the projected_hire_date attribute
104 --
105 -- Pre Conditions:
106 --   date_received validated
107 --
108 -- In Parameters:
109 --   p_date_received
110 --   p_projected_hire_date
111 --   p_application_id
112 --   p_object_version_number
113 --
114 -- Post Success:
115 --   If no violations of the business rules are detected then processing
116 --   continues.
117 --
118 -- Post Failure:
119 --   The following errors are detected and raised :
120 --      - If set projected_hire_date >= date_received
121 
122 -- Developer Implementation Notes:
123 --
124 -- Access Status:
125 --   Internal Table Handler Use Only.
126 --
127 -- {End Of Comments}
128 -- ----------------------------------------------------------------------------
129 Procedure chk_projected_hire_date
130    (p_date_received         in per_applications.date_received%TYPE
131    ,p_projected_hire_date   in per_applications.projected_hire_date%TYPE
132    ,p_application_id        in per_applications.application_id%TYPE
133    ,p_object_version_number in per_applications.object_version_number%TYPE
134    );
135 --
136 -- ----------------------------------------------------------------------------
137 -- |---------------------------< chk_date_end >-------------------------------|
138 -- ----------------------------------------------------------------------------
139 -- {Start Of Comments}
140 --
141 -- Description:
142 --   This procedure is used to validate the date_end attribute.
143 --
144 --   At present this attribute must be null, any attempt to save a non-null
145 --   date_end value will result in an error.
146 --
147 -- Pre Conditions:
148 --   None
149 --
150 -- In Parameters:
151 --   p_date_end
152 --   p_date_received
153 --   p_application_id
154 --   p_object_version_number
155 --
156 -- Post Success:
157 --   If no violation of the business rules are detected then processing
158 --   continues.
159 --
160 -- Post Failure:
161 --   The following errors are detected and raised :
162 --      - date_end not null
163 --
164 -- Developer Implementation Notes:
165 --
166 -- Access Status:
167 --   Internal Table Handler Use Only.
168 --
169 -- {End Of Comments}
170 -- ----------------------------------------------------------------------------
171 Procedure chk_date_end
172    (p_date_end              in per_applications.date_end%TYPE
173    ,p_date_received         in per_applications.date_received%TYPE
174    ,p_application_id        in per_applications.application_id%TYPE
175    ,p_object_version_number in per_applications.object_version_number%TYPE
176    );
177 --
178 -- ----------------------------------------------------------------------------
179 -- |---------------------------< insert_validate >----------------------------|
180 -- ----------------------------------------------------------------------------
181 -- {Start Of Comments}
182 --
183 -- Description:
184 --   This procedure controls the execution of all insert business rules
185 --   validation.
186 --
187 -- Pre Conditions:
188 --   This private procedure is called from ins procedure.
189 --
190 -- In Parameters:
191 --   A Pl/Sql record structre.
192 --
193 -- Post Success:
194 --   Processing continues.
195 --
196 -- Post Failure:
197 --   If a business rules fails the error will not be handled by this procedure
198 --   unless explicity coded.
199 --
200 -- Developer Implementation Notes:
201 --   For insert, your business rules should be executed from this procedure and
202 --   should ideally (unless really necessary) just be straight procedure or
203 --   function calls. Try and avoid using conditional branching logic.
204 --
205 -- Access Status:
206 --   Internal Table Handler Use Only.
207 --
208 -- {End Of Comments}
209 -- ----------------------------------------------------------------------------
210 Procedure insert_validate(p_rec in per_apl_shd.g_rec_type
211 			 ,p_effective_date in date
212 			 ,p_validate_df_flex in boolean default true); -- bug 4689836
213 --
214 -- ----------------------------------------------------------------------------
215 -- |---------------------------< update_validate >----------------------------|
216 -- ----------------------------------------------------------------------------
217 -- {Start Of Comments}
218 --
219 -- Description:
220 --   This procedure controls the execution of all update business rules
221 --   validation.
222 --
223 -- Pre Conditions:
224 --   This private procedure is called from upd procedure.
225 --
226 -- In Parameters:
227 --   A Pl/Sql record structre.
228 --
229 -- Post Success:
230 --   Processing continues.
231 --
232 -- Post Failure:
233 --   If a business rules fails the error will not be handled by this procedure
234 --   unless explicity coded.
235 --
236 -- Developer Implementation Notes:
237 --   For update, your business rules should be executed from this procedure and
238 --   should ideally (unless really necessary) just be straight procedure or
239 --   function calls. Try and avoid using conditional branching logic.
240 --
241 -- Access Status:
242 --   Internal Table Handler Use Only.
243 --
244 -- {End Of Comments}
245 -- ----------------------------------------------------------------------------
246 Procedure update_validate(p_rec in per_apl_shd.g_rec_type
247 			 ,p_effective_date in date);
248 --
249 -- ----------------------------------------------------------------------------
250 -- |---------------------------< delete_validate >----------------------------|
251 -- ----------------------------------------------------------------------------
252 -- {Start Of Comments}
253 --
254 -- Description:
255 --   This procedure controls the execution of all delete business rules
256 --   validation.
257 --
258 -- Pre Conditions:
259 --   This private procedure is called from del procedure.
260 --
261 -- In Parameters:
262 --   A Pl/Sql record structre.
263 --
264 -- Post Success:
265 --   Processing continues.
266 --
267 -- Post Failure:
268 --   If a business rules fails the error will not be handled by this procedure
269 --   unless explicity coded.
270 --
271 -- Developer Implementation Notes:
272 --   For delete, your business rules should be executed from this procedure and
273 --   should ideally (unless really necessary) just be straight procedure or
274 --   function calls. Try and avoid using conditional branching logic.
275 --
276 -- Access Status:
277 --   Internal Table Handler Use Only.
278 --
279 -- {End Of Comments}
280 -- ----------------------------------------------------------------------------
281 Procedure delete_validate(p_rec in per_apl_shd.g_rec_type);
282 --
283 --
284 --
285 --  ---------------------------------------------------------------------------
286 --  |---------------------< return_legislation_code >-------------------------|
287 --  ---------------------------------------------------------------------------
288 --
289 --  Description:
290 --    Return the legislation code for a specific application
291 --
292 --  Prerequisites:
293 --    The application identified by p_application_id already exists.
294 --
295 --  In Arguments:
296 --    p_application_id
297 --
298 --  Post Success:
299 --    If the application is found this function will return the application's business
300 --    group legislation code.
301 --
302 --  Post Failure:
303 --    An error is raised if the application does not exist.
304 --
305 --  Access Status:
306 --    Internal Development Use Only.
307 --
308 function return_legislation_code
309   (p_application_id              in number
310   ) return varchar2;
311 --
312 end per_apl_bus;