1 Package per_pjo_bus AUTHID CURRENT_USER as
2 /* $Header: pepjorhi.pkh 120.1 2008/07/08 13:07:49 brsinha 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 --
13 -- Prerequisites:
14 -- The primary key identified by p_previous_job_id
15 -- already exists.
16 --
17 -- In Arguments:
18 -- p_previous_job_id
19 --
20 --
21 -- Post Success:
22 -- The security_group_id will be set in CLIENT_INFO.
23 --
24 -- Post Failure:
25 -- An error is raised if the value does not exist.
26 --
27 -- Access Status:
28 -- Internal Development Use Only.
29 --
30 -- {End Of Comments}
31 -- ---------------------------------------------------------------------------
32 procedure set_security_group_id
33 (p_previous_job_id in number
34 ,p_associated_column1 in varchar2 default null
35 );
36 --
37 --
38 -- ---------------------------------------------------------------------------
39 -- |---------------------< return_legislation_code >-------------------------|
40 -- ---------------------------------------------------------------------------
41 -- {Start Of Comments}
42 --
43 -- Description:
44 -- Return the legislation code for a specific primary key value
45 --
46 -- Prerequisites:
47 -- The primary key identified by p_previous_job_id
48 -- already exists.
49 --
50 -- In Arguments:
51 -- p_previous_job_id
52 --
53 --
54 -- Post Success:
55 -- The business group's legislation code will be returned.
56 --
57 -- Post Failure:
58 -- An error is raised if the value does not exist.
59 --
60 -- Access Status:
61 -- Internal Development Use Only.
62 --
63 -- {End Of Comments}
64 -- ---------------------------------------------------------------------------
65 FUNCTION return_legislation_code
66 (p_previous_job_id in number
67 ) RETURN varchar2;
68 --
69 --
70 -- ----------------------------------------------------------------------------
71 -- |---------------------------< insert_validate >----------------------------|
72 -- ----------------------------------------------------------------------------
73 -- {Start of comments}
74 --
75 -- Description:
76 -- This procedure controls the execution of all insert business rules
77 -- validation.
78 --
79 -- Prerequisites:
80 -- This private procedure is called from ins procedure.
81 --
82 -- In Parameters:
83 -- A Pl/Sql record structure.
84 --
85 -- Post Success:
86 -- Processing continues.
87 --
88 -- Post Failure:
89 -- If a business rules fails the error will not be handled by this procedure
90 -- unless explicity coded.
91 --
92 -- Developer Implementation Notes:
93 -- For insert, your business rules should be executed from this procedure
94 -- and should ideally (unless really necessary) just be straight procedure
95 -- or function calls. Try and avoid using conditional branching logic.
96 --
97 -- Access Status:
98 -- Internal Row Handler Use Only.
99 --
100 -- {End of comments}
101 -- ----------------------------------------------------------------------------
102 Procedure insert_validate
103 (p_effective_date in date
104 ,p_rec in per_pjo_shd.g_rec_type
105 );
106 --
107 -- ----------------------------------------------------------------------------
108 -- |---------------------------< update_validate >----------------------------|
109 -- ----------------------------------------------------------------------------
110 -- {Start Of Comments}
111 --
112 -- Description:
113 -- This procedure controls the execution of all update business rules
114 -- validation.
115 --
116 -- Prerequisites:
117 -- This private procedure is called from upd procedure.
118 --
119 -- In Parameters:
120 -- A Pl/Sql record structure.
121 --
122 -- Post Success:
123 -- Processing continues.
124 --
125 -- Post Failure:
126 -- If a business rules fails the error will not be handled by this procedure
127 -- unless explicity coded.
128 --
129 -- Access Status:
130 -- Internal Row Handler Use Only.
131 --
132 -- {End Of Comments}
133 -- ----------------------------------------------------------------------------
134 Procedure update_validate
135 (p_effective_date in date
136 ,p_rec in per_pjo_shd.g_rec_type
137 );
138 --
139 -- ----------------------------------------------------------------------------
140 -- |---------------------------< delete_validate >----------------------------|
141 -- ----------------------------------------------------------------------------
142 -- {Start Of Comments}
143 --
144 -- Description:
145 -- This procedure controls the execution of all delete business rules
146 -- validation.
147 --
148 -- Prerequisites:
149 -- This private procedure is called from del procedure.
150 --
151 -- In Parameters:
152 -- A Pl/Sql record structure.
153 --
154 -- Post Success:
155 -- Processing continues.
156 --
157 -- Post Failure:
158 -- If a business rules fails the error will not be handled by this procedure
159 -- unless explicity coded.
160 --
161 -- Developer Implementation Notes:
162 -- For delete, your business rules should be executed from this procedure
163 -- and should ideally (unless really necessary) just be straight procedure
164 -- or function calls. Try and avoid using conditional branching logic.
165 --
166 -- Access Status:
167 -- Internal Row Handler Use Only.
168 --
169 -- {End Of Comments}
170 -- ----------------------------------------------------------------------------
171 Procedure delete_validate
172 (p_rec in per_pjo_shd.g_rec_type
173 );
174 --
175 procedure chk_start_end_dates
176 (p_previous_job_id
177 in per_previous_jobs.previous_job_id%type
178 ,p_object_version_number
179 in per_previous_jobs.object_version_number%type
180 ,p_start_date
181 in per_previous_jobs.start_date%type
182 ,p_end_date
183 in per_previous_jobs.end_date%type);
184 --
185 procedure chk_pjo_start_end_dates
186 (p_previous_job_id
187 in per_previous_jobs.previous_job_id%type
188 ,p_previous_employer_id
189 in per_previous_jobs.previous_employer_id%type
190 ,p_object_version_number
191 in per_previous_jobs.object_version_number%type
192 ,p_start_date
193 in per_previous_jobs.start_date%type
194 ,p_end_date
195 in per_previous_jobs.end_date%TYPE
196 ,p_effective_date
197 IN per_previous_jobs.start_date%type);
198 --
199 procedure chk_all_assignments
200 (p_previous_job_id
201 in per_previous_jobs.previous_job_id%type
202 ,p_object_version_number
203 in per_previous_jobs.object_version_number%type
204 ,p_all_assignments
205 in per_previous_jobs.all_assignments%type);
206 --
207 -- -----------------------------------------------------------------------
208 -- |---------------------------< chk_period_years >----------------------|
209 -- -----------------------------------------------------------------------
210 -- {Start Of Comments}
211 --
212 -- Description:
213 -- This procedure ensures that period_years value is between 0 and 99
214 --
215 -- Pre Conditions:
216 -- g_old_rec has been populated with details of the values currently in
217 -- the database.
218 --
219 -- In Arguments:
220 -- p_period_years
221 -- p_previous_job_id
222 -- p_object_version_number
223 --
224 -- Post Success:
225 -- Processing continues if period_years is between 0 and 99
226 --
227 -- Post Failure:
228 -- An application error is raised period_years is invalid.
229 --
230 -- {End Of Comments}
231 -- ----------------------------------------------------------------------------
232 procedure chk_period_years
233 (p_period_years in per_previous_jobs.period_years%type
234 ,p_previous_job_id
235 in per_previous_jobs.previous_job_id%type
236 ,p_object_version_number
237 in per_previous_jobs.object_version_number%type);
238 --
239 -- -----------------------------------------------------------------------
240 -- |---------------------------< chk_period_months >---------------------|
241 -- -----------------------------------------------------------------------
242 -- {Start Of Comments}
243 --
244 -- Description:
245 -- This procedure ensures that period_months value is between 0 and 11
246 --
247 -- Pre Conditions:
248 -- g_old_rec has been populated with details of the values currently in
249 -- the database.
250 --
251 -- In Arguments:
252 -- p_period_months
253 -- p_previous_job_id
254 -- p_object_version_number
255 --
256 -- Post Success:
257 -- Processing continues if period_months is between 0 and 11
258 --
259 -- Post Failure:
260 -- An application error is raised period_months is invalid.
261 --
262 -- {End Of Comments}
263 -- ----------------------------------------------------------------------------
264 procedure chk_period_months
265 (p_period_months in per_previous_jobs.period_months%type
266 ,p_previous_job_id
267 in per_previous_jobs.previous_job_id%type
268 ,p_object_version_number
269 in per_previous_jobs.object_version_number%type);
270 --
271 -- -----------------------------------------------------------------------
272 -- |---------------------------< chk_period_days >-----------------------|
273 -- -----------------------------------------------------------------------
274 -- {Start Of Comments}
275 --
276 -- Description:
277 -- This procedure ensures that period_days value is between 0 and 365
278 --
279 -- Pre Conditions:
280 -- g_old_rec has been populated with details of the values currently in
281 -- the database.
282 --
283 -- In Arguments:
284 -- p_period_days
285 -- p_previous_job_id
286 -- p_object_version_number
287 --
288 -- Post Success:
289 -- Processing continues if period_years is between 0 and 365
290 --
291 -- Post Failure:
292 -- An application error is raised period_days is invalid.
293 --
294 -- {End Of Comments}
295 -- ----------------------------------------------------------------------------
296 procedure chk_period_days
297 (p_period_days in per_previous_jobs.period_days%type
298 ,p_previous_job_id
299 in per_previous_jobs.previous_job_id%type
300 ,p_object_version_number
301 in per_previous_jobs.object_version_number%type);
302 --
303 -- ---------------------------------------------------------------------------
304 -- |-------------------------< return_leg_code >-----------------------------|
305 -- ---------------------------------------------------------------------------
306 -- {Start Of Comments}
307 --
308 -- Description:
309 -- Return the legislation code for a specific primary key value
310 --
311 -- Prerequisites:
312 -- The primary key identified by p_previous_employer_id
313 -- already exists.
314 --
315 -- In Arguments:
316 -- p_previous_employer_id
317 --
318 --
319 -- Post Success:
320 -- The business group's legislation code will be returned.
321 --
322 -- Post Failure:
323 -- An error is raised if the value does not exist.
324 --
325 -- Access Status:
326 -- Internal Development Use Only.
327 --
328 -- {End Of Comments}
329 -- ---------------------------------------------------------------------------
330 Function return_leg_code (
331 p_previous_employer_id in number
332 ) return varchar2;
333 --
334 end per_pjo_bus;