1 Package pay_pap_shd AUTHID CURRENT_USER as
2 /* $Header: pypaprhi.pkh 120.0.12020000.3 2013/02/06 11:04:36 srannama ship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Global Record Type Specification |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9 (
10 accrual_plan_id number(9),
11 business_group_id number(15),
12 accrual_plan_element_type_id number(9),
13 pto_input_value_id number(9),
14 co_input_value_id number(9),
15 residual_input_value_id number(9),
16 accrual_category varchar2(30),
17 accrual_plan_name varchar2(80),
18 accrual_start varchar2(30),
19 accrual_units_of_measure varchar2(30),
20 ineligible_period_length number(9), -- Increased length
21 ineligible_period_type varchar2(30),
22 accrual_formula_id number(9),
23 co_formula_id number(9),
24 co_date_input_value_id number(9),
25 co_exp_date_input_value_id number(9),
26 residual_date_input_value_id number(9),
27 description varchar2(240),
28 ineligibility_formula_id number(9),
29 payroll_formula_id number(9),
30 defined_balance_id number(15),
31 tagging_element_type_id number(15),
32 balance_element_type_id number(15),
33 object_version_number number(9),
34 information_category varchar2(30),
35 information1 varchar2(150),
36 information2 varchar2(150),
37 information3 varchar2(150),
38 information4 varchar2(150),
39 information5 varchar2(150),
40 information6 varchar2(150),
41 information7 varchar2(150),
42 information8 varchar2(150),
43 information9 varchar2(150),
44 information10 varchar2(150),
45 information11 varchar2(150),
46 information12 varchar2(150),
47 information13 varchar2(150),
48 information14 varchar2(150),
49 information15 varchar2(150),
50 information16 varchar2(150),
51 information17 varchar2(150),
52 information18 varchar2(150),
53 information19 varchar2(150),
54 information20 varchar2(150),
55 information21 varchar2(150),
56 information22 varchar2(150),
57 information23 varchar2(150),
58 information24 varchar2(150),
59 information25 varchar2(150),
60 information26 varchar2(150),
61 information27 varchar2(150),
62 information28 varchar2(150),
63 information29 varchar2(150),
64 information30 varchar2(150)
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_accrual_plan_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_accrual_plan_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_accrual_plan_id in number,
299 p_business_group_id in number,
300 p_accrual_plan_element_type_id in number,
301 p_pto_input_value_id in number,
302 p_co_input_value_id in number,
303 p_residual_input_value_id in number,
304 p_accrual_category in varchar2,
305 p_accrual_plan_name in varchar2,
306 p_accrual_start in varchar2,
307 p_accrual_units_of_measure in varchar2,
308 p_ineligible_period_length in number,
309 p_ineligible_period_type in varchar2,
310 p_accrual_formula_id in number,
311 p_co_formula_id in number,
312 p_co_date_input_value_id in number,
313 p_co_exp_date_input_value_id in number,
314 p_residual_date_input_value_id in number,
315 p_description in varchar2,
316 p_ineligibility_formula_id in number,
317 p_payroll_formula_id in number,
318 p_defined_balance_id in number,
319 p_tagging_element_type_id in number,
320 p_balance_element_type_id in number,
321 p_object_version_number in number,
322 p_information_category in varchar2,
323 p_information1 in varchar2,
324 p_information2 in varchar2,
325 p_information3 in varchar2,
326 p_information4 in varchar2,
330 p_information8 in varchar2,
327 p_information5 in varchar2,
328 p_information6 in varchar2,
329 p_information7 in varchar2,
331 p_information9 in varchar2,
332 p_information10 in varchar2,
333 p_information11 in varchar2,
334 p_information12 in varchar2,
335 p_information13 in varchar2,
336 p_information14 in varchar2,
337 p_information15 in varchar2,
338 p_information16 in varchar2,
339 p_information17 in varchar2,
340 p_information18 in varchar2,
341 p_information19 in varchar2,
342 p_information20 in varchar2,
343 p_information21 in varchar2,
344 p_information22 in varchar2,
345 p_information23 in varchar2,
346 p_information24 in varchar2,
347 p_information25 in varchar2,
348 p_information26 in varchar2,
349 p_information27 in varchar2,
350 p_information28 in varchar2,
351 p_information29 in varchar2,
352 p_information30 in varchar2
353
354 )
355 Return g_rec_type;
356 --
357 end pay_pap_shd;