DBA Data[Home] [Help]

PACKAGE: APPS.BEN_PRV_SHD

Source


1 Package ben_prv_shd as
2 /* $Header: beprvrhi.pkh 120.0.12000000.1 2007/01/19 22:14:47 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (
10   prtt_rt_val_id                    number(15),
11   enrt_rt_id			    number(15),
12   rt_strt_dt                        date,
13   rt_end_dt                         date,
14   rt_typ_cd                         varchar2(30),
15   tx_typ_cd                         varchar2(30),
16   ordr_num			    number,
17   acty_typ_cd                       varchar2(30),
18   mlt_cd                            varchar2(30),
19   acty_ref_perd_cd                  varchar2(30),
20   rt_val                            number,
21   ann_rt_val                        number(15,2),
22   cmcd_rt_val                       number(15,2),
23   cmcd_ref_perd_cd                  varchar2(30),
24   bnft_rt_typ_cd                    varchar2(30),
25   dsply_on_enrt_flag                varchar2(30),
26   rt_ovridn_flag                    varchar2(30),
27   rt_ovridn_thru_dt                 date,
28   elctns_made_dt                    date,
29   prtt_rt_val_stat_cd               varchar2(30),
30   prtt_enrt_rslt_id                 number(15),
31   cvg_amt_calc_mthd_id              number(15),
32   actl_prem_id                      number(15),
33   comp_lvl_fctr_id                  number(15),
34   element_entry_value_id            number(15),
35   per_in_ler_id                     number(15),
36   ended_per_in_ler_id               number(15),
37   acty_base_rt_id                   number(15),
38   prtt_reimbmt_rqst_id              number(15),
39   prtt_rmt_aprvd_fr_pymt_id         number(15),
40   pp_in_yr_used_num                 number(15),
41   business_group_id                 number(15),
42   prv_attribute_category            varchar2(30),
43   prv_attribute1                    varchar2(150),
44   prv_attribute2                    varchar2(150),
45   prv_attribute3                    varchar2(150),
46   prv_attribute4                    varchar2(150),
47   prv_attribute5                    varchar2(150),
48   prv_attribute6                    varchar2(150),
49   prv_attribute7                    varchar2(150),
50   prv_attribute8                    varchar2(150),
51   prv_attribute9                    varchar2(150),
52   prv_attribute10                   varchar2(150),
53   prv_attribute11                   varchar2(150),
54   prv_attribute12                   varchar2(150),
55   prv_attribute13                   varchar2(150),
56   prv_attribute14                   varchar2(150),
57   prv_attribute15                   varchar2(150),
58   prv_attribute16                   varchar2(150),
59   prv_attribute17                   varchar2(150),
60   prv_attribute18                   varchar2(150),
61   prv_attribute19                   varchar2(150),
62   prv_attribute20                   varchar2(150),
63   prv_attribute21                   varchar2(150),
64   prv_attribute22                   varchar2(150),
65   prv_attribute23                   varchar2(150),
66   prv_attribute24                   varchar2(150),
67   prv_attribute25                   varchar2(150),
68   prv_attribute26                   varchar2(150),
69   prv_attribute27                   varchar2(150),
70   prv_attribute28                   varchar2(150),
71   prv_attribute29                   varchar2(150),
72   prv_attribute30                   varchar2(150),
73   pk_id_table_name                  varchar2(100),
74   pk_id                             number(15),
75   object_version_number             number(9)
76   );
77 --
78 -- ----------------------------------------------------------------------------
79 -- |           Global Definitions - Internal Development Use Only             |
80 -- ----------------------------------------------------------------------------
81 --
82 g_old_rec  g_rec_type;                            -- Global record definition
83 g_api_dml  boolean;                               -- Global api dml status
84 --
85 -- ----------------------------------------------------------------------------
86 -- |------------------------< return_api_dml_status >-------------------------|
87 -- ----------------------------------------------------------------------------
88 -- {Start Of Comments}
89 --
90 -- Description:
91 --   This function will return the current g_api_dml private global
92 --   boolean status.
93 --   The g_api_dml status determines if at the time of the function
94 --   being executed if a dml statement (i.e. INSERT, UPDATE or DELETE)
95 --   is being issued from within an api.
96 --   If the status is TRUE then a dml statement is being issued from
97 --   within this entity api.
98 --   This function is primarily to support database triggers which
99 --   need to maintain the object_version_number for non-supported
100 --   dml statements (i.e. dml statement issued outside of the api layer).
101 --
102 -- Prerequisites:
103 --   None.
104 --
105 -- In Parameters:
106 --   None.
107 --
108 -- Post Success:
109 --   Processing continues.
110 --   If the function returns a TRUE value then, dml is being executed from
111 --   within this api.
112 --
113 -- Post Failure:
114 --   None.
115 --
116 -- Access Status:
117 --   Internal Row Handler Use Only.
118 --
119 -- {End Of Comments}
120 -- ----------------------------------------------------------------------------
121 Function return_api_dml_status Return Boolean;
122 --
123 -- ----------------------------------------------------------------------------
124 -- |---------------------------< constraint_error >---------------------------|
125 -- ----------------------------------------------------------------------------
126 -- {Start Of Comments}
127 --
128 -- Description:
129 --   This procedure is called when a constraint has been violated (i.e.
130 --   The exception hr_api.check_integrity_violated,
131 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
132 --   hr_api.unique_integrity_violated has been raised).
133 --   The exceptions can only be raised as follows:
134 --   1) A check constraint can only be violated during an INSERT or UPDATE
135 --      dml operation.
136 --   2) A parent integrity constraint can only be violated during an
137 --      INSERT or UPDATE dml operation.
138 --   3) A child integrity constraint can only be violated during an
139 --      DELETE dml operation.
140 --   4) A unique integrity constraint can only be violated during INSERT or
141 --      UPDATE dml operation.
142 --
143 -- Prerequisites:
144 --   1) Either hr_api.check_integrity_violated,
145 --      hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
146 --      hr_api.unique_integrity_violated has been raised with the subsequent
147 --      stripping of the constraint name from the generated error message
148 --      text.
149 --   2) Standalone validation test which corresponds with a constraint error.
150 --
151 -- In Parameter:
152 --   p_constraint_name is in upper format and is just the constraint name
153 --   (e.g. not prefixed by brackets, schema owner etc).
154 --
155 -- Post Success:
156 --   Development dependant.
157 --
158 -- Post Failure:
159 --   Developement dependant.
160 --
161 -- Developer Implementation Notes:
162 --   For each constraint being checked the hr system package failure message
163 --   has been generated as a template only. These system error messages should
164 --   be modified as required (i.e. change the system failure message to a user
165 --   friendly defined error message).
166 --
167 -- Access Status:
168 --   Internal Development Use Only.
169 --
170 -- {End Of Comments}
171 -- ----------------------------------------------------------------------------
172 Procedure constraint_error
173             (p_constraint_name in all_constraints.constraint_name%TYPE);
174 --
175 -- ----------------------------------------------------------------------------
176 -- |-----------------------------< api_updating >-----------------------------|
177 -- ----------------------------------------------------------------------------
178 -- {Start Of Comments}
179 --
180 -- Description:
181 --   This function is used to populate the g_old_rec record with the
182 --   current row from the database for the specified primary key
183 --   provided that the primary key exists and is valid and does not
184 --   already match the current g_old_rec. The function will always return
185 --   a TRUE value if the g_old_rec is populated with the current row.
186 --   A FALSE value will be returned if all of the primary key arguments
187 --   are null.
188 --
189 -- Prerequisites:
190 --   None.
191 --
192 -- In Parameters:
193 --
194 -- Post Success:
195 --   A value of TRUE will be returned indiciating that the g_old_rec
196 --   is current.
197 --   A value of FALSE will be returned if all of the primary key arguments
198 --   have a null value (this indicates that the row has not be inserted into
199 --   the Schema), and therefore could never have a corresponding row.
200 --
201 -- Post Failure:
202 --   A failure can only occur under two circumstances:
203 --   1) The primary key is invalid (i.e. a row does not exist for the
204 --      specified primary key values).
205 --   2) If an object_version_number exists but is NOT the same as the current
206 --      g_old_rec value.
207 --
208 -- Developer Implementation Notes:
209 --   None.
210 --
211 -- Access Status:
212 --   Internal Development Use Only.
213 --
214 -- {End Of Comments}
215 -- ----------------------------------------------------------------------------
216 Function api_updating
217   (
218   p_prtt_rt_val_id                     in number,
219   p_object_version_number              in number
220   )      Return Boolean;
221 --
222 -- ----------------------------------------------------------------------------
223 -- |---------------------------------< lck >----------------------------------|
224 -- ----------------------------------------------------------------------------
225 -- {Start Of Comments}
226 --
227 -- Description:
228 --   The Lck process has two main functions to perform. Firstly, the row to be
229 --   updated or deleted must be locked. The locking of the row will only be
230 --   successful if the row is not currently locked by another user.
231 --   Secondly, during the locking of the row, the row is selected into
232 --   the g_old_rec data structure which enables the current row values from the
233 --   server to be available to the api.
234 --
235 -- Prerequisites:
236 --   When attempting to call the lock the object version number (if defined)
237 --   is mandatory.
238 --
239 -- In Parameters:
240 --   The arguments to the Lck process are the primary key(s) which uniquely
241 --   identify the row and the object version number of row.
242 --
243 -- Post Success:
244 --   On successful completion of the Lck process the row to be updated or
245 --   deleted will be locked and selected into the global data structure
246 --   g_old_rec.
247 --
248 -- Post Failure:
249 --   The Lck process can fail for three reasons:
250 --   1) When attempting to lock the row the row could already be locked by
251 --      another user. This will raise the HR_Api.Object_Locked exception.
252 --   2) The row which is required to be locked doesn't exist in the HR Schema.
253 --      This error is trapped and reported using the message name
254 --      'HR_7220_INVALID_PRIMARY_KEY'.
255 --   3) The row although existing in the HR Schema has a different object
256 --      version number than the object version number specified.
257 --      This error is trapped and reported using the message name
258 --      'HR_7155_OBJECT_INVALID'.
259 --
260 -- Developer Implementation Notes:
261 --   For each primary key and the object version number arguments add a
262 --   call to hr_api.mandatory_arg_error procedure to ensure that these
263 --   argument values are not null.
264 --
265 -- Access Status:
266 --   Internal Development Use Only.
267 --
268 -- {End Of Comments}
269 -- ----------------------------------------------------------------------------
270 Procedure lck
271   (
272   p_prtt_rt_val_id                     in number,
273   p_object_version_number              in number
274   );
275 --
276 -- ----------------------------------------------------------------------------
277 -- |-----------------------------< convert_args >-----------------------------|
278 -- ----------------------------------------------------------------------------
279 -- {Start Of Comments}
280 --
281 -- Description:
282 --   This function is used to turn attribute parameters into the record
283 --   structure parameter g_rec_type.
284 --
285 -- Prerequisites:
286 --   This is a private function and can only be called from the ins or upd
287 --   attribute processes.
288 --
289 -- In Parameters:
290 --
291 -- Post Success:
292 --   A returning record structure will be returned.
293 --
294 -- Post Failure:
295 --   No direct error handling is required within this function. Any possible
296 --   errors within this function will be a PL/SQL value error due to conversion
297 --   of datatypes or data lengths.
298 --
299 -- Developer Implementation Notes:
300 --   None.
301 --
302 -- Access Status:
303 --   Internal Row Handler Use Only.
304 --
305 -- {End Of Comments}
306 -- ----------------------------------------------------------------------------
307 Function convert_args
308 	(
309 	p_prtt_rt_val_id                in number,
310 	p_enrt_rt_id			in number,
311 	p_rt_strt_dt                    in date,
312 	p_rt_end_dt                     in date,
313 	p_rt_typ_cd                     in varchar2,
314 	p_tx_typ_cd                     in varchar2,
315 	p_ordr_num			in number,
316 	p_acty_typ_cd                   in varchar2,
317 	p_mlt_cd                        in varchar2,
318 	p_acty_ref_perd_cd              in varchar2,
319 	p_rt_val                        in number,
320 	p_ann_rt_val                    in number,
321 	p_cmcd_rt_val                   in number,
322 	p_cmcd_ref_perd_cd              in varchar2,
323 	p_bnft_rt_typ_cd                in varchar2,
324 	p_dsply_on_enrt_flag            in varchar2,
325 	p_rt_ovridn_flag                in varchar2,
326 	p_rt_ovridn_thru_dt             in date,
327 	p_elctns_made_dt                in date,
328 	p_prtt_rt_val_stat_cd           in varchar2,
329 	p_prtt_enrt_rslt_id             in number,
330 	p_cvg_amt_calc_mthd_id          in number,
331 	p_actl_prem_id                  in number,
332 	p_comp_lvl_fctr_id              in number,
333 	p_element_entry_value_id        in number,
334 	p_per_in_ler_id                 in number,
335 	p_ended_per_in_ler_id           in number,
336 	p_acty_base_rt_id               in number,
337 	p_prtt_reimbmt_rqst_id          in number,
338         p_prtt_rmt_aprvd_fr_pymt_id     in number,
339         p_pp_in_yr_used_num             in  number,
340 	p_business_group_id             in number,
341 	p_prv_attribute_category        in varchar2,
342 	p_prv_attribute1                in varchar2,
343 	p_prv_attribute2                in varchar2,
344 	p_prv_attribute3                in varchar2,
345 	p_prv_attribute4                in varchar2,
346 	p_prv_attribute5                in varchar2,
347 	p_prv_attribute6                in varchar2,
348 	p_prv_attribute7                in varchar2,
349 	p_prv_attribute8                in varchar2,
350 	p_prv_attribute9                in varchar2,
351 	p_prv_attribute10               in varchar2,
352 	p_prv_attribute11               in varchar2,
353 	p_prv_attribute12               in varchar2,
354 	p_prv_attribute13               in varchar2,
355 	p_prv_attribute14               in varchar2,
356 	p_prv_attribute15               in varchar2,
357 	p_prv_attribute16               in varchar2,
358 	p_prv_attribute17               in varchar2,
359 	p_prv_attribute18               in varchar2,
360 	p_prv_attribute19               in varchar2,
361 	p_prv_attribute20               in varchar2,
362 	p_prv_attribute21               in varchar2,
363 	p_prv_attribute22               in varchar2,
364 	p_prv_attribute23               in varchar2,
365 	p_prv_attribute24               in varchar2,
366 	p_prv_attribute25               in varchar2,
367 	p_prv_attribute26               in varchar2,
368 	p_prv_attribute27               in varchar2,
369 	p_prv_attribute28               in varchar2,
370 	p_prv_attribute29               in varchar2,
371 	p_prv_attribute30               in varchar2,
372         p_pk_id_table_name              in varchar2,
373         p_pk_id                         in number,
374 	p_object_version_number         in number
375 	)
376 	Return g_rec_type;
377 --
378 end ben_prv_shd;