1 Package pay_con_shd AUTHID CURRENT_USER as
2 /* $Header: pyconrhi.pkh 115.1 99/09/30 13:47:46 porting ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Global Record Type Specification |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9 (
10 contr_history_id number(15),
11 person_id number(10),
12 date_from date,
13 date_to date,
14 contr_type varchar2(30),
15 business_group_id number(15),
16 legislation_code varchar2(30),
17 amt_contr number(15,2),
18 max_contr_allowed number(15,2),
19 includable_comp number(15,2),
20 tax_unit_id number(15),
21 source_system varchar2(30),
22 contr_information_category varchar2(30),
23 contr_information1 varchar2(150),
24 contr_information2 varchar2(150),
25 contr_information3 varchar2(150),
26 contr_information4 varchar2(150),
27 contr_information5 varchar2(150),
28 contr_information6 varchar2(150),
29 contr_information7 varchar2(150),
30 contr_information8 varchar2(150),
31 contr_information9 varchar2(150),
32 contr_information10 varchar2(150),
33 contr_information11 varchar2(150),
34 contr_information12 varchar2(150),
35 contr_information13 varchar2(150),
36 contr_information14 varchar2(150),
37 contr_information15 varchar2(150),
38 contr_information16 varchar2(150),
39 contr_information17 varchar2(150),
40 contr_information18 varchar2(150),
41 contr_information19 varchar2(150),
42 contr_information20 varchar2(150),
43 contr_information21 varchar2(150),
44 contr_information22 varchar2(150),
45 contr_information23 varchar2(150),
46 contr_information24 varchar2(150),
47 contr_information25 varchar2(150),
48 contr_information26 varchar2(150),
49 contr_information27 varchar2(150),
50 contr_information28 varchar2(150),
51 contr_information29 varchar2(150),
52 contr_information30 varchar2(150),
53 object_version_number number(15)
54 );
55 --
56 -- ----------------------------------------------------------------------------
57 -- | Global Definitions - Internal Development Use Only |
58 -- ----------------------------------------------------------------------------
59 --
60 g_old_rec g_rec_type; -- Global record definition
61 g_api_dml boolean; -- Global api dml status
62 --
63 -- ----------------------------------------------------------------------------
64 -- |------------------------< return_api_dml_status >-------------------------|
65 -- ----------------------------------------------------------------------------
66 -- {Start Of Comments}
67 --
68 -- Description:
69 -- This function will return the current g_api_dml private global
70 -- boolean status.
71 -- The g_api_dml status determines if at the time of the function
72 -- being executed if a dml statement (i.e. INSERT, UPDATE or DELETE)
73 -- is being issued from within an api.
74 -- If the status is TRUE then a dml statement is being issued from
75 -- within this entity api.
76 -- This function is primarily to support database triggers which
77 -- need to maintain the object_version_number for non-supported
78 -- dml statements (i.e. dml statement issued outside of the api layer).
79 --
80 -- Prerequisites:
81 -- None.
82 --
83 -- In Parameters:
84 -- None.
85 --
86 -- Post Success:
87 -- Processing continues.
88 -- If the function returns a TRUE value then, dml is being executed from
89 -- within this api.
90 --
91 -- Post Failure:
92 -- None.
93 --
94 -- Access Status:
95 -- Internal Row Handler Use Only.
96 --
97 -- {End Of Comments}
98 -- ----------------------------------------------------------------------------
99 Function return_api_dml_status Return Boolean;
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_contr_history_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_contr_history_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_contr_history_id in number,
288 p_person_id in number,
289 p_date_from in date,
290 p_date_to in date,
291 p_contr_type in varchar2,
292 p_business_group_id in number,
293 p_legislation_code in varchar2,
294 p_amt_contr in number,
295 p_max_contr_allowed in number,
296 p_includable_comp in number,
297 p_tax_unit_id in number,
298 p_source_system in varchar2,
299 p_contr_information_category in varchar2,
300 p_contr_information1 in varchar2,
301 p_contr_information2 in varchar2,
302 p_contr_information3 in varchar2,
303 p_contr_information4 in varchar2,
304 p_contr_information5 in varchar2,
305 p_contr_information6 in varchar2,
306 p_contr_information7 in varchar2,
307 p_contr_information8 in varchar2,
308 p_contr_information9 in varchar2,
309 p_contr_information10 in varchar2,
310 p_contr_information11 in varchar2,
311 p_contr_information12 in varchar2,
312 p_contr_information13 in varchar2,
313 p_contr_information14 in varchar2,
314 p_contr_information15 in varchar2,
315 p_contr_information16 in varchar2,
316 p_contr_information17 in varchar2,
317 p_contr_information18 in varchar2,
318 p_contr_information19 in varchar2,
319 p_contr_information20 in varchar2,
320 p_contr_information21 in varchar2,
321 p_contr_information22 in varchar2,
322 p_contr_information23 in varchar2,
323 p_contr_information24 in varchar2,
324 p_contr_information25 in varchar2,
325 p_contr_information26 in varchar2,
326 p_contr_information27 in varchar2,
327 p_contr_information28 in varchar2,
328 p_contr_information29 in varchar2,
329 p_contr_information30 in varchar2,
330 p_object_version_number in number
331 )
332 Return g_rec_type;
333 --
334 end pay_con_shd;