DBA Data[Home] [Help]

PACKAGE: APPS.BEN_HWF_SHD

Source


1 Package ben_hwf_shd as
2 /* $Header: behwfrhi.pkh 120.0 2005/05/28 03:12:24 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (
10   hrs_wkd_in_perd_fctr_id           number(15),
11   name                              varchar2(240),
12   business_group_id                 number(15),
13   hrs_src_cd                        varchar2(30),
14   rndg_cd                           varchar2(30),
15   rndg_rl                           number(15),
16   hrs_wkd_det_cd                    varchar2(30),
17   hrs_wkd_det_rl                    number(15),
18   no_mn_hrs_wkd_flag                varchar2(30),
19   mx_hrs_num                        number,
20   no_mx_hrs_wkd_flag                varchar2(30),
21   once_r_cntug_cd                   varchar2(30),
22   mn_hrs_num                        number,
23   hrs_alt_val_to_use_cd             varchar2(30),
24   pyrl_freq_cd                      varchar2(30),
25   hrs_wkd_calc_rl                   number(15),
26   defined_balance_id                number,
27   bnfts_bal_id                      number,
28   hwf_attribute_category            varchar2(30),
29   hwf_attribute1                    varchar2(150),
30   hwf_attribute2                    varchar2(150),
31   hwf_attribute3                    varchar2(150),
32   hwf_attribute4                    varchar2(150),
33   hwf_attribute5                    varchar2(150),
34   hwf_attribute6                    varchar2(150),
35   hwf_attribute7                    varchar2(150),
36   hwf_attribute8                    varchar2(150),
37   hwf_attribute9                    varchar2(150),
38   hwf_attribute10                   varchar2(150),
39   hwf_attribute11                   varchar2(150),
40   hwf_attribute12                   varchar2(150),
41   hwf_attribute13                   varchar2(150),
42   hwf_attribute14                   varchar2(150),
43   hwf_attribute15                   varchar2(150),
44   hwf_attribute16                   varchar2(150),
45   hwf_attribute17                   varchar2(150),
46   hwf_attribute18                   varchar2(150),
47   hwf_attribute19                   varchar2(150),
48   hwf_attribute20                   varchar2(150),
49   hwf_attribute21                   varchar2(150),
50   hwf_attribute22                   varchar2(150),
51   hwf_attribute23                   varchar2(150),
52   hwf_attribute24                   varchar2(150),
53   hwf_attribute25                   varchar2(150),
54   hwf_attribute26                   varchar2(150),
55   hwf_attribute27                   varchar2(150),
56   hwf_attribute28                   varchar2(150),
57   hwf_attribute29                   varchar2(150),
58   hwf_attribute30                   varchar2(150),
59   object_version_number             number(9)
60   );
61 --
62 -- ----------------------------------------------------------------------------
63 -- |           Global Definitions - Internal Development Use Only             |
64 -- ----------------------------------------------------------------------------
65 --
66 g_old_rec  g_rec_type;                            -- Global record definition
67 g_api_dml  boolean;                               -- Global api dml status
68 --
69 -- ----------------------------------------------------------------------------
70 -- |------------------------< return_api_dml_status >-------------------------|
71 -- ----------------------------------------------------------------------------
72 -- {Start Of Comments}
73 --
74 -- Description:
75 --   This function will return the current g_api_dml private global
76 --   boolean status.
77 --   The g_api_dml status determines if at the time of the function
78 --   being executed if a dml statement (i.e. INSERT, UPDATE or DELETE)
79 --   is being issued from within an api.
80 --   If the status is TRUE then a dml statement is being issued from
81 --   within this entity api.
82 --   This function is primarily to support database triggers which
83 --   need to maintain the object_version_number for non-supported
84 --   dml statements (i.e. dml statement issued outside of the api layer).
85 --
86 -- Prerequisites:
87 --   None.
88 --
89 -- In Parameters:
90 --   None.
91 --
92 -- Post Success:
93 --   Processing continues.
94 --   If the function returns a TRUE value then, dml is being executed from
95 --   within this api.
96 --
97 -- Post Failure:
98 --   None.
99 --
100 -- Access Status:
101 --   Internal Row Handler Use Only.
102 --
103 -- {End Of Comments}
104 -- ----------------------------------------------------------------------------
105 Function return_api_dml_status Return Boolean;
106 --
107 -- ----------------------------------------------------------------------------
108 -- |---------------------------< constraint_error >---------------------------|
109 -- ----------------------------------------------------------------------------
110 -- {Start Of Comments}
111 --
112 -- Description:
113 --   This procedure is called when a constraint has been violated (i.e.
114 --   The exception hr_api.check_integrity_violated,
115 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
116 --   hr_api.unique_integrity_violated has been raised).
117 --   The exceptions can only be raised as follows:
118 --   1) A check constraint can only be violated during an INSERT or UPDATE
119 --      dml operation.
120 --   2) A parent integrity constraint can only be violated during an
121 --      INSERT or UPDATE dml operation.
122 --   3) A child integrity constraint can only be violated during an
123 --      DELETE dml operation.
124 --   4) A unique integrity constraint can only be violated during INSERT or
125 --      UPDATE dml operation.
126 --
127 -- Prerequisites:
128 --   1) Either hr_api.check_integrity_violated,
129 --      hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
130 --      hr_api.unique_integrity_violated has been raised with the subsequent
131 --      stripping of the constraint name from the generated error message
132 --      text.
133 --   2) Standalone validation test which corresponds with a constraint error.
134 --
135 -- In Parameter:
136 --   p_constraint_name is in upper format and is just the constraint name
137 --   (e.g. not prefixed by brackets, schema owner etc).
138 --
139 -- Post Success:
140 --   Development dependant.
141 --
142 -- Post Failure:
143 --   Developement dependant.
144 --
145 -- Developer Implementation Notes:
146 --   For each constraint being checked the hr system package failure message
147 --   has been generated as a template only. These system error messages should
148 --   be modified as required (i.e. change the system failure message to a user
149 --   friendly defined error message).
150 --
151 -- Access Status:
152 --   Internal Development Use Only.
153 --
154 -- {End Of Comments}
155 -- ----------------------------------------------------------------------------
156 Procedure constraint_error
157             (p_constraint_name in all_constraints.constraint_name%TYPE);
158 --
159 -- ----------------------------------------------------------------------------
160 -- |-----------------------------< api_updating >-----------------------------|
161 -- ----------------------------------------------------------------------------
162 -- {Start Of Comments}
163 --
164 -- Description:
165 --   This function is used to populate the g_old_rec record with the
166 --   current row from the database for the specified primary key
167 --   provided that the primary key exists and is valid and does not
168 --   already match the current g_old_rec. The function will always return
169 --   a TRUE value if the g_old_rec is populated with the current row.
170 --   A FALSE value will be returned if all of the primary key arguments
171 --   are null.
172 --
173 -- Prerequisites:
174 --   None.
175 --
176 -- In Parameters:
177 --
178 -- Post Success:
179 --   A value of TRUE will be returned indiciating that the g_old_rec
180 --   is current.
181 --   A value of FALSE will be returned if all of the primary key arguments
182 --   have a null value (this indicates that the row has not be inserted into
183 --   the Schema), and therefore could never have a corresponding row.
184 --
185 -- Post Failure:
186 --   A failure can only occur under two circumstances:
187 --   1) The primary key is invalid (i.e. a row does not exist for the
188 --      specified primary key values).
189 --   2) If an object_version_number exists but is NOT the same as the current
190 --      g_old_rec value.
191 --
192 -- Developer Implementation Notes:
193 --   None.
194 --
195 -- Access Status:
196 --   Internal Development Use Only.
197 --
198 -- {End Of Comments}
199 -- ----------------------------------------------------------------------------
200 Function api_updating
201   (
202   p_hrs_wkd_in_perd_fctr_id            in number,
203   p_object_version_number              in number
204   )      Return Boolean;
205 --
206 -- ----------------------------------------------------------------------------
207 -- |---------------------------------< lck >----------------------------------|
208 -- ----------------------------------------------------------------------------
209 -- {Start Of Comments}
210 --
211 -- Description:
212 --   The Lck process has two main functions to perform. Firstly, the row to be
213 --   updated or deleted must be locked. The locking of the row will only be
214 --   successful if the row is not currently locked by another user.
215 --   Secondly, during the locking of the row, the row is selected into
216 --   the g_old_rec data structure which enables the current row values from the
217 --   server to be available to the api.
218 --
219 -- Prerequisites:
220 --   When attempting to call the lock the object version number (if defined)
221 --   is mandatory.
222 --
223 -- In Parameters:
224 --   The arguments to the Lck process are the primary key(s) which uniquely
225 --   identify the row and the object version number of row.
226 --
227 -- Post Success:
228 --   On successful completion of the Lck process the row to be updated or
229 --   deleted will be locked and selected into the global data structure
230 --   g_old_rec.
231 --
232 -- Post Failure:
233 --   The Lck process can fail for three reasons:
234 --   1) When attempting to lock the row the row could already be locked by
235 --      another user. This will raise the HR_Api.Object_Locked exception.
236 --   2) The row which is required to be locked doesn't exist in the HR Schema.
237 --      This error is trapped and reported using the message name
238 --      'HR_7220_INVALID_PRIMARY_KEY'.
239 --   3) The row although existing in the HR Schema has a different object
240 --      version number than the object version number specified.
241 --      This error is trapped and reported using the message name
242 --      'HR_7155_OBJECT_INVALID'.
243 --
244 -- Developer Implementation Notes:
245 --   For each primary key and the object version number arguments add a
246 --   call to hr_api.mandatory_arg_error procedure to ensure that these
247 --   argument values are not null.
248 --
249 -- Access Status:
250 --   Internal Development Use Only.
251 --
252 -- {End Of Comments}
253 -- ----------------------------------------------------------------------------
254 Procedure lck
255   (
256   p_hrs_wkd_in_perd_fctr_id            in number,
257   p_object_version_number              in number
258   );
259 --
260 -- ----------------------------------------------------------------------------
261 -- |-----------------------------< convert_args >-----------------------------|
262 -- ----------------------------------------------------------------------------
263 -- {Start Of Comments}
264 --
265 -- Description:
266 --   This function is used to turn attribute parameters into the record
267 --   structure parameter g_rec_type.
268 --
269 -- Prerequisites:
270 --   This is a private function and can only be called from the ins or upd
271 --   attribute processes.
272 --
273 -- In Parameters:
274 --
275 -- Post Success:
276 --   A returning record structure will be returned.
277 --
278 -- Post Failure:
279 --   No direct error handling is required within this function. Any possible
280 --   errors within this function will be a PL/SQL value error due to conversion
281 --   of datatypes or data lengths.
282 --
283 -- Developer Implementation Notes:
284 --   None.
285 --
286 -- Access Status:
287 --   Internal Row Handler Use Only.
288 --
289 -- {End Of Comments}
290 -- ----------------------------------------------------------------------------
291 Function convert_args
292 	(
293 	p_hrs_wkd_in_perd_fctr_id       in number,
294 	p_name                          in varchar2,
295 	p_business_group_id             in number,
296 	p_hrs_src_cd                    in varchar2,
297 	p_rndg_cd                       in varchar2,
298 	p_rndg_rl                       in number,
299 	p_hrs_wkd_det_cd                in varchar2,
300 	p_hrs_wkd_det_rl                in number,
301 	p_no_mn_hrs_wkd_flag            in varchar2,
302 	p_mx_hrs_num                    in number,
303 	p_no_mx_hrs_wkd_flag            in varchar2,
304 	p_once_r_cntug_cd               in varchar2,
305 	p_mn_hrs_num                    in number,
306         p_hrs_alt_val_to_use_cd         in varchar2,
307         p_pyrl_freq_cd                  in varchar2,
308         p_hrs_wkd_calc_rl               in number,
309         p_defined_balance_id            in number,
310         p_bnfts_bal_id                  in number,
311 	p_hwf_attribute_category        in varchar2,
312 	p_hwf_attribute1                in varchar2,
313 	p_hwf_attribute2                in varchar2,
314 	p_hwf_attribute3                in varchar2,
315 	p_hwf_attribute4                in varchar2,
316 	p_hwf_attribute5                in varchar2,
317 	p_hwf_attribute6                in varchar2,
318 	p_hwf_attribute7                in varchar2,
319 	p_hwf_attribute8                in varchar2,
320 	p_hwf_attribute9                in varchar2,
321 	p_hwf_attribute10               in varchar2,
322 	p_hwf_attribute11               in varchar2,
323 	p_hwf_attribute12               in varchar2,
324 	p_hwf_attribute13               in varchar2,
325 	p_hwf_attribute14               in varchar2,
326 	p_hwf_attribute15               in varchar2,
327 	p_hwf_attribute16               in varchar2,
328 	p_hwf_attribute17               in varchar2,
329 	p_hwf_attribute18               in varchar2,
330 	p_hwf_attribute19               in varchar2,
331 	p_hwf_attribute20               in varchar2,
332 	p_hwf_attribute21               in varchar2,
333 	p_hwf_attribute22               in varchar2,
334 	p_hwf_attribute23               in varchar2,
335 	p_hwf_attribute24               in varchar2,
336 	p_hwf_attribute25               in varchar2,
337 	p_hwf_attribute26               in varchar2,
338 	p_hwf_attribute27               in varchar2,
339 	p_hwf_attribute28               in varchar2,
340 	p_hwf_attribute29               in varchar2,
341 	p_hwf_attribute30               in varchar2,
342 	p_object_version_number         in number
343 	)
344 	Return g_rec_type;
345 --
346 end ben_hwf_shd;