1 Package pay_set_shd as
2 /* $Header: pysetrhi.pkh 120.0 2005/05/29 08:39:36 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Global Record Type Specification |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9 (
10 element_type_id number(9),
11 template_id number(9),
12 classification_name varchar2(80),
13 additional_entry_allowed_flag varchar2(30),
14 adjustment_only_flag varchar2(30),
15 closed_for_entry_flag varchar2(30),
16 element_name varchar2(80),
17 indirect_only_flag varchar2(30),
18 multiple_entries_allowed_flag varchar2(30),
19 multiply_value_flag varchar2(30),
20 post_termination_rule varchar2(30),
21 process_in_run_flag varchar2(30),
22 relative_processing_priority number(9),
23 processing_type varchar2(30),
24 standard_link_flag varchar2(30),
25 input_currency_code varchar2(15),
26 output_currency_code varchar2(15),
27 benefit_classification_name varchar2(80),
28 description varchar2(240),
29 qualifying_age number(9), -- Increased length
30 qualifying_length_of_service number(11,2), -- Increased length
31 qualifying_units varchar2(30),
32 reporting_name varchar2(80),
33 attribute_category varchar2(30),
34 attribute1 varchar2(150),
35 attribute2 varchar2(150),
36 attribute3 varchar2(150),
37 attribute4 varchar2(150),
38 attribute5 varchar2(150),
39 attribute6 varchar2(150),
40 attribute7 varchar2(150),
41 attribute8 varchar2(150),
42 attribute9 varchar2(150),
43 attribute10 varchar2(150),
44 attribute11 varchar2(150),
45 attribute12 varchar2(150),
46 attribute13 varchar2(150),
47 attribute14 varchar2(150),
48 attribute15 varchar2(150),
49 attribute16 varchar2(150),
50 attribute17 varchar2(150),
51 attribute18 varchar2(150),
52 attribute19 varchar2(150),
53 attribute20 varchar2(150),
54 element_information_category varchar2(30),
55 element_information1 varchar2(150),
56 element_information2 varchar2(150),
57 element_information3 varchar2(150),
58 element_information4 varchar2(150),
59 element_information5 varchar2(150),
60 element_information6 varchar2(150),
61 element_information7 varchar2(150),
62 element_information8 varchar2(150),
63 element_information9 varchar2(150),
64 element_information10 varchar2(150),
65 element_information11 varchar2(150),
66 element_information12 varchar2(150),
67 element_information13 varchar2(150),
68 element_information14 varchar2(150),
69 element_information15 varchar2(150),
70 element_information16 varchar2(150),
71 element_information17 varchar2(150),
72 element_information18 varchar2(150),
73 element_information19 varchar2(150),
74 element_information20 varchar2(150),
75 third_party_pay_only_flag varchar2(30),
76 skip_formula varchar2(80),
77 payroll_formula_id number(9),
78 exclusion_rule_id number(9),
79 iterative_flag varchar2(30),
80 iterative_priority number(9),
81 iterative_formula_name varchar2(80),
82 process_mode varchar2(30),
83 grossup_flag varchar2(30),
84 advance_indicator varchar2(30),
85 advance_payable varchar2(30),
86 advance_deduction varchar2(30),
87 process_advance_entry varchar2(30),
88 proration_group varchar2(80),
89 proration_formula varchar2(80),
90 recalc_event_group varchar2(80),
91 once_each_period_flag varchar2(30),
92 object_version_number number(9)
93 );
94 --
95 -- ----------------------------------------------------------------------------
96 -- | Global Definitions - Internal Development Use Only |
97 -- ----------------------------------------------------------------------------
98 --
99 g_old_rec g_rec_type; -- Global record definition
100 --
101 -- ----------------------------------------------------------------------------
102 -- |---------------------------< constraint_error >---------------------------|
103 -- ----------------------------------------------------------------------------
104 -- {Start Of Comments}
105 --
106 -- Description:
107 -- This procedure is called when a constraint has been violated (i.e.
108 -- The exception hr_api.check_integrity_violated,
109 -- hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
110 -- hr_api.unique_integrity_violated has been raised).
111 -- The exceptions can only be raised as follows:
112 -- 1) A check constraint can only be violated during an INSERT or UPDATE
113 -- dml operation.
114 -- 2) A parent integrity constraint can only be violated during an
115 -- INSERT or UPDATE dml operation.
116 -- 3) A child integrity constraint can only be violated during an
117 -- DELETE dml operation.
118 -- 4) A unique integrity constraint can only be violated during INSERT or
119 -- UPDATE dml operation.
120 --
121 -- Prerequisites:
122 -- 1) Either hr_api.check_integrity_violated,
123 -- hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
124 -- hr_api.unique_integrity_violated has been raised with the subsequent
125 -- stripping of the constraint name from the generated error message
126 -- text.
127 -- 2) Standalone validation test which corresponds with a constraint error.
128 --
129 -- In Parameter:
130 -- p_constraint_name is in upper format and is just the constraint name
131 -- (e.g. not prefixed by brackets, schema owner etc).
132 --
133 -- Post Success:
134 -- Development dependant.
135 --
136 -- Post Failure:
137 -- Developement dependant.
138 --
139 -- Developer Implementation Notes:
140 -- For each constraint being checked the hr system package failure message
141 -- has been generated as a template only. These system error messages should
142 -- be modified as required (i.e. change the system failure message to a user
143 -- friendly defined error message).
144 --
145 -- Access Status:
146 -- Internal Development Use Only.
147 --
148 -- {End Of Comments}
149 -- ----------------------------------------------------------------------------
150 Procedure constraint_error
151 (p_constraint_name in all_constraints.constraint_name%TYPE);
152 --
153 -- ----------------------------------------------------------------------------
154 -- |-----------------------------< api_updating >-----------------------------|
155 -- ----------------------------------------------------------------------------
156 -- {Start Of Comments}
157 --
158 -- Description:
159 -- This function is used to populate the g_old_rec record with the
160 -- current row from the database for the specified primary key
161 -- provided that the primary key exists and is valid and does not
162 -- already match the current g_old_rec. The function will always return
163 -- a TRUE value if the g_old_rec is populated with the current row.
164 -- A FALSE value will be returned if all of the primary key arguments
165 -- are null.
166 --
167 -- Prerequisites:
168 -- None.
169 --
170 -- In Parameters:
171 --
172 -- Post Success:
173 -- A value of TRUE will be returned indiciating that the g_old_rec
174 -- is current.
175 -- A value of FALSE will be returned if all of the primary key arguments
176 -- have a null value (this indicates that the row has not be inserted into
177 -- the Schema), and therefore could never have a corresponding row.
178 --
179 -- Post Failure:
180 -- A failure can only occur under two circumstances:
181 -- 1) The primary key is invalid (i.e. a row does not exist for the
182 -- specified primary key values).
183 -- 2) If an object_version_number exists but is NOT the same as the current
184 -- g_old_rec value.
185 --
186 -- Developer Implementation Notes:
187 -- None.
188 --
189 -- Access Status:
190 -- Internal Development Use Only.
191 --
192 -- {End Of Comments}
193 -- ----------------------------------------------------------------------------
194 Function api_updating
195 (
196 p_element_type_id in number,
197 p_object_version_number in number
198 ) Return Boolean;
199 --
200 -- ----------------------------------------------------------------------------
201 -- |---------------------------------< lck >----------------------------------|
202 -- ----------------------------------------------------------------------------
203 -- {Start Of Comments}
204 --
205 -- Description:
206 -- The Lck process has two main functions to perform. Firstly, the row to be
207 -- updated or deleted must be locked. The locking of the row will only be
208 -- successful if the row is not currently locked by another user.
209 -- Secondly, during the locking of the row, the row is selected into
210 -- the g_old_rec data structure which enables the current row values from the
211 -- server to be available to the api.
212 --
213 -- Prerequisites:
214 -- When attempting to call the lock the object version number (if defined)
215 -- is mandatory.
216 --
217 -- In Parameters:
218 -- The arguments to the Lck process are the primary key(s) which uniquely
219 -- identify the row and the object version number of row.
220 --
221 -- Post Success:
222 -- On successful completion of the Lck process the row to be updated or
223 -- deleted will be locked and selected into the global data structure
224 -- g_old_rec.
225 --
226 -- Post Failure:
227 -- The Lck process can fail for three reasons:
228 -- 1) When attempting to lock the row the row could already be locked by
229 -- another user. This will raise the HR_Api.Object_Locked exception.
230 -- 2) The row which is required to be locked doesn't exist in the HR Schema.
231 -- This error is trapped and reported using the message name
232 -- 'HR_7220_INVALID_PRIMARY_KEY'.
233 -- 3) The row although existing in the HR Schema has a different object
234 -- version number than the object version number specified.
235 -- This error is trapped and reported using the message name
236 -- 'HR_7155_OBJECT_INVALID'.
237 --
238 -- Developer Implementation Notes:
239 -- For each primary key and the object version number arguments add a
240 -- call to hr_api.mandatory_arg_error procedure to ensure that these
241 -- argument values are not null.
242 --
243 -- Access Status:
244 -- Internal Development Use Only.
245 --
246 -- {End Of Comments}
247 -- ----------------------------------------------------------------------------
248 Procedure lck
249 (
250 p_element_type_id in number,
251 p_object_version_number in number
252 );
253 --
254 -- ----------------------------------------------------------------------------
255 -- |-----------------------------< convert_args >-----------------------------|
256 -- ----------------------------------------------------------------------------
257 -- {Start Of Comments}
258 --
259 -- Description:
260 -- This function is used to turn attribute parameters into the record
261 -- structure parameter g_rec_type.
262 --
263 -- Prerequisites:
264 -- This is a private function and can only be called from the ins or upd
265 -- attribute processes.
266 --
267 -- In Parameters:
268 --
269 -- Post Success:
270 -- A returning record structure will be returned.
271 --
272 -- Post Failure:
273 -- No direct error handling is required within this function. Any possible
274 -- errors within this function will be a PL/SQL value error due to conversion
275 -- of datatypes or data lengths.
276 --
277 -- Developer Implementation Notes:
278 -- None.
279 --
280 -- Access Status:
281 -- Internal Row Handler Use Only.
282 --
283 -- {End Of Comments}
284 -- ----------------------------------------------------------------------------
285 Function convert_args
286 (
287 p_element_type_id in number,
288 p_template_id in number,
289 p_classification_name in varchar2,
290 p_additional_entry_allowed_fla in varchar2,
291 p_adjustment_only_flag in varchar2,
292 p_closed_for_entry_flag in varchar2,
293 p_element_name in varchar2,
294 p_indirect_only_flag in varchar2,
295 p_multiple_entries_allowed_fla in varchar2,
296 p_multiply_value_flag in varchar2,
297 p_post_termination_rule in varchar2,
298 p_process_in_run_flag in varchar2,
299 p_relative_processing_priority in number,
300 p_processing_type in varchar2,
301 p_standard_link_flag in varchar2,
302 p_input_currency_code in varchar2,
303 p_output_currency_code in varchar2,
304 p_benefit_classification_name in varchar2,
305 p_description in varchar2,
306 p_qualifying_age in number,
307 p_qualifying_length_of_service in number,
308 p_qualifying_units in varchar2,
309 p_reporting_name in varchar2,
310 p_attribute_category in varchar2,
311 p_attribute1 in varchar2,
312 p_attribute2 in varchar2,
313 p_attribute3 in varchar2,
314 p_attribute4 in varchar2,
315 p_attribute5 in varchar2,
316 p_attribute6 in varchar2,
317 p_attribute7 in varchar2,
318 p_attribute8 in varchar2,
319 p_attribute9 in varchar2,
320 p_attribute10 in varchar2,
321 p_attribute11 in varchar2,
322 p_attribute12 in varchar2,
323 p_attribute13 in varchar2,
324 p_attribute14 in varchar2,
325 p_attribute15 in varchar2,
326 p_attribute16 in varchar2,
327 p_attribute17 in varchar2,
328 p_attribute18 in varchar2,
329 p_attribute19 in varchar2,
330 p_attribute20 in varchar2,
331 p_element_information_category in varchar2,
332 p_element_information1 in varchar2,
333 p_element_information2 in varchar2,
334 p_element_information3 in varchar2,
335 p_element_information4 in varchar2,
336 p_element_information5 in varchar2,
337 p_element_information6 in varchar2,
338 p_element_information7 in varchar2,
339 p_element_information8 in varchar2,
340 p_element_information9 in varchar2,
341 p_element_information10 in varchar2,
342 p_element_information11 in varchar2,
343 p_element_information12 in varchar2,
344 p_element_information13 in varchar2,
345 p_element_information14 in varchar2,
346 p_element_information15 in varchar2,
347 p_element_information16 in varchar2,
348 p_element_information17 in varchar2,
349 p_element_information18 in varchar2,
350 p_element_information19 in varchar2,
351 p_element_information20 in varchar2,
352 p_third_party_pay_only_flag in varchar2,
353 p_skip_formula in varchar2,
354 p_payroll_formula_id in number,
355 p_exclusion_rule_id in number,
356 p_iterative_flag in varchar2,
357 p_iterative_priority in number,
358 p_iterative_formula_name in varchar2,
359 p_process_mode in varchar2,
360 p_grossup_flag in varchar2,
361 p_advance_indicator in varchar2,
362 p_advance_payable in varchar2,
363 p_advance_deduction in varchar2,
364 p_process_advance_entry in varchar2,
365 p_proration_group in varchar2,
366 p_proration_formula in varchar2,
367 p_recalc_event_group in varchar2,
368 p_once_each_period_flag in varchar2,
369 p_object_version_number in number
370 )
371 Return g_rec_type;
372 --
373 end pay_set_shd;