DBA Data[Home] [Help]

PACKAGE: APPS.BEN_RTS_SHD

Source


1 Package ben_rts_shd AUTHID CURRENT_USER as
2 /* $Header: bertsrhi.pkh 120.1 2006/01/09 14:36:43 maagrawa noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (person_rate_id                  number(15)
10   ,group_per_in_ler_id             number(15)
11   ,pl_id                           number(15)
12   ,oipl_id                         number(15)
13   ,group_pl_id                     number(15)
14   ,group_oipl_id                   number(15)
15   ,lf_evt_ocrd_dt                  date
16   ,person_id                       number(15)
17   ,assignment_id                   number(15)
18   ,elig_flag                       varchar2(30)
19   ,ws_val                          number
20   ,ws_mn_val                       number
21   ,ws_mx_val                       number
22   ,ws_incr_val                     number
23   ,elig_sal_val                    number
24   ,stat_sal_val                    number
25   ,oth_comp_val                    number
26   ,tot_comp_val                    number
27   ,misc1_val                       number
28   ,misc2_val                       number
29   ,misc3_val                       number
30   ,rec_val                         number
31   ,rec_mn_val                      number
32   ,rec_mx_val                      number
33   ,rec_incr_val                    number
34   ,ws_val_last_upd_date            date
35   ,ws_val_last_upd_by              number(15)
36   ,pay_proposal_id                 number(15)
37   ,element_entry_value_id          number(15)
38   ,inelig_rsn_cd                   varchar2(30)
39   ,elig_ovrid_dt                   date
40   ,elig_ovrid_person_id            number(15)
41   ,copy_dist_bdgt_val              number
42   ,copy_ws_bdgt_val                number
43   ,copy_rsrv_val                   number
44   ,copy_dist_bdgt_mn_val           number
45   ,copy_dist_bdgt_mx_val           number
46   ,copy_dist_bdgt_incr_val         number
47   ,copy_ws_bdgt_mn_val             number
48   ,copy_ws_bdgt_mx_val             number
49   ,copy_ws_bdgt_incr_val           number
50   ,copy_rsrv_mn_val                number
51   ,copy_rsrv_mx_val                number
52   ,copy_rsrv_incr_val              number
53   ,copy_dist_bdgt_iss_val          number
54   ,copy_ws_bdgt_iss_val            number
55   ,copy_dist_bdgt_iss_date         date
56   ,copy_ws_bdgt_iss_date           date
57   ,comp_posting_date               date
58   ,ws_rt_start_date                date
59   ,currency                        varchar2(30)
60   ,object_version_number           number(9)
61   );
62 --
63 -- ----------------------------------------------------------------------------
64 -- |           Global Definitions - Internal Development Use Only             |
65 -- ----------------------------------------------------------------------------
66 --
67 g_old_rec  g_rec_type;                            -- Global record definition
68 -- Global table name
69 g_tab_nam  constant varchar2(30) := 'BEN_CWB_PERSON_RATES';
70 g_api_dml  boolean;                               -- Global api dml status
71 --
72 -- ----------------------------------------------------------------------------
73 -- |------------------------< return_api_dml_status >-------------------------|
74 -- ----------------------------------------------------------------------------
75 -- {Start Of Comments}
76 --
77 -- Description:
78 --   This function will return the current g_api_dml private global
79 --   boolean status.
80 --   The g_api_dml status determines if at the time of the function
81 --   being executed if a dml statement (i.e. INSERT, UPDATE or DELETE)
82 --   is being issued from within an api.
83 --   If the status is TRUE then a dml statement is being issued from
84 --   within this entity api.
85 --   This function is primarily to support database triggers which
86 --   need to maintain the object_version_number for non-supported
87 --   dml statements (i.e. dml statement issued outside of the api layer).
88 --
89 -- Prerequisites:
90 --   None.
91 --
92 -- In Parameters:
93 --   None.
94 --
95 -- Post Success:
96 --   Processing continues.
97 --   If the function returns a TRUE value then, dml is being executed from
98 --   within this api.
99 --
100 -- Post Failure:
101 --   None.
102 --
103 -- Access Status:
104 --   Internal Row Handler Use Only.
105 --
106 -- {End Of Comments}
107 -- ----------------------------------------------------------------------------
108 Function return_api_dml_status Return Boolean;
109 --
110 -- ----------------------------------------------------------------------------
111 -- |---------------------------< constraint_error >---------------------------|
112 -- ----------------------------------------------------------------------------
113 -- {Start Of Comments}
114 --
115 -- Description:
116 --   This procedure is called when a constraint has been violated (i.e.
117 --   The exception hr_api.check_integrity_violated,
118 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
119 --   hr_api.unique_integrity_violated has been raised).
120 --   The exceptions can only be raised as follows:
121 --   1) A check constraint can only be violated during an INSERT or UPDATE
122 --      dml operation.
123 --   2) A parent integrity constraint can only be violated during an
124 --      INSERT or UPDATE dml operation.
125 --   3) A child integrity constraint can only be violated during an
126 --      DELETE dml operation.
127 --   4) A unique integrity constraint can only be violated during INSERT or
128 --      UPDATE dml operation.
129 --
130 -- Prerequisites:
131 --   1) Either hr_api.check_integrity_violated,
132 --      hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
133 --      hr_api.unique_integrity_violated has been raised with the subsequent
134 --      stripping of the constraint name from the generated error message
135 --      text.
136 --   2) Standalone validation test which corresponds with a constraint error.
137 --
138 -- In Parameter:
139 --   p_constraint_name is in upper format and is just the constraint name
140 --   (e.g. not prefixed by brackets, schema owner etc).
141 --
142 -- Post Success:
143 --   Development dependant.
144 --
145 -- Post Failure:
146 --   Developement dependant.
147 --
148 -- Developer Implementation Notes:
149 --   For each constraint being checked the hr system package failure message
150 --   has been generated as a template only. These system error messages should
151 --   be modified as required (i.e. change the system failure message to a user
152 --   friendly defined error message).
153 --
154 -- Access Status:
155 --   Internal Development Use Only.
156 --
157 -- {End Of Comments}
158 -- ----------------------------------------------------------------------------
159 Procedure constraint_error
160   (p_constraint_name in all_constraints.constraint_name%TYPE);
161 --
162 -- ----------------------------------------------------------------------------
163 -- |-----------------------------< api_updating >-----------------------------|
164 -- ----------------------------------------------------------------------------
165 --  {Start Of Comments}
166 --
167 -- Description:
168 --   This function is used to populate the g_old_rec record with the
169 --   current row from the database for the specified primary key
170 --   provided that the primary key exists and is valid and does not
171 --   already match the current g_old_rec. The function will always return
172 --   a TRUE value if the g_old_rec is populated with the current row.
173 --   A FALSE value will be returned if all of the primary key arguments
174 --   are null.
175 --
176 -- Prerequisites:
177 --   None.
178 --
179 -- In Parameters:
180 --   p_group_per_in_ler_id
181 --   p_pl_id
182 --   p_oipl_id
183 --   p_object_version_number
184 --
185 -- Post Success:
186 --   A value of TRUE will be returned indiciating that the g_old_rec
187 --   is current.
188 --   A value of FALSE will be returned if all of the primary key arguments
189 --   have a null value (this indicates that the row has not be inserted into
190 --   the Schema), and therefore could never have a corresponding row.
191 --
192 -- Post Failure:
193 --   A failure can only occur under two circumstances:
194 --   1) The primary key is invalid (i.e. a row does not exist for the
195 --      specified primary key values).
196 --   2) If an object_version_number exists but is NOT the same as the current
197 --      g_old_rec value.
198 --
199 -- Developer Implementation Notes:
200 --   Though the designated primary key is person_rate_id, update and delete
201 --   are based on group_per_in_ler_id, pl_id, and oipl_id combination.
202 --
203 -- Access Status:
204 --   Internal Development Use Only.
205 --
206 -- {End Of Comments}
207 -- ----------------------------------------------------------------------------
208 Function api_updating
209   (p_group_per_in_ler_id                  in     number
210   ,p_pl_id                                in     number
211   ,p_oipl_id                              in     number
212   ,p_object_version_number                in     number
213   )
214   Return Boolean;
215 --
216 -- ----------------------------------------------------------------------------
217 -- |---------------------------------< lck >----------------------------------|
218 -- ----------------------------------------------------------------------------
219 -- {Start of comments}
220 --
221 -- Description:
222 --   The Lck process has two main functions to perform. Firstly, the row to be
223 --   updated or deleted must be locked. The locking of the row will only be
224 --   successful if the row is not currently locked by another user.
225 --   Secondly, during the locking of the row, the row is selected into
226 --   the g_old_rec data structure which enables the current row values from
227 --   the server to be available to the api.
228 --
229 -- Prerequisites:
230 --   When attempting to call the lock the object version number (if defined)
231 --   is mandatory.
232 --
233 -- In Parameters:
234 --   The arguments to the Lck process are the primary key(s) which uniquely
235 --   identify the row and the object version number of row.
236 --
237 -- Post Success:
238 --   On successful completion of the Lck process the row to be updated or
239 --   deleted will be locked and selected into the global data structure
240 --   g_old_rec.
241 --
242 -- Post Failure:
243 --   The Lck process can fail for three reasons:
244 --   1) When attempting to lock the row the row could already be locked by
245 --      another user. This will raise the HR_Api.Object_Locked exception.
246 --   2) The row which is required to be locked doesn't exist in the HR Schema.
247 --      This error is trapped and reported using the message name
248 --      'HR_7220_INVALID_PRIMARY_KEY'.
249 --   3) The row although existing in the HR Schema has a different object
250 --      version number than the object version number specified.
251 --      This error is trapped and reported using the message name
252 --      'HR_7155_OBJECT_INVALID'.
253 --
254 -- Developer Implementation Notes:
255 --   Though the designated primary key is person_rate_id, update and delete
256 --   are based on group_per_in_ler_id, pl_id, and oipl_id combination.
257 --
258 -- Access Status:
259 --   Internal Development Use Only.
260 --
261 -- {End of comments}
262 -- ----------------------------------------------------------------------------
263 Procedure lck
264   (p_group_per_in_ler_id                  in     number
265   ,p_pl_id                                in     number
266   ,p_oipl_id                              in     number
267   ,p_object_version_number                in     number
268   );
269 --
270 -- ----------------------------------------------------------------------------
271 -- |-----------------------------< convert_args >-----------------------------|
272 -- ----------------------------------------------------------------------------
273 -- {Start Of Comments}
274 --
275 -- Description:
276 --   This function is used to turn attribute parameters into the record
277 --   structure parameter g_rec_type.
278 --
279 -- Prerequisites:
280 --   This is a private function and can only be called from the ins or upd
281 --   attribute processes.
282 --
283 -- In Parameters:
284 --
285 -- Post Success:
286 --   A returning record structure will be returned.
287 --
288 -- Post Failure:
289 --   No direct error handling is required within this function.  Any possible
290 --   errors within this function will be a PL/SQL value error due to
291 --   conversion of datatypes or data lengths.
292 --
293 -- Developer Implementation Notes:
294 --   None.
295 --
296 -- Access Status:
297 --   Internal Row Handler Use Only.
298 --
299 -- {End Of Comments}
300 -- ----------------------------------------------------------------------------
301 Function convert_args
302   (p_person_rate_id                 in number
303   ,p_group_per_in_ler_id            in number
304   ,p_pl_id                          in number
305   ,p_oipl_id                        in number
306   ,p_group_pl_id                    in number
307   ,p_group_oipl_id                  in number
308   ,p_lf_evt_ocrd_dt                 in date
309   ,p_person_id                      in number
310   ,p_assignment_id                  in number
311   ,p_elig_flag                      in varchar2
312   ,p_ws_val                         in number
313   ,p_ws_mn_val                      in number
314   ,p_ws_mx_val                      in number
315   ,p_ws_incr_val                    in number
316   ,p_elig_sal_val                   in number
317   ,p_stat_sal_val                   in number
318   ,p_oth_comp_val                   in number
319   ,p_tot_comp_val                   in number
320   ,p_misc1_val                      in number
321   ,p_misc2_val                      in number
322   ,p_misc3_val                      in number
323   ,p_rec_val                        in number
324   ,p_rec_mn_val                     in number
325   ,p_rec_mx_val                     in number
326   ,p_rec_incr_val                   in number
327   ,p_ws_val_last_upd_date           in date
328   ,p_ws_val_last_upd_by             in number
329   ,p_pay_proposal_id                in number
330   ,p_element_entry_value_id         in number
331   ,p_inelig_rsn_cd                  in varchar2
332   ,p_elig_ovrid_dt                  in date
333   ,p_elig_ovrid_person_id           in number
334   ,p_copy_dist_bdgt_val             in number
335   ,p_copy_ws_bdgt_val               in number
336   ,p_copy_rsrv_val                  in number
337   ,p_copy_dist_bdgt_mn_val          in number
338   ,p_copy_dist_bdgt_mx_val          in number
339   ,p_copy_dist_bdgt_incr_val        in number
340   ,p_copy_ws_bdgt_mn_val            in number
341   ,p_copy_ws_bdgt_mx_val            in number
342   ,p_copy_ws_bdgt_incr_val          in number
343   ,p_copy_rsrv_mn_val               in number
344   ,p_copy_rsrv_mx_val               in number
345   ,p_copy_rsrv_incr_val             in number
346   ,p_copy_dist_bdgt_iss_val         in number
347   ,p_copy_ws_bdgt_iss_val           in number
348   ,p_copy_dist_bdgt_iss_date        in date
349   ,p_copy_ws_bdgt_iss_date          in date
350   ,p_comp_posting_date              in date
351   ,p_ws_rt_start_date               in date
352   ,p_currency                       in varchar2
353   ,p_object_version_number          in number
354   )
355   Return g_rec_type;
356 --
357 end ben_rts_shd;