1 Package ben_epe_shd as
2 /* $Header: beeperhi.pkh 120.0 2005/05/28 02:37:08 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Global Record Type Specification |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9 (
10 elig_per_elctbl_chc_id number(15),
11 -- enrt_typ_cycl_cd varchar2(30),
12 enrt_cvg_strt_dt_cd varchar2(30),
13 -- enrt_perd_end_dt date,
14 -- enrt_perd_strt_dt date,
15 enrt_cvg_strt_dt_rl varchar2(30),
16 -- rt_strt_dt date,
17 -- rt_strt_dt_rl varchar2(30),
18 -- rt_strt_dt_cd varchar2(30),
19 ctfn_rqd_flag varchar2(30),
20 pil_elctbl_chc_popl_id number,
21 roll_crs_flag varchar2(30),
22 crntly_enrd_flag varchar2(30),
23 dflt_flag varchar2(30),
24 elctbl_flag varchar2(30),
25 mndtry_flag varchar2(30),
26 in_pndg_wkflow_flag varchar2(30),
27 -- dflt_enrt_dt date,
28 dpnt_cvg_strt_dt_cd varchar2(30),
29 dpnt_cvg_strt_dt_rl varchar2(30),
30 enrt_cvg_strt_dt date,
31 alws_dpnt_dsgn_flag varchar2(30),
32 dpnt_dsgn_cd varchar2(30),
33 ler_chg_dpnt_cvg_cd varchar2(30),
34 erlst_deenrt_dt date,
35 procg_end_dt date,
36 comp_lvl_cd varchar2(30),
37 pl_id number(15),
38 oipl_id number(15),
39 pgm_id number(15),
40 plip_id number(15),
41 ptip_id number(15),
42 pl_typ_id number(15),
43 oiplip_id number(15),
44 cmbn_plip_id number(15),
45 cmbn_ptip_id number(15),
46 cmbn_ptip_opt_id number(15),
47 assignment_id number(15),
48 spcl_rt_pl_id number(15),
49 spcl_rt_oipl_id number(15),
50 must_enrl_anthr_pl_id number(15),
51 int_elig_per_elctbl_chc_id number(15),
52 prtt_enrt_rslt_id number(15),
53 bnft_prvdr_pool_id number(15),
54 per_in_ler_id number(15),
55 yr_perd_id number(15),
56 auto_enrt_flag varchar2(30),
57 business_group_id number(15),
58 pl_ordr_num number(15),
59 plip_ordr_num number(15),
60 ptip_ordr_num number(15),
61 oipl_ordr_num number(15),
62 -- cwb
63 comments varchar2(2000),
64 elig_flag varchar2(30),
65 elig_ovrid_dt date,
66 elig_ovrid_person_id number(15),
67 inelig_rsn_cd varchar2(30),
68 mgr_ovrid_dt date,
69 mgr_ovrid_person_id number(15),
70 ws_mgr_id number(15),
71 -- cwb
72 epe_attribute_category varchar2(30),
73 epe_attribute1 varchar2(150),
74 epe_attribute2 varchar2(150),
75 epe_attribute3 varchar2(150),
76 epe_attribute4 varchar2(150),
77 epe_attribute5 varchar2(150),
78 epe_attribute6 varchar2(150),
79 epe_attribute7 varchar2(150),
80 epe_attribute8 varchar2(150),
81 epe_attribute9 varchar2(150),
82 epe_attribute10 varchar2(150),
83 epe_attribute11 varchar2(150),
84 epe_attribute12 varchar2(150),
85 epe_attribute13 varchar2(150),
86 epe_attribute14 varchar2(150),
87 epe_attribute15 varchar2(150),
88 epe_attribute16 varchar2(150),
89 epe_attribute17 varchar2(150),
90 epe_attribute18 varchar2(150),
91 epe_attribute19 varchar2(150),
92 epe_attribute20 varchar2(150),
93 epe_attribute21 varchar2(150),
94 epe_attribute22 varchar2(150),
95 epe_attribute23 varchar2(150),
96 epe_attribute24 varchar2(150),
97 epe_attribute25 varchar2(150),
98 epe_attribute26 varchar2(150),
99 epe_attribute27 varchar2(150),
100 epe_attribute28 varchar2(150),
101 epe_attribute29 varchar2(150),
102 epe_attribute30 varchar2(150),
103 approval_status_cd varchar2(30),
104 fonm_cvg_strt_dt date,
105 cryfwd_elig_dpnt_cd varchar2(30),
106 request_id number(15),
107 program_application_id number(15),
108 program_id number(15),
109 program_update_date date,
110 object_version_number number(9)
111 );
112 --
113 -- ----------------------------------------------------------------------------
114 -- | Global Definitions - Internal Development Use Only |
115 -- ----------------------------------------------------------------------------
116 --
117 g_old_rec g_rec_type; -- Global record definition
118 g_api_dml boolean; -- Global api dml status
119 --
120 -- ----------------------------------------------------------------------------
121 -- |------------------------< return_api_dml_status >-------------------------|
122 -- ----------------------------------------------------------------------------
123 -- {Start Of Comments}
124 --
125 -- Description:
126 -- This function will return the current g_api_dml private global
127 -- boolean status.
128 -- The g_api_dml status determines if at the time of the function
129 -- being executed if a dml statement (i.e. INSERT, UPDATE or DELETE)
130 -- is being issued from within an api.
131 -- If the status is TRUE then a dml statement is being issued from
132 -- within this entity api.
133 -- This function is primarily to support database triggers which
134 -- need to maintain the object_version_number for non-supported
135 -- dml statements (i.e. dml statement issued outside of the api layer).
136 --
137 -- Prerequisites:
138 -- None.
139 --
140 -- In Parameters:
141 -- None.
142 --
143 -- Post Success:
144 -- Processing continues.
145 -- If the function returns a TRUE value then, dml is being executed from
146 -- within this api.
147 --
148 -- Post Failure:
149 -- None.
150 --
151 -- Access Status:
152 -- Internal Row Handler Use Only.
153 --
154 -- {End Of Comments}
155 -- ----------------------------------------------------------------------------
156 Function return_api_dml_status Return Boolean;
157 --
158 -- ----------------------------------------------------------------------------
159 -- |---------------------------< constraint_error >---------------------------|
160 -- ----------------------------------------------------------------------------
161 -- {Start Of Comments}
162 --
163 -- Description:
164 -- This procedure is called when a constraint has been violated (i.e.
165 -- The exception hr_api.check_integrity_violated,
166 -- hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
167 -- hr_api.unique_integrity_violated has been raised).
168 -- The exceptions can only be raised as follows:
169 -- 1) A check constraint can only be violated during an INSERT or UPDATE
170 -- dml operation.
171 -- 2) A parent integrity constraint can only be violated during an
172 -- INSERT or UPDATE dml operation.
173 -- 3) A child integrity constraint can only be violated during an
174 -- DELETE dml operation.
175 -- 4) A unique integrity constraint can only be violated during INSERT or
176 -- UPDATE dml operation.
177 --
178 -- Prerequisites:
179 -- 1) Either hr_api.check_integrity_violated,
180 -- hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
181 -- hr_api.unique_integrity_violated has been raised with the subsequent
182 -- stripping of the constraint name from the generated error message
183 -- text.
184 -- 2) Standalone validation test which corresponds with a constraint error.
185 --
186 -- In Parameter:
187 -- p_constraint_name is in upper format and is just the constraint name
188 -- (e.g. not prefixed by brackets, schema owner etc).
189 --
190 -- Post Success:
191 -- Development dependant.
192 --
193 -- Post Failure:
194 -- Developement dependant.
195 --
196 -- Developer Implementation Notes:
197 -- For each constraint being checked the hr system package failure message
198 -- has been generated as a template only. These system error messages should
199 -- be modified as required (i.e. change the system failure message to a user
200 -- friendly defined error message).
201 --
202 -- Access Status:
203 -- Internal Development Use Only.
204 --
205 -- {End Of Comments}
206 -- ----------------------------------------------------------------------------
207 Procedure constraint_error
208 (p_constraint_name in all_constraints.constraint_name%TYPE);
209 --
210 -- ----------------------------------------------------------------------------
211 -- |-----------------------------< api_updating >-----------------------------|
212 -- ----------------------------------------------------------------------------
213 -- {Start Of Comments}
214 --
215 -- Description:
216 -- This function is used to populate the g_old_rec record with the
217 -- current row from the database for the specified primary key
218 -- provided that the primary key exists and is valid and does not
219 -- already match the current g_old_rec. The function will always return
220 -- a TRUE value if the g_old_rec is populated with the current row.
221 -- A FALSE value will be returned if all of the primary key arguments
222 -- are null.
223 --
224 -- Prerequisites:
225 -- None.
226 --
227 -- In Parameters:
228 --
229 -- Post Success:
230 -- A value of TRUE will be returned indiciating that the g_old_rec
231 -- is current.
232 -- A value of FALSE will be returned if all of the primary key arguments
233 -- have a null value (this indicates that the row has not be inserted into
234 -- the Schema), and therefore could never have a corresponding row.
235 --
236 -- Post Failure:
237 -- A failure can only occur under two circumstances:
238 -- 1) The primary key is invalid (i.e. a row does not exist for the
239 -- specified primary key values).
240 -- 2) If an object_version_number exists but is NOT the same as the current
241 -- g_old_rec value.
242 --
243 -- Developer Implementation Notes:
244 -- None.
245 --
246 -- Access Status:
247 -- Internal Development Use Only.
248 --
249 -- {End Of Comments}
250 -- ----------------------------------------------------------------------------
251 Function api_updating
252 (
253 p_elig_per_elctbl_chc_id in number,
254 p_object_version_number in number
255 ) Return Boolean;
256 --
257 -- ----------------------------------------------------------------------------
258 -- |---------------------------------< lck >----------------------------------|
259 -- ----------------------------------------------------------------------------
260 -- {Start Of Comments}
261 --
262 -- Description:
263 -- The Lck process has two main functions to perform. Firstly, the row to be
264 -- updated or deleted must be locked. The locking of the row will only be
265 -- successful if the row is not currently locked by another user.
266 -- Secondly, during the locking of the row, the row is selected into
267 -- the g_old_rec data structure which enables the current row values from the
268 -- server to be available to the api.
269 --
270 -- Prerequisites:
271 -- When attempting to call the lock the object version number (if defined)
272 -- is mandatory.
273 --
274 -- In Parameters:
275 -- The arguments to the Lck process are the primary key(s) which uniquely
276 -- identify the row and the object version number of row.
277 --
278 -- Post Success:
279 -- On successful completion of the Lck process the row to be updated or
280 -- deleted will be locked and selected into the global data structure
281 -- g_old_rec.
282 --
283 -- Post Failure:
284 -- The Lck process can fail for three reasons:
285 -- 1) When attempting to lock the row the row could already be locked by
286 -- another user. This will raise the HR_Api.Object_Locked exception.
287 -- 2) The row which is required to be locked doesn't exist in the HR Schema.
288 -- This error is trapped and reported using the message name
289 -- 'HR_7220_INVALID_PRIMARY_KEY'.
290 -- 3) The row although existing in the HR Schema has a different object
291 -- version number than the object version number specified.
292 -- This error is trapped and reported using the message name
293 -- 'HR_7155_OBJECT_INVALID'.
294 --
295 -- Developer Implementation Notes:
296 -- For each primary key and the object version number arguments add a
297 -- call to hr_api.mandatory_arg_error procedure to ensure that these
298 -- argument values are not null.
299 --
300 -- Access Status:
301 -- Internal Development Use Only.
302 --
303 -- {End Of Comments}
304 -- ----------------------------------------------------------------------------
305 Procedure lck
306 (
307 p_elig_per_elctbl_chc_id in number,
308 p_object_version_number in number
309 );
310 --
311 -- ----------------------------------------------------------------------------
312 -- |-----------------------------< convert_args >-----------------------------|
313 -- ----------------------------------------------------------------------------
314 -- {Start Of Comments}
315 --
316 -- Description:
317 -- This function is used to turn attribute parameters into the record
318 -- structure parameter g_rec_type.
319 --
320 -- Prerequisites:
324 -- In Parameters:
321 -- This is a private function and can only be called from the ins or upd
322 -- attribute processes.
323 --
325 --
326 -- Post Success:
327 -- A returning record structure will be returned.
328 --
329 -- Post Failure:
330 -- No direct error handling is required within this function. Any possible
331 -- errors within this function will be a PL/SQL value error due to conversion
332 -- of datatypes or data lengths.
333 --
334 -- Developer Implementation Notes:
335 -- None.
336 --
337 -- Access Status:
338 -- Internal Row Handler Use Only.
339 --
340 -- {End Of Comments}
341 -- ----------------------------------------------------------------------------
342 Function convert_args
343 (
344 p_elig_per_elctbl_chc_id in number,
345 -- p_enrt_typ_cycl_cd in varchar2,
346 p_enrt_cvg_strt_dt_cd in varchar2,
347 -- p_enrt_perd_end_dt in date,
348 -- p_enrt_perd_strt_dt in date,
349 p_enrt_cvg_strt_dt_rl in varchar2,
350 -- p_rt_strt_dt in date,
351 -- p_rt_strt_dt_rl in varchar2,
352 -- p_rt_strt_dt_cd in varchar2,
353 p_ctfn_rqd_flag in varchar2,
354 p_pil_elctbl_chc_popl_id in number,
355 p_roll_crs_flag in varchar2,
356 p_crntly_enrd_flag in varchar2,
357 p_dflt_flag in varchar2,
358 p_elctbl_flag in varchar2,
359 p_mndtry_flag in varchar2,
360 p_in_pndg_wkflow_flag in varchar2,
361 -- p_dflt_enrt_dt in date,
362 p_dpnt_cvg_strt_dt_cd in varchar2,
363 p_dpnt_cvg_strt_dt_rl in varchar2,
364 p_enrt_cvg_strt_dt in date,
365 p_alws_dpnt_dsgn_flag in varchar2,
366 p_dpnt_dsgn_cd in varchar2,
367 p_ler_chg_dpnt_cvg_cd in varchar2,
368 p_erlst_deenrt_dt in date,
369 p_procg_end_dt in date,
370 p_comp_lvl_cd in varchar2,
371 p_pl_id in number,
372 p_oipl_id in number,
373 p_pgm_id in number,
374 p_plip_id in number,
375 p_ptip_id in number,
376 p_pl_typ_id in number,
377 p_oiplip_id in number,
378 p_cmbn_plip_id in number,
379 p_cmbn_ptip_id in number,
380 p_cmbn_ptip_opt_id in number,
381 p_assignment_id in number,
382 p_spcl_rt_pl_id in number,
383 p_spcl_rt_oipl_id in number,
384 p_must_enrl_anthr_pl_id in number,
385 p_int_elig_per_elctbl_chc_id in number,
386 p_prtt_enrt_rslt_id in number,
387 p_bnft_prvdr_pool_id in number,
388 p_per_in_ler_id in number,
389 p_yr_perd_id in number,
390 p_auto_enrt_flag in varchar2,
391 p_business_group_id in number,
392 p_pl_ordr_num in number,
393 p_plip_ordr_num in number,
394 p_ptip_ordr_num in number,
395 p_oipl_ordr_num in number,
396 -- cwb
397 p_comments in varchar2,
398 p_elig_flag in varchar2,
399 p_elig_ovrid_dt in date,
400 p_elig_ovrid_person_id in number,
401 p_inelig_rsn_cd in varchar2,
402 p_mgr_ovrid_dt in date,
403 p_mgr_ovrid_person_id in number,
404 p_ws_mgr_id in number,
405 -- cwb
406 p_epe_attribute_category in varchar2,
407 p_epe_attribute1 in varchar2,
408 p_epe_attribute2 in varchar2,
409 p_epe_attribute3 in varchar2,
410 p_epe_attribute4 in varchar2,
411 p_epe_attribute5 in varchar2,
412 p_epe_attribute6 in varchar2,
413 p_epe_attribute7 in varchar2,
414 p_epe_attribute8 in varchar2,
415 p_epe_attribute9 in varchar2,
416 p_epe_attribute10 in varchar2,
417 p_epe_attribute11 in varchar2,
418 p_epe_attribute12 in varchar2,
419 p_epe_attribute13 in varchar2,
420 p_epe_attribute14 in varchar2,
421 p_epe_attribute15 in varchar2,
422 p_epe_attribute16 in varchar2,
423 p_epe_attribute17 in varchar2,
424 p_epe_attribute18 in varchar2,
425 p_epe_attribute19 in varchar2,
426 p_epe_attribute20 in varchar2,
427 p_epe_attribute21 in varchar2,
428 p_epe_attribute22 in varchar2,
429 p_epe_attribute23 in varchar2,
430 p_epe_attribute24 in varchar2,
431 p_epe_attribute25 in varchar2,
432 p_epe_attribute26 in varchar2,
433 p_epe_attribute27 in varchar2,
434 p_epe_attribute28 in varchar2,
435 p_epe_attribute29 in varchar2,
436 p_epe_attribute30 in varchar2,
437 p_approval_status_cd in varchar2,
438 p_fonm_cvg_strt_dt in date,
439 p_cryfwd_elig_dpnt_cd in varchar2,
440 p_request_id in number,
441 p_program_application_id in number,
442 p_program_id in number,
443 p_program_update_date in date,
444 p_object_version_number in number
445 )
446 Return g_rec_type;
447 --
448 end ben_epe_shd;