1 Package per_abb_shd as
2 /* $Header: peabbrhi.pkh 120.2 2006/03/03 02:14 bshukla noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Global Record Type Specification |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9 (absence_attendance_type_id number(9)
10 ,business_group_id number(15)
11 ,input_value_id number(9)
12 ,date_effective date
13 ,name varchar2(30)
14 ,absence_category varchar2(30)
15 ,comments varchar2(2000) -- pseudo column
16 ,date_end date
17 ,hours_or_days varchar2(9) -- Increased length
18 ,increasing_or_decreasing_flag varchar2(9) -- Increased length
19 ,request_id number(15)
20 ,program_application_id number(15)
21 ,program_id number(15)
22 ,program_update_date date
23 ,attribute_category varchar2(30)
24 ,attribute1 varchar2(150)
25 ,attribute2 varchar2(150)
26 ,attribute3 varchar2(150)
27 ,attribute4 varchar2(150)
28 ,attribute5 varchar2(150)
29 ,attribute6 varchar2(150)
30 ,attribute7 varchar2(150)
31 ,attribute8 varchar2(150)
32 ,attribute9 varchar2(150)
33 ,attribute10 varchar2(150)
34 ,attribute11 varchar2(150)
35 ,attribute12 varchar2(150)
36 ,attribute13 varchar2(150)
37 ,attribute14 varchar2(150)
38 ,attribute15 varchar2(150)
39 ,attribute16 varchar2(150)
40 ,attribute17 varchar2(150)
41 ,attribute18 varchar2(150)
42 ,attribute19 varchar2(150)
43 ,attribute20 varchar2(150)
44 ,object_version_number number(9)
45 ,information_category varchar2(30)
46 ,information1 varchar2(150)
47 ,information2 varchar2(150)
48 ,information3 varchar2(150)
49 ,information4 varchar2(150)
50 ,information5 varchar2(150)
51 ,information6 varchar2(150)
52 ,information7 varchar2(150)
53 ,information8 varchar2(150)
54 ,information9 varchar2(150)
55 ,information10 varchar2(150)
56 ,information11 varchar2(150)
57 ,information12 varchar2(150)
58 ,information13 varchar2(150)
59 ,information14 varchar2(150)
60 ,information15 varchar2(150)
61 ,information16 varchar2(150)
62 ,information17 varchar2(150)
63 ,information18 varchar2(150)
64 ,information19 varchar2(150)
65 ,information20 varchar2(150)
66 ,user_role varchar2(30)
67 ,assignment_status_type_id number(15)
68 ,advance_pay varchar2(30)
69 ,absence_overlap_flag varchar2(30)
70 );
71 --
72 -- ----------------------------------------------------------------------------
73 -- | Global Definitions - Internal Development Use Only |
74 -- ----------------------------------------------------------------------------
75 --
76 g_old_rec g_rec_type; -- Global record definition
77 -- Global table name
78 g_tab_nam constant varchar2(30) := 'PER_ABSENCE_ATTENDANCE_TYPES';
79 g_api_dml boolean; -- Global api dml status
80 --
81 -- ----------------------------------------------------------------------------
82 -- |------------------------< return_api_dml_status >-------------------------|
83 -- ----------------------------------------------------------------------------
84 -- {Start Of Comments}
85 --
86 -- Description:
87 -- This function will return the current g_api_dml private global
88 -- boolean status.
89 -- The g_api_dml status determines if at the time of the function
90 -- being executed if a dml statement (i.e. INSERT, UPDATE or DELETE)
91 -- is being issued from within an api.
92 -- If the status is TRUE then a dml statement is being issued from
93 -- within this entity api.
94 -- This function is primarily to support database triggers which
95 -- need to maintain the object_version_number for non-supported
96 -- dml statements (i.e. dml statement issued outside of the api layer).
97 --
98 -- Prerequisites:
99 -- None.
100 --
101 -- In Parameters:
102 -- None.
103 --
104 -- Post Success:
105 -- Processing continues.
106 -- If the function returns a TRUE value then, dml is being executed from
107 -- within this api.
108 --
109 -- Post Failure:
110 -- None.
111 --
112 -- Access Status:
113 -- Internal Row Handler Use Only.
114 --
115 -- {End Of Comments}
116 -- ----------------------------------------------------------------------------
117 Function return_api_dml_status Return Boolean;
118 --
119 -- ----------------------------------------------------------------------------
120 -- |---------------------------< constraint_error >---------------------------|
121 -- ----------------------------------------------------------------------------
122 -- {Start Of Comments}
123 --
124 -- Description:
125 -- This procedure is called when a constraint has been violated (i.e.
126 -- The exception hr_api.check_integrity_violated,
127 -- hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
128 -- hr_api.unique_integrity_violated has been raised).
129 -- The exceptions can only be raised as follows:
130 -- 1) A check constraint can only be violated during an INSERT or UPDATE
131 -- dml operation.
132 -- 2) A parent integrity constraint can only be violated during an
133 -- INSERT or UPDATE dml operation.
134 -- 3) A child integrity constraint can only be violated during an
135 -- DELETE dml operation.
136 -- 4) A unique integrity constraint can only be violated during INSERT or
137 -- UPDATE dml operation.
138 --
139 -- Prerequisites:
140 -- 1) Either hr_api.check_integrity_violated,
141 -- hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
142 -- hr_api.unique_integrity_violated has been raised with the subsequent
143 -- stripping of the constraint name from the generated error message
144 -- text.
145 -- 2) Standalone validation test which corresponds with a constraint error.
146 --
147 -- In Parameter:
148 -- p_constraint_name is in upper format and is just the constraint name
149 -- (e.g. not prefixed by brackets, schema owner etc).
150 --
151 -- Post Success:
152 -- Development dependant.
153 --
154 -- Post Failure:
155 -- Developement dependant.
156 --
157 -- Developer Implementation Notes:
158 -- For each constraint being checked the hr system package failure message
159 -- has been generated as a template only. These system error messages should
160 -- be modified as required (i.e. change the system failure message to a user
161 -- friendly defined error message).
162 --
163 -- Access Status:
164 -- Internal Development Use Only.
165 --
166 -- {End Of Comments}
167 -- ----------------------------------------------------------------------------
168 Procedure constraint_error
169 (p_constraint_name in all_constraints.constraint_name%TYPE);
170 --
171 -- ----------------------------------------------------------------------------
175 --
172 -- |-----------------------------< api_updating >-----------------------------|
173 -- ----------------------------------------------------------------------------
174 -- {Start Of Comments}
176 -- Description:
177 -- This function is used to populate the g_old_rec record with the
178 -- current row from the database for the specified primary key
179 -- provided that the primary key exists and is valid and does not
180 -- already match the current g_old_rec. The function will always return
181 -- a TRUE value if the g_old_rec is populated with the current row.
182 -- A FALSE value will be returned if all of the primary key arguments
183 -- are null.
184 --
185 -- Prerequisites:
186 -- None.
187 --
188 -- In Parameters:
189 --
190 -- Post Success:
194 -- have a null value (this indicates that the row has not be inserted into
191 -- A value of TRUE will be returned indiciating that the g_old_rec
192 -- is current.
193 -- A value of FALSE will be returned if all of the primary key arguments
195 -- the Schema), and therefore could never have a corresponding row.
196 --
197 -- Post Failure:
198 -- A failure can only occur under two circumstances:
199 -- 1) The primary key is invalid (i.e. a row does not exist for the
200 -- specified primary key values).
201 -- 2) If an object_version_number exists but is NOT the same as the current
202 -- g_old_rec value.
203 --
204 -- Developer Implementation Notes:
205 -- None.
206 --
210 -- {End Of Comments}
207 -- Access Status:
208 -- Internal Development Use Only.
209 --
211 -- ----------------------------------------------------------------------------
212 Function api_updating
213 (p_absence_attendance_type_id in number
214 ,p_object_version_number in number
215 ) Return Boolean;
216 --
217 -- ----------------------------------------------------------------------------
218 -- |---------------------------------< lck >----------------------------------|
219 -- ----------------------------------------------------------------------------
220 -- {Start of comments}
221 --
222 -- Description:
223 -- The Lck process has two main functions to perform. Firstly, the row to be
224 -- updated or deleted must be locked. The locking of the row will only be
225 -- successful if the row is not currently locked by another user.
226 -- Secondly, during the locking of the row, the row is selected into
227 -- the g_old_rec data structure which enables the current row values from
228 -- the server to be available to the api.
229 --
230 -- Prerequisites:
231 -- When attempting to call the lock the object version number (if defined)
232 -- is mandatory.
233 --
234 -- In Parameters:
235 -- The arguments to the Lck process are the primary key(s) which uniquely
236 -- identify the row and the object version number of row.
237 --
238 -- Post Success:
239 -- On successful completion of the Lck process the row to be updated or
240 -- deleted will be locked and selected into the global data structure
241 -- g_old_rec.
242 --
243 -- Post Failure:
244 -- The Lck process can fail for three reasons:
245 -- 1) When attempting to lock the row the row could already be locked by
246 -- another user. This will raise the HR_Api.Object_Locked exception.
247 -- 2) The row which is required to be locked doesn't exist in the HR Schema.
248 -- This error is trapped and reported using the message name
249 -- 'HR_7220_INVALID_PRIMARY_KEY'.
250 -- 3) The row although existing in the HR Schema has a different object
251 -- version number than the object version number specified.
252 -- This error is trapped and reported using the message name
253 -- 'HR_7155_OBJECT_INVALID'.
254 --
255 -- Developer Implementation Notes:
256 -- For each primary key and the object version number arguments add a
257 -- call to hr_api.mandatory_arg_error procedure to ensure that these
258 -- argument values are not null.
259 --
260 -- Access Status:
261 -- Internal Development Use Only.
262 --
263 -- {End of comments}
264 -- ----------------------------------------------------------------------------
265 Procedure lck
266 (p_absence_attendance_type_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
291 -- conversion 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 (p_absence_attendance_type_id in number
306 ,p_name in varchar2
303 ,p_business_group_id in number
304 ,p_input_value_id in number
305 ,p_date_effective in date
307 ,p_absence_category in varchar2
308 ,p_comments in varchar2
309 ,p_date_end in date
310 ,p_hours_or_days in varchar2
311 ,p_inc_or_dec_flag in varchar2
312 ,p_request_id in number
313 ,p_program_application_id in number
314 ,p_program_id in number
315 ,p_program_update_date in date
316 ,p_attribute_category in varchar2
317 ,p_attribute1 in varchar2
318 ,p_attribute2 in varchar2
319 ,p_attribute3 in varchar2
320 ,p_attribute4 in varchar2
321 ,p_attribute5 in varchar2
322 ,p_attribute6 in varchar2
323 ,p_attribute7 in varchar2
324 ,p_attribute8 in varchar2
325 ,p_attribute9 in varchar2
326 ,p_attribute10 in varchar2
327 ,p_attribute11 in varchar2
328 ,p_attribute12 in varchar2
329 ,p_attribute13 in varchar2
330 ,p_attribute14 in varchar2
331 ,p_attribute15 in varchar2
332 ,p_attribute16 in varchar2
333 ,p_attribute17 in varchar2
334 ,p_attribute18 in varchar2
335 ,p_attribute19 in varchar2
336 ,p_attribute20 in varchar2
337 ,p_object_version_number in number
338 ,p_information_category in varchar2
339 ,p_information1 in varchar2
340 ,p_information2 in varchar2
341 ,p_information3 in varchar2
342 ,p_information4 in varchar2
343 ,p_information5 in varchar2
344 ,p_information6 in varchar2
345 ,p_information7 in varchar2
346 ,p_information8 in varchar2
347 ,p_information9 in varchar2
348 ,p_information10 in varchar2
349 ,p_information11 in varchar2
353 ,p_information15 in varchar2
350 ,p_information12 in varchar2
351 ,p_information13 in varchar2
352 ,p_information14 in varchar2
354 ,p_information16 in varchar2
355 ,p_information17 in varchar2
356 ,p_information18 in varchar2
357 ,p_information19 in varchar2
358 ,p_information20 in varchar2
359 ,p_user_role in varchar2
360 ,p_assignment_status_type_id in number
361 ,p_advance_pay in varchar2
362 ,p_absence_overlap_flag in varchar2
363 )
364 Return g_rec_type;
365 --
366 end per_abb_shd;