1 Package pay_etm_shd AUTHID CURRENT_USER as
2 /* $Header: pyetmrhi.pkh 115.5 2003/11/05 01:47:04 sdhole ship $ */
3 --
4 -- Flag to disable base name checking for user structures.
5 --
6 g_allow_base_name_reuse boolean := false;
7 --
8 -- Value for maximum processing priority (biggest number(9)).
9 --
10 g_max_processing_priority constant number := 999999999;
11 --
12 -- ----------------------------------------------------------------------------
13 -- | Global Record Type Specification |
14 -- ----------------------------------------------------------------------------
15 --
16 Type g_rec_type Is Record
17 (
18 template_id number(9),
19 template_type varchar2(30),
20 template_name varchar2(80),
21 base_processing_priority number(9),
22 business_group_id number(15),
23 legislation_code varchar2(30),
24 version_number number,
25 base_name varchar2(50),
26 max_base_name_length number(9),
27 preference_info_category varchar2(30),
28 preference_information1 varchar2(150),
29 preference_information2 varchar2(150),
30 preference_information3 varchar2(150),
31 preference_information4 varchar2(150),
32 preference_information5 varchar2(150),
33 preference_information6 varchar2(150),
34 preference_information7 varchar2(150),
35 preference_information8 varchar2(150),
36 preference_information9 varchar2(150),
37 preference_information10 varchar2(150),
38 preference_information11 varchar2(150),
39 preference_information12 varchar2(150),
40 preference_information13 varchar2(150),
41 preference_information14 varchar2(150),
42 preference_information15 varchar2(150),
43 preference_information16 varchar2(150),
44 preference_information17 varchar2(150),
45 preference_information18 varchar2(150),
46 preference_information19 varchar2(240),
47 preference_information20 varchar2(150),
48 preference_information21 varchar2(150),
49 preference_information22 varchar2(150),
50 preference_information23 varchar2(150),
51 preference_information24 varchar2(150),
52 preference_information25 varchar2(150),
53 preference_information26 varchar2(150),
54 preference_information27 varchar2(150),
55 preference_information28 varchar2(150),
56 preference_information29 varchar2(150),
57 preference_information30 varchar2(150),
58 configuration_info_category varchar2(30),
59 configuration_information1 varchar2(150),
60 configuration_information2 varchar2(150),
61 configuration_information3 varchar2(150),
62 configuration_information4 varchar2(150),
63 configuration_information5 varchar2(150),
64 configuration_information6 varchar2(150),
65 configuration_information7 varchar2(150),
66 configuration_information8 varchar2(150),
67 configuration_information9 varchar2(150),
68 configuration_information10 varchar2(150),
69 configuration_information11 varchar2(150),
70 configuration_information12 varchar2(150),
71 configuration_information13 varchar2(150),
72 configuration_information14 varchar2(150),
73 configuration_information15 varchar2(150),
74 configuration_information16 varchar2(150),
75 configuration_information17 varchar2(150),
76 configuration_information18 varchar2(150),
77 configuration_information19 varchar2(150),
78 configuration_information20 varchar2(150),
79 configuration_information21 varchar2(150),
80 configuration_information22 varchar2(150),
81 configuration_information23 varchar2(150),
82 configuration_information24 varchar2(150),
83 configuration_information25 varchar2(150),
84 configuration_information26 varchar2(150),
85 configuration_information27 varchar2(150),
86 configuration_information28 varchar2(150),
87 configuration_information29 varchar2(150),
88 configuration_information30 varchar2(150),
89 object_version_number number(9)
90 );
91 --
92 -- ----------------------------------------------------------------------------
93 -- | Global Definitions - Internal Development Use Only |
94 -- ----------------------------------------------------------------------------
95 --
96 g_old_rec g_rec_type; -- Global record definition
97 --
98 -- ----------------------------------------------------------------------------
99 -- |---------------------------< constraint_error >---------------------------|
100 -- ----------------------------------------------------------------------------
101 -- {Start Of Comments}
102 --
103 -- Description:
104 -- This procedure is called when a constraint has been violated (i.e.
105 -- The exception hr_api.check_integrity_violated,
106 -- hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
107 -- hr_api.unique_integrity_violated has been raised).
108 -- The exceptions can only be raised as follows:
109 -- 1) A check constraint can only be violated during an INSERT or UPDATE
110 -- dml operation.
111 -- 2) A parent integrity constraint can only be violated during an
112 -- INSERT or UPDATE dml operation.
113 -- 3) A child integrity constraint can only be violated during an
114 -- DELETE dml operation.
115 -- 4) A unique integrity constraint can only be violated during INSERT or
116 -- UPDATE dml operation.
117 --
118 -- Prerequisites:
119 -- 1) Either 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 with the subsequent
122 -- stripping of the constraint name from the generated error message
123 -- text.
124 -- 2) Standalone validation test which corresponds with a constraint error.
125 --
126 -- In Parameter:
127 -- p_constraint_name is in upper format and is just the constraint name
128 -- (e.g. not prefixed by brackets, schema owner etc).
129 --
130 -- Post Success:
131 -- Development dependant.
132 --
133 -- Post Failure:
134 -- Developement dependant.
135 --
136 -- Developer Implementation Notes:
137 -- For each constraint being checked the hr system package failure message
138 -- has been generated as a template only. These system error messages should
139 -- be modified as required (i.e. change the system failure message to a user
140 -- friendly defined error message).
141 --
142 -- Access Status:
143 -- Internal Development Use Only.
144 --
145 -- {End Of Comments}
146 -- ----------------------------------------------------------------------------
147 Procedure constraint_error
148 (p_constraint_name in all_constraints.constraint_name%TYPE);
149 --
150 -- ----------------------------------------------------------------------------
151 -- |-----------------------------< api_updating >-----------------------------|
152 -- ----------------------------------------------------------------------------
153 -- {Start Of Comments}
154 --
155 -- Description:
156 -- This function is used to populate the g_old_rec record with the
157 -- current row from the database for the specified primary key
158 -- provided that the primary key exists and is valid and does not
159 -- already match the current g_old_rec. The function will always return
160 -- a TRUE value if the g_old_rec is populated with the current row.
161 -- A FALSE value will be returned if all of the primary key arguments
162 -- are null.
163 --
164 -- Prerequisites:
165 -- None.
166 --
167 -- In Parameters:
168 --
169 -- Post Success:
170 -- A value of TRUE will be returned indiciating that the g_old_rec
171 -- is current.
172 -- A value of FALSE will be returned if all of the primary key arguments
173 -- have a null value (this indicates that the row has not be inserted into
174 -- the Schema), and therefore could never have a corresponding row.
175 --
176 -- Post Failure:
177 -- A failure can only occur under two circumstances:
178 -- 1) The primary key is invalid (i.e. a row does not exist for the
179 -- specified primary key values).
180 -- 2) If an object_version_number exists but is NOT the same as the current
181 -- g_old_rec value.
182 --
183 -- Developer Implementation Notes:
184 -- None.
185 --
186 -- Access Status:
187 -- Internal Development Use Only.
188 --
189 -- {End Of Comments}
190 -- ----------------------------------------------------------------------------
191 Function api_updating
192 (
193 p_template_id in number,
194 p_object_version_number in number
195 ) Return Boolean;
196 --
197 -- ----------------------------------------------------------------------------
198 -- |---------------------------------< lck >----------------------------------|
199 -- ----------------------------------------------------------------------------
200 -- {Start Of Comments}
201 --
202 -- Description:
203 -- The Lck process has two main functions to perform. Firstly, the row to be
204 -- updated or deleted must be locked. The locking of the row will only be
205 -- successful if the row is not currently locked by another user.
206 -- Secondly, during the locking of the row, the row is selected into
207 -- the g_old_rec data structure which enables the current row values from the
208 -- server to be available to the api.
209 --
210 -- Prerequisites:
211 -- When attempting to call the lock the object version number (if defined)
212 -- is mandatory.
213 --
214 -- In Parameters:
215 -- The arguments to the Lck process are the primary key(s) which uniquely
216 -- identify the row and the object version number of row.
217 --
218 -- Post Success:
219 -- On successful completion of the Lck process the row to be updated or
220 -- deleted will be locked and selected into the global data structure
221 -- g_old_rec.
222 --
223 -- Post Failure:
224 -- The Lck process can fail for three reasons:
225 -- 1) When attempting to lock the row the row could already be locked by
226 -- another user. This will raise the HR_Api.Object_Locked exception.
227 -- 2) The row which is required to be locked doesn't exist in the HR Schema.
228 -- This error is trapped and reported using the message name
229 -- 'HR_7220_INVALID_PRIMARY_KEY'.
230 -- 3) The row although existing in the HR Schema has a different object
231 -- version number than the object version number specified.
232 -- This error is trapped and reported using the message name
233 -- 'HR_7155_OBJECT_INVALID'.
234 --
235 -- Developer Implementation Notes:
236 -- For each primary key and the object version number arguments add a
237 -- call to hr_api.mandatory_arg_error procedure to ensure that these
238 -- argument values are not null.
239 --
240 -- Access Status:
241 -- Internal Development Use Only.
242 --
243 -- {End Of Comments}
244 -- ----------------------------------------------------------------------------
245 Procedure lck
246 (
247 p_template_id in number,
248 p_object_version_number in number
249 );
250 --
251 -- ----------------------------------------------------------------------------
252 -- |-----------------------------< convert_args >-----------------------------|
253 -- ----------------------------------------------------------------------------
254 -- {Start Of Comments}
255 --
256 -- Description:
257 -- This function is used to turn attribute parameters into the record
258 -- structure parameter g_rec_type.
259 --
260 -- Prerequisites:
261 -- This is a private function and can only be called from the ins or upd
262 -- attribute processes.
263 --
264 -- In Parameters:
265 --
266 -- Post Success:
267 -- A returning record structure will be returned.
268 --
269 -- Post Failure:
270 -- No direct error handling is required within this function. Any possible
271 -- errors within this function will be a PL/SQL value error due to conversion
272 -- of datatypes or data lengths.
273 --
274 -- Developer Implementation Notes:
275 -- None.
276 --
277 -- Access Status:
278 -- Internal Row Handler Use Only.
279 --
280 -- {End Of Comments}
281 -- ----------------------------------------------------------------------------
282 Function convert_args
283 (
284 p_template_id in number,
285 p_template_type in varchar2,
286 p_template_name in varchar2,
287 p_base_processing_priority in number,
288 p_business_group_id in number,
289 p_legislation_code in varchar2,
290 p_version_number in number,
291 p_base_name in varchar2,
292 p_max_base_name_length in number,
293 p_preference_info_category in varchar2,
294 p_preference_information1 in varchar2,
295 p_preference_information2 in varchar2,
296 p_preference_information3 in varchar2,
297 p_preference_information4 in varchar2,
298 p_preference_information5 in varchar2,
299 p_preference_information6 in varchar2,
300 p_preference_information7 in varchar2,
301 p_preference_information8 in varchar2,
302 p_preference_information9 in varchar2,
303 p_preference_information10 in varchar2,
304 p_preference_information11 in varchar2,
305 p_preference_information12 in varchar2,
306 p_preference_information13 in varchar2,
307 p_preference_information14 in varchar2,
308 p_preference_information15 in varchar2,
309 p_preference_information16 in varchar2,
310 p_preference_information17 in varchar2,
311 p_preference_information18 in varchar2,
312 p_preference_information19 in varchar2,
313 p_preference_information20 in varchar2,
314 p_preference_information21 in varchar2,
315 p_preference_information22 in varchar2,
316 p_preference_information23 in varchar2,
317 p_preference_information24 in varchar2,
318 p_preference_information25 in varchar2,
319 p_preference_information26 in varchar2,
320 p_preference_information27 in varchar2,
321 p_preference_information28 in varchar2,
322 p_preference_information29 in varchar2,
323 p_preference_information30 in varchar2,
324 p_configuration_info_category in varchar2,
325 p_configuration_information1 in varchar2,
326 p_configuration_information2 in varchar2,
327 p_configuration_information3 in varchar2,
328 p_configuration_information4 in varchar2,
329 p_configuration_information5 in varchar2,
330 p_configuration_information6 in varchar2,
331 p_configuration_information7 in varchar2,
332 p_configuration_information8 in varchar2,
333 p_configuration_information9 in varchar2,
334 p_configuration_information10 in varchar2,
335 p_configuration_information11 in varchar2,
336 p_configuration_information12 in varchar2,
337 p_configuration_information13 in varchar2,
338 p_configuration_information14 in varchar2,
339 p_configuration_information15 in varchar2,
340 p_configuration_information16 in varchar2,
341 p_configuration_information17 in varchar2,
342 p_configuration_information18 in varchar2,
343 p_configuration_information19 in varchar2,
344 p_configuration_information20 in varchar2,
345 p_configuration_information21 in varchar2,
346 p_configuration_information22 in varchar2,
347 p_configuration_information23 in varchar2,
348 p_configuration_information24 in varchar2,
349 p_configuration_information25 in varchar2,
350 p_configuration_information26 in varchar2,
351 p_configuration_information27 in varchar2,
352 p_configuration_information28 in varchar2,
353 p_configuration_information29 in varchar2,
354 p_configuration_information30 in varchar2,
355 p_object_version_number in number
356 )
357 Return g_rec_type;
358 --
359 end pay_etm_shd;