1 Package ben_xel_shd AUTHID CURRENT_USER as
2 /* $Header: bexelrhi.pkh 120.1 2005/06/08 13:15:50 tjesumic noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Global Record Type Specification |
6 -- ----------------------------------------------------------------------------
7 --
8
9 Type g_rec_type Is Record
10 (
11 ext_data_elmt_id number(15),
12 name varchar2(600),
13 xml_tag_name varchar2(80),
14 data_elmt_typ_cd varchar2(30),
15 data_elmt_rl number(15),
16 frmt_mask_cd varchar2(30),
17 string_val varchar2(600),
18 dflt_val varchar2(600),
19 max_length_num number(15),
20 just_cd varchar2(30),
21 ttl_fnctn_cd varchar2(30),
22 ttl_cond_oper_cd varchar2(30),
23 ttl_cond_val varchar2(600),
24 ttl_sum_ext_data_elmt_id number(15),
25 ttl_cond_ext_data_elmt_id number(15),
26 ext_fld_id number(15),
27 business_group_id number(15),
28 legislation_code varchar2(30),
29 xel_attribute_category varchar2(30),
30 xel_attribute1 varchar2(150),
31 xel_attribute2 varchar2(150),
32 xel_attribute3 varchar2(150),
33 xel_attribute4 varchar2(150),
34 xel_attribute5 varchar2(150),
35 xel_attribute6 varchar2(150),
36 xel_attribute7 varchar2(150),
37 xel_attribute8 varchar2(150),
38 xel_attribute9 varchar2(150),
39 xel_attribute10 varchar2(150),
40 xel_attribute11 varchar2(150),
41 xel_attribute12 varchar2(150),
42 xel_attribute13 varchar2(150),
43 xel_attribute14 varchar2(150),
44 xel_attribute15 varchar2(150),
45 xel_attribute16 varchar2(150),
46 xel_attribute17 varchar2(150),
47 xel_attribute18 varchar2(150),
48 xel_attribute19 varchar2(150),
49 xel_attribute20 varchar2(150),
50 xel_attribute21 varchar2(150),
51 xel_attribute22 varchar2(150),
52 xel_attribute23 varchar2(150),
53 xel_attribute24 varchar2(150),
54 xel_attribute25 varchar2(150),
55 xel_attribute26 varchar2(150),
56 xel_attribute27 varchar2(150),
57 xel_attribute28 varchar2(150),
58 xel_attribute29 varchar2(150),
59 xel_attribute30 varchar2(150),
60 defined_balance_id number(15),
61 last_update_date date,
62 creation_date date,
63 last_updated_by number(15),
64 last_update_login number(15),
65 created_by number(15),
66 object_version_number number(9)
67 );
68 --
69
70
71 --
72 -- ----------------------------------------------------------------------------
73 -- | Global Definitions - Internal Development Use Only |
74 -- ----------------------------------------------------------------------------
75 --
76 g_old_rec g_rec_type; -- Global record definition
77 g_api_dml boolean; -- Global api dml status
78 --
79 -- ----------------------------------------------------------------------------
80 -- |------------------------< return_api_dml_status >-------------------------|
81 -- ----------------------------------------------------------------------------
82 -- {Start Of Comments}
83 --
84 -- Description:
85 -- This function will return the current g_api_dml private global
86 -- boolean status.
87 -- The g_api_dml status determines if at the time of the function
88 -- being executed if a dml statement (i.e. INSERT, UPDATE or DELETE)
89 -- is being issued from within an api.
90 -- If the status is TRUE then a dml statement is being issued from
91 -- within this entity api.
92 -- This function is primarily to support database triggers which
93 -- need to maintain the object_version_number for non-supported
94 -- dml statements (i.e. dml statement issued outside of the api layer).
95 --
96 -- Prerequisites:
97 -- None.
98 --
99 -- In Parameters:
100 -- None.
101 --
102 -- Post Success:
103 -- Processing continues.
104 -- If the function returns a TRUE value then, dml is being executed from
105 -- within this api.
106 --
107 -- Post Failure:
108 -- None.
109 --
110 -- Access Status:
111 -- Internal Row Handler Use Only.
112 --
113 -- {End Of Comments}
114 -- ----------------------------------------------------------------------------
115 Function return_api_dml_status Return Boolean;
116 --
117 -- ----------------------------------------------------------------------------
118 -- |---------------------------< constraint_error >---------------------------|
119 -- ----------------------------------------------------------------------------
120 -- {Start Of Comments}
121 --
122 -- Description:
123 -- This procedure is called when a constraint has been violated (i.e.
124 -- The exception hr_api.check_integrity_violated,
125 -- hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
126 -- hr_api.unique_integrity_violated has been raised).
127 -- The exceptions can only be raised as follows:
128 -- 1) A check constraint can only be violated during an INSERT or UPDATE
129 -- dml operation.
130 -- 2) A parent integrity constraint can only be violated during an
131 -- INSERT or UPDATE dml operation.
132 -- 3) A child integrity constraint can only be violated during an
133 -- DELETE dml operation.
134 -- 4) A unique integrity constraint can only be violated during INSERT or
135 -- UPDATE dml operation.
136 --
137 -- Prerequisites:
138 -- 1) Either hr_api.check_integrity_violated,
139 -- hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
140 -- hr_api.unique_integrity_violated has been raised with the subsequent
141 -- stripping of the constraint name from the generated error message
142 -- text.
143 -- 2) Standalone validation test which corresponds with a constraint error.
144 --
145 -- In Parameter:
146 -- p_constraint_name is in upper format and is just the constraint name
147 -- (e.g. not prefixed by brackets, schema owner etc).
148 --
149 -- Post Success:
150 -- Development dependant.
151 --
152 -- Post Failure:
153 -- Developement dependant.
154 --
155 -- Developer Implementation Notes:
156 -- For each constraint being checked the hr system package failure message
157 -- has been generated as a template only. These system error messages should
158 -- be modified as required (i.e. change the system failure message to a user
159 -- friendly defined error message).
160 --
161 -- Access Status:
162 -- Internal Development Use Only.
163 --
164 -- {End Of Comments}
165 -- ----------------------------------------------------------------------------
166 Procedure constraint_error
167 (p_constraint_name in all_constraints.constraint_name%TYPE);
168 --
169 -- ----------------------------------------------------------------------------
170 -- |-----------------------------< api_updating >-----------------------------|
171 -- ----------------------------------------------------------------------------
172 -- {Start Of Comments}
173 --
174 -- Description:
175 -- This function is used to populate the g_old_rec record with the
176 -- current row from the database for the specified primary key
177 -- provided that the primary key exists and is valid and does not
178 -- already match the current g_old_rec. The function will always return
179 -- a TRUE value if the g_old_rec is populated with the current row.
180 -- A FALSE value will be returned if all of the primary key arguments
181 -- are null.
182 --
183 -- Prerequisites:
184 -- None.
185 --
186 -- In Parameters:
187 --
188 -- Post Success:
189 -- A value of TRUE will be returned indiciating that the g_old_rec
190 -- is current.
191 -- A value of FALSE will be returned if all of the primary key arguments
192 -- have a null value (this indicates that the row has not be inserted into
193 -- the Schema), and therefore could never have a corresponding row.
194 --
195 -- Post Failure:
196 -- A failure can only occur under two circumstances:
197 -- 1) The primary key is invalid (i.e. a row does not exist for the
198 -- specified primary key values).
199 -- 2) If an object_version_number exists but is NOT the same as the current
200 -- g_old_rec value.
201 --
202 -- Developer Implementation Notes:
203 -- None.
204 --
205 -- Access Status:
206 -- Internal Development Use Only.
207 --
208 -- {End Of Comments}
209 -- ----------------------------------------------------------------------------
210 Function api_updating
211 (
212 p_ext_data_elmt_id in number,
213 p_object_version_number in number
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 the
227 -- 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 -- For each primary key and the object version number arguments add a
256 -- call to hr_api.mandatory_arg_error procedure to ensure that these
257 -- argument values are not null.
258 --
259 -- Access Status:
260 -- Internal Development Use Only.
261 --
262 -- {End Of Comments}
263 -- ----------------------------------------------------------------------------
264 Procedure lck
265 (
266 p_ext_data_elmt_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 conversion
291 -- 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 (
303 p_ext_data_elmt_id in number,
304 p_name in varchar2,
305 p_xml_tag_name in varchar2,
306 p_data_elmt_typ_cd in varchar2,
307 p_data_elmt_rl in number,
308 p_frmt_mask_cd in varchar2,
309 p_string_val in varchar2,
310 p_dflt_val in varchar2,
311 p_max_length_num in number,
312 p_just_cd in varchar2,
313 p_ttl_fnctn_cd in varchar2,
314 p_ttl_cond_oper_cd in varchar2,
315 p_ttl_cond_val in varchar2,
316 p_ttl_sum_ext_data_elmt_id in number,
317 p_ttl_cond_ext_data_elmt_id in number,
318 p_ext_fld_id in number,
319 p_business_group_id in number,
320 p_legislation_code in varchar2,
321 p_xel_attribute_category in varchar2,
322 p_xel_attribute1 in varchar2,
323 p_xel_attribute2 in varchar2,
324 p_xel_attribute3 in varchar2,
325 p_xel_attribute4 in varchar2,
326 p_xel_attribute5 in varchar2,
327 p_xel_attribute6 in varchar2,
328 p_xel_attribute7 in varchar2,
329 p_xel_attribute8 in varchar2,
330 p_xel_attribute9 in varchar2,
331 p_xel_attribute10 in varchar2,
332 p_xel_attribute11 in varchar2,
333 p_xel_attribute12 in varchar2,
334 p_xel_attribute13 in varchar2,
335 p_xel_attribute14 in varchar2,
336 p_xel_attribute15 in varchar2,
337 p_xel_attribute16 in varchar2,
338 p_xel_attribute17 in varchar2,
339 p_xel_attribute18 in varchar2,
340 p_xel_attribute19 in varchar2,
341 p_xel_attribute20 in varchar2,
342 p_xel_attribute21 in varchar2,
343 p_xel_attribute22 in varchar2,
344 p_xel_attribute23 in varchar2,
345 p_xel_attribute24 in varchar2,
346 p_xel_attribute25 in varchar2,
347 p_xel_attribute26 in varchar2,
348 p_xel_attribute27 in varchar2,
349 p_xel_attribute28 in varchar2,
350 p_xel_attribute29 in varchar2,
351 p_xel_attribute30 in varchar2,
352 p_defined_balance_id in number,
353 p_last_update_date in date,
354 p_creation_date in date,
355 p_last_updated_by in number,
356 p_last_update_login in number,
357 p_created_by in number,
358 p_object_version_number in number
359 )
360 Return g_rec_type;
361 --
362 end ben_xel_shd;