DBA Data[Home] [Help]

PACKAGE: APPS.BEN_CLF_SHD

Source


1 Package ben_clf_shd AUTHID CURRENT_USER as
2 /* $Header: beclfrhi.pkh 120.0 2005/05/28 01:04:18 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (
10   comp_lvl_fctr_id                  number(15),
11   business_group_id                 number(15),
12   name                              varchar2(240), --UTF8 Change Bug 2254683
13   comp_lvl_det_cd                   varchar2(30),
14   comp_lvl_det_rl                   number(15),
15   comp_lvl_uom                      varchar2(30),
16   comp_src_cd                       varchar2(30),
17   defined_balance_id                number(15),
18   no_mn_comp_flag                   varchar2(30),
19   no_mx_comp_flag                   varchar2(30),
20   mx_comp_val                       number,
21   mn_comp_val                       number,
22   rndg_cd                           varchar2(30),
23   rndg_rl                           number(15),
24   bnfts_bal_id                      number(15),
25   comp_alt_val_to_use_cd            varchar2(30),
26   comp_calc_rl                      number(15),
27   proration_flag                    Varchar2(30),
28   start_day_mo                      Varchar2(4),
29   end_day_mo                        Varchar2(4),
30   start_year                        Varchar2(4),
31   end_year                          Varchar2(4),
32   clf_attribute_category            varchar2(30),
33   clf_attribute1                    varchar2(150),
34   clf_attribute2                    varchar2(150),
35   clf_attribute3                    varchar2(150),
36   clf_attribute4                    varchar2(150),
37   clf_attribute5                    varchar2(150),
38   clf_attribute6                    varchar2(150),
39   clf_attribute7                    varchar2(150),
40   clf_attribute8                    varchar2(150),
41   clf_attribute9                    varchar2(150),
42   clf_attribute10                   varchar2(150),
43   clf_attribute11                   varchar2(150),
44   clf_attribute12                   varchar2(150),
45   clf_attribute13                   varchar2(150),
46   clf_attribute14                   varchar2(150),
47   clf_attribute15                   varchar2(150),
48   clf_attribute16                   varchar2(150),
49   clf_attribute17                   varchar2(150),
50   clf_attribute18                   varchar2(150),
51   clf_attribute19                   varchar2(150),
52   clf_attribute20                   varchar2(150),
53   clf_attribute21                   varchar2(150),
54   clf_attribute22                   varchar2(150),
55   clf_attribute23                   varchar2(150),
56   clf_attribute24                   varchar2(150),
57   clf_attribute25                   varchar2(150),
58   clf_attribute26                   varchar2(150),
59   clf_attribute27                   varchar2(150),
60   clf_attribute28                   varchar2(150),
61   clf_attribute29                   varchar2(150),
62   clf_attribute30                   varchar2(150),
63   object_version_number             number(9),
64   sttd_sal_prdcty_cd                varchar2(30)
65   );
66 --
67 -- ----------------------------------------------------------------------------
68 -- |           Global Definitions - Internal Development Use Only             |
69 -- ----------------------------------------------------------------------------
70 --
71 g_old_rec  g_rec_type;                            -- Global record definition
72 g_api_dml  boolean;                               -- Global api dml status
73 --
74 -- ----------------------------------------------------------------------------
75 -- |------------------------< return_api_dml_status >-------------------------|
76 -- ----------------------------------------------------------------------------
77 -- {Start Of Comments}
78 --
79 -- Description:
80 --   This function will return the current g_api_dml private global
81 --   boolean status.
82 --   The g_api_dml status determines if at the time of the function
83 --   being executed if a dml statement (i.e. INSERT, UPDATE or DELETE)
84 --   is being issued from within an api.
85 --   If the status is TRUE then a dml statement is being issued from
86 --   within this entity api.
87 --   This function is primarily to support database triggers which
88 --   need to maintain the object_version_number for non-supported
89 --   dml statements (i.e. dml statement issued outside of the api layer).
90 --
91 -- Prerequisites:
92 --   None.
93 --
94 -- In Parameters:
95 --   None.
96 --
97 -- Post Success:
98 --   Processing continues.
99 --   If the function returns a TRUE value then, dml is being executed from
100 --   within this api.
101 --
102 -- Post Failure:
103 --   None.
104 --
105 -- Access Status:
106 --   Internal Row Handler Use Only.
107 --
108 -- {End Of Comments}
109 -- ----------------------------------------------------------------------------
110 Function return_api_dml_status Return Boolean;
111 --
112 -- ----------------------------------------------------------------------------
113 -- |---------------------------< constraint_error >---------------------------|
114 -- ----------------------------------------------------------------------------
115 -- {Start Of Comments}
116 --
117 -- Description:
118 --   This procedure is called when a constraint has been violated (i.e.
119 --   The exception hr_api.check_integrity_violated,
120 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
121 --   hr_api.unique_integrity_violated has been raised).
122 --   The exceptions can only be raised as follows:
123 --   1) A check constraint can only be violated during an INSERT or UPDATE
124 --      dml operation.
125 --   2) A parent integrity constraint can only be violated during an
126 --      INSERT or UPDATE dml operation.
127 --   3) A child integrity constraint can only be violated during an
128 --      DELETE dml operation.
129 --   4) A unique integrity constraint can only be violated during INSERT or
130 --      UPDATE dml operation.
131 --
132 -- Prerequisites:
133 --   1) Either hr_api.check_integrity_violated,
134 --      hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
135 --      hr_api.unique_integrity_violated has been raised with the subsequent
136 --      stripping of the constraint name from the generated error message
137 --      text.
138 --   2) Standalone validation test which corresponds with a constraint error.
139 --
140 -- In Parameter:
141 --   p_constraint_name is in upper format and is just the constraint name
142 --   (e.g. not prefixed by brackets, schema owner etc).
143 --
144 -- Post Success:
145 --   Development dependant.
146 --
147 -- Post Failure:
148 --   Developement dependant.
149 --
150 -- Developer Implementation Notes:
151 --   For each constraint being checked the hr system package failure message
152 --   has been generated as a template only. These system error messages should
153 --   be modified as required (i.e. change the system failure message to a user
154 --   friendly defined error message).
155 --
156 -- Access Status:
157 --   Internal Development Use Only.
158 --
159 -- {End Of Comments}
160 -- ----------------------------------------------------------------------------
161 Procedure constraint_error
162             (p_constraint_name in all_constraints.constraint_name%TYPE);
163 --
164 -- ----------------------------------------------------------------------------
165 -- |-----------------------------< api_updating >-----------------------------|
166 -- ----------------------------------------------------------------------------
167 -- {Start Of Comments}
168 --
169 -- Description:
170 --   This function is used to populate the g_old_rec record with the
171 --   current row from the database for the specified primary key
172 --   provided that the primary key exists and is valid and does not
173 --   already match the current g_old_rec. The function will always return
174 --   a TRUE value if the g_old_rec is populated with the current row.
175 --   A FALSE value will be returned if all of the primary key arguments
176 --   are null.
177 --
178 -- Prerequisites:
179 --   None.
180 --
181 -- In Parameters:
182 --
183 -- Post Success:
184 --   A value of TRUE will be returned indiciating that the g_old_rec
185 --   is current.
186 --   A value of FALSE will be returned if all of the primary key arguments
187 --   have a null value (this indicates that the row has not be inserted into
188 --   the Schema), and therefore could never have a corresponding row.
189 --
190 -- Post Failure:
191 --   A failure can only occur under two circumstances:
192 --   1) The primary key is invalid (i.e. a row does not exist for the
193 --      specified primary key values).
194 --   2) If an object_version_number exists but is NOT the same as the current
195 --      g_old_rec value.
196 --
197 -- Developer Implementation Notes:
198 --   None.
199 --
200 -- Access Status:
201 --   Internal Development Use Only.
202 --
203 -- {End Of Comments}
204 -- ----------------------------------------------------------------------------
205 Function api_updating
206   (
207   p_comp_lvl_fctr_id                   in number,
208   p_object_version_number              in number
209   )      Return Boolean;
210 --
211 -- ----------------------------------------------------------------------------
212 -- |---------------------------------< lck >----------------------------------|
213 -- ----------------------------------------------------------------------------
214 -- {Start Of Comments}
215 --
216 -- Description:
217 --   The Lck process has two main functions to perform. Firstly, the row to be
218 --   updated or deleted must be locked. The locking of the row will only be
219 --   successful if the row is not currently locked by another user.
220 --   Secondly, during the locking of the row, the row is selected into
221 --   the g_old_rec data structure which enables the current row values from the
222 --   server to be available to the api.
223 --
224 -- Prerequisites:
225 --   When attempting to call the lock the object version number (if defined)
226 --   is mandatory.
227 --
228 -- In Parameters:
229 --   The arguments to the Lck process are the primary key(s) which uniquely
230 --   identify the row and the object version number of row.
231 --
232 -- Post Success:
233 --   On successful completion of the Lck process the row to be updated or
234 --   deleted will be locked and selected into the global data structure
235 --   g_old_rec.
236 --
237 -- Post Failure:
238 --   The Lck process can fail for three reasons:
239 --   1) When attempting to lock the row the row could already be locked by
240 --      another user. This will raise the HR_Api.Object_Locked exception.
241 --   2) The row which is required to be locked doesn't exist in the HR Schema.
242 --      This error is trapped and reported using the message name
243 --      'HR_7220_INVALID_PRIMARY_KEY'.
244 --   3) The row although existing in the HR Schema has a different object
245 --      version number than the object version number specified.
246 --      This error is trapped and reported using the message name
247 --      'HR_7155_OBJECT_INVALID'.
248 --
249 -- Developer Implementation Notes:
250 --   For each primary key and the object version number arguments add a
251 --   call to hr_api.mandatory_arg_error procedure to ensure that these
252 --   argument values are not null.
253 --
254 -- Access Status:
255 --   Internal Development Use Only.
256 --
257 -- {End Of Comments}
258 -- ----------------------------------------------------------------------------
259 Procedure lck
260   (
261   p_comp_lvl_fctr_id                   in number,
262   p_object_version_number              in number
263   );
264 --
265 -- ----------------------------------------------------------------------------
266 -- |-----------------------------< convert_args >-----------------------------|
267 -- ----------------------------------------------------------------------------
268 -- {Start Of Comments}
269 --
270 -- Description:
271 --   This function is used to turn attribute parameters into the record
272 --   structure parameter g_rec_type.
273 --
274 -- Prerequisites:
275 --   This is a private function and can only be called from the ins or upd
276 --   attribute processes.
277 --
278 -- In Parameters:
279 --
280 -- Post Success:
281 --   A returning record structure will be returned.
282 --
283 -- Post Failure:
284 --   No direct error handling is required within this function. Any possible
285 --   errors within this function will be a PL/SQL value error due to conversion
286 --   of datatypes or data lengths.
287 --
288 -- Developer Implementation Notes:
289 --   None.
290 --
291 -- Access Status:
292 --   Internal Row Handler Use Only.
293 --
294 -- {End Of Comments}
295 -- ----------------------------------------------------------------------------
296 Function convert_args
297 	(
298 	p_comp_lvl_fctr_id              in number,
299 	p_business_group_id             in number,
300 	p_name                          in varchar2,
301     p_comp_lvl_det_cd               in varchar2,
302     p_comp_lvl_det_rl               in number,
303 	p_comp_lvl_uom                  in varchar2,
304 	p_comp_src_cd                   in varchar2,
305 	p_defined_balance_id            in number,
306 	p_no_mn_comp_flag               in varchar2,
307 	p_no_mx_comp_flag               in varchar2,
308 	p_mx_comp_val                   in number,
309 	p_mn_comp_val                   in number,
310 	p_rndg_cd                       in varchar2,
311 	p_rndg_rl                       in number,
312         p_bnfts_bal_id                  in number,
313         p_comp_alt_val_to_use_cd        in varchar2,
314         p_comp_calc_rl                  in number,
315   p_proration_flag                    Varchar2,
316   p_start_day_mo                      Varchar2,
317   p_end_day_mo                        Varchar2,
318   p_start_year                        Varchar2,
319   p_end_year                          Varchar2,
320 	p_clf_attribute_category        in varchar2,
321 	p_clf_attribute1                in varchar2,
322 	p_clf_attribute2                in varchar2,
323 	p_clf_attribute3                in varchar2,
324 	p_clf_attribute4                in varchar2,
325 	p_clf_attribute5                in varchar2,
326 	p_clf_attribute6                in varchar2,
327 	p_clf_attribute7                in varchar2,
328 	p_clf_attribute8                in varchar2,
329 	p_clf_attribute9                in varchar2,
330 	p_clf_attribute10               in varchar2,
331 	p_clf_attribute11               in varchar2,
332 	p_clf_attribute12               in varchar2,
333 	p_clf_attribute13               in varchar2,
334 	p_clf_attribute14               in varchar2,
335 	p_clf_attribute15               in varchar2,
336 	p_clf_attribute16               in varchar2,
337 	p_clf_attribute17               in varchar2,
338 	p_clf_attribute18               in varchar2,
339 	p_clf_attribute19               in varchar2,
340 	p_clf_attribute20               in varchar2,
341 	p_clf_attribute21               in varchar2,
342 	p_clf_attribute22               in varchar2,
343 	p_clf_attribute23               in varchar2,
344 	p_clf_attribute24               in varchar2,
345 	p_clf_attribute25               in varchar2,
346 	p_clf_attribute26               in varchar2,
347 	p_clf_attribute27               in varchar2,
348 	p_clf_attribute28               in varchar2,
349 	p_clf_attribute29               in varchar2,
350 	p_clf_attribute30               in varchar2,
351 	p_object_version_number         in number,
352     p_sttd_sal_prdcty_cd            in varchar2
353 	)
354 	Return g_rec_type;
355 --
356 end ben_clf_shd;