1 Package per_eqt_shd as
2 /* $Header: peeqtrhi.pkh 120.0 2005/05/31 08:13:14 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Global Record Type Specification |
6 -- ----------------------------------------------------------------------------
7 --
8 -- Added Developer DF columns
9
10 Type g_rec_type Is Record
11 (
12 qualification_type_id number(9),
13 name varchar2(255),
14 category varchar2(30),
15 rank number(9),
16 attribute_category varchar2(30),
17 attribute1 varchar2(150),
18 attribute2 varchar2(150),
19 attribute3 varchar2(150),
20 attribute4 varchar2(150),
21 attribute5 varchar2(150),
22 attribute6 varchar2(150),
23 attribute7 varchar2(150),
24 attribute8 varchar2(150),
25 attribute9 varchar2(150),
26 attribute10 varchar2(150),
27 attribute11 varchar2(150),
28 attribute12 varchar2(150),
29 attribute13 varchar2(150),
30 attribute14 varchar2(150),
31 attribute15 varchar2(150),
32 attribute16 varchar2(150),
33 attribute17 varchar2(150),
34 attribute18 varchar2(150),
35 attribute19 varchar2(150),
36 attribute20 varchar2(150),
37 object_version_number number(9),
38 information_category varchar2(30),
39 information1 varchar2(150),
40 information2 varchar2(150),
41 information3 varchar2(150),
42 information4 varchar2(150),
43 information5 varchar2(150),
44 information6 varchar2(150),
45 information7 varchar2(150),
46 information8 varchar2(150),
47 information9 varchar2(150),
48 information10 varchar2(150),
49 information11 varchar2(150),
50 information12 varchar2(150),
51 information13 varchar2(150),
52 information14 varchar2(150),
53 information15 varchar2(150),
54 information16 varchar2(150),
55 information17 varchar2(150),
56 information18 varchar2(150),
57 information19 varchar2(150),
58 information20 varchar2(150),
59 information21 varchar2(150),
60 information22 varchar2(150),
61 information23 varchar2(150),
62 information24 varchar2(150),
63 information25 varchar2(150),
64 information26 varchar2(150),
65 information27 varchar2(150),
66 information28 varchar2(150),
67 information29 varchar2(150),
68 information30 varchar2(150)
69 -- BUG3356369 Unit Standard Framework Qualification
70 ,qual_framework_id number(10)
71 ,qualification_type varchar2(100)
72 ,credit_type varchar2(100)
73 ,credits number(10)
74 ,level_type varchar2(100)
75 ,level_number number(10)
76 ,field varchar2(150)
77 ,sub_field varchar2(150)
78 ,provider varchar2(150)
79 ,qa_organization varchar2(150)
80 );
81 --
82 -- ----------------------------------------------------------------------------
83 -- | Global Definitions - Internal Development Use Only |
84 -- ----------------------------------------------------------------------------
85 --
86 g_old_rec g_rec_type; -- Global record definition
87 g_api_dml boolean; -- Global api dml status
88 --
89 -- ----------------------------------------------------------------------------
90 -- |------------------------< return_api_dml_status >-------------------------|
91 -- ----------------------------------------------------------------------------
92 -- {Start Of Comments}
93 --
94 -- Description:
95 -- This function will return the current g_api_dml private global
96 -- boolean status.
97 -- The g_api_dml status determines if at the time of the function
98 -- being executed if a dml statement (i.e. INSERT, UPDATE or DELETE)
99 -- is being issued from within an api.
100 -- If the status is TRUE then a dml statement is being issued from
101 -- within this entity api.
102 -- This function is primarily to support database triggers which
103 -- need to maintain the object_version_number for non-supported
104 -- dml statements (i.e. dml statement issued outside of the api layer).
105 --
106 -- Pre Conditions:
107 -- None.
108 --
109 -- In Parameters:
110 -- None.
111 --
112 -- Post Success:
113 -- Processing continues.
114 -- If the function returns a TRUE value then, dml is being executed from
115 -- within this api.
116 --
117 -- Post Failure:
118 -- None.
119 --
120 -- Access Status:
121 -- Internal Table Handler Use Only.
122 --
123 -- {End Of Comments}
124 -- ----------------------------------------------------------------------------
125 Function return_api_dml_status Return Boolean;
126 --
127 -- ----------------------------------------------------------------------------
128 -- |---------------------------< constraint_error >---------------------------|
129 -- ----------------------------------------------------------------------------
130 -- {Start Of Comments}
131 --
132 -- Description:
133 -- This procedure is called when a constraint has been violated (i.e.
134 -- The exception hr_api.check_integrity_violated,
135 -- hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
136 -- hr_api.unique_integrity_violated has been raised).
137 -- The exceptions can only be raised as follows:
138 -- 1) A check constraint can only be violated during an INSERT or UPDATE
139 -- dml operation.
140 -- 2) A parent integrity constraint can only be violated during an
141 -- INSERT or UPDATE dml operation.
142 -- 3) A child integrity constraint can only be violated during an
143 -- DELETE dml operation.
144 -- 4) A unique integrity constraint can only be violated during INSERT or
145 -- UPDATE dml operation.
146 --
147 -- Pre Conditions:
148 -- 1) Either hr_api.check_integrity_violated,
149 -- hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
150 -- hr_api.unique_integrity_violated has been raised with the subsequent
151 -- stripping of the constraint name from the generated error message
152 -- text.
153 -- 2) Standalone validation test which corresponds with a constraint error.
154 --
155 -- In Parameter:
156 -- p_constraint_name is in upper format and is just the constraint name
157 -- (e.g. not prefixed by brackets, schema owner etc).
158 --
159 -- Post Success:
160 -- Development dependant.
161 --
162 -- Post Failure:
163 -- Developement dependant.
164 --
165 -- Developer Implementation Notes:
166 -- For each constraint being checked the hr system package failure message
167 -- has been generated as a template only. These system error messages should
168 -- be modified as required (i.e. change the system failure message to a user
169 -- friendly defined error message).
170 --
171 -- Access Status:
172 -- Internal Development Use Only.
173 --
174 -- {End Of Comments}
175 -- ----------------------------------------------------------------------------
176 Procedure constraint_error
177 (p_constraint_name in all_constraints.constraint_name%TYPE);
178 --
179 -- ----------------------------------------------------------------------------
180 -- |-----------------------------< api_updating >-----------------------------|
181 -- ----------------------------------------------------------------------------
182 -- {Start Of Comments}
183 --
184 -- Description:
185 -- This function is used to populate the g_old_rec record with the
186 -- current row from the database for the specified primary key
187 -- provided that the primary key exists and is valid and does not
188 -- already match the current g_old_rec. The function will always return
189 -- a TRUE value if the g_old_rec is populated with the current row.
190 -- A FALSE value will be returned if all of the primary key arguments
191 -- are null.
192 --
193 -- Pre Conditions:
194 -- None.
195 --
196 -- In Parameters:
197 --
198 -- Post Success:
199 -- A value of TRUE will be returned indiciating that the g_old_rec
200 -- is current.
201 -- A value of FALSE will be returned if all of the primary key arguments
202 -- have a null value (this indicates that the row has not be inserted into
203 -- the Schema), and therefore could never have a corresponding row.
204 --
205 -- Post Failure:
206 -- A failure can only occur under two circumstances:
207 -- 1) The primary key is invalid (i.e. a row does not exist for the
208 -- specified primary key values).
209 -- 2) If an object_version_number exists but is NOT the same as the current
210 -- g_old_rec value.
211 --
212 -- Developer Implementation Notes:
213 -- None.
214 --
215 -- Access Status:
216 -- Internal Development Use Only.
217 --
218 -- {End Of Comments}
219 -- ----------------------------------------------------------------------------
220 Function api_updating
221 (
222 p_qualification_type_id in number,
223 p_object_version_number in number
224 ) Return Boolean;
225 --
226 -- ----------------------------------------------------------------------------
227 -- |---------------------------------< lck >----------------------------------|
228 -- ----------------------------------------------------------------------------
229 -- {Start Of Comments}
230 --
231 -- Description:
232 -- The Lck process has two main functions to perform. Firstly, the row to be
233 -- updated or deleted must be locked. The locking of the row will only be
234 -- successful if the row is not currently locked by another user.
235 -- Secondly, during the locking of the row, the row is selected into
236 -- the g_old_rec data structure which enables the current row values from the
237 -- server to be available to the api.
238 --
239 -- Pre Conditions:
240 -- When attempting to call the lock the object version number (if defined)
241 -- is mandatory.
242 --
243 -- In Parameters:
244 -- The arguments to the Lck process are the primary key(s) which uniquely
245 -- identify the row and the object version number of row.
246 --
247 -- Post Success:
248 -- On successful completion of the Lck process the row to be updated or
249 -- deleted will be locked and selected into the global data structure
250 -- g_old_rec.
251 --
252 -- Post Failure:
253 -- The Lck process can fail for three reasons:
254 -- 1) When attempting to lock the row the row could already be locked by
255 -- another user. This will raise the HR_Api.Object_Locked exception.
256 -- 2) The row which is required to be locked doesn't exist in the HR Schema.
257 -- This error is trapped and reported using the message name
258 -- 'HR_7220_INVALID_PRIMARY_KEY'.
259 -- 3) The row although existing in the HR Schema has a different object
260 -- version number than the object version number specified.
261 -- This error is trapped and reported using the message name
262 -- 'HR_7155_OBJECT_INVALID'.
263 --
264 -- Developer Implementation Notes:
265 -- For each primary key and the object version number arguments add a
266 -- call to hr_api.mandatory_arg_error procedure to ensure that these
267 -- argument values are not null.
268 --
269 -- Access Status:
270 -- Internal Development Use Only.
271 --
272 -- {End Of Comments}
273 -- ----------------------------------------------------------------------------
274 Procedure lck
275 (
276 p_qualification_type_id in number,
277 p_object_version_number in number
278 );
279 --
280 -- ----------------------------------------------------------------------------
281 -- |-----------------------------< convert_args >-----------------------------|
282 -- ----------------------------------------------------------------------------
283 -- {Start Of Comments}
284 --
285 -- Description:
286 -- This function is used to turn attribute parameters into the record
287 -- structure parameter g_rec_type.
288 --
289 -- Pre Conditions:
290 -- This is a private function and can only be called from the ins or upd
291 -- attribute processes.
292 --
293 -- In Parameters:
294 --
295 -- Post Success:
296 -- A returning record structure will be returned.
297 --
298 -- Post Failure:
299 -- No direct error handling is required within this function. Any possible
300 -- errors within this function will be a PL/SQL value error due to conversion
301 -- of datatypes or data lengths.
302 --
303 -- Developer Implementation Notes:
304 -- None.
305 --
306 -- Access Status:
307 -- Internal Table Handler Use Only.
308 --
309 -- {End Of Comments}
310 -- ----------------------------------------------------------------------------
311
312 -- Passed Developer DF columns as argumnets to the function convert_args
313 --
314 Function convert_args
315 (
316 p_qualification_type_id in number,
317 p_name in varchar2,
318 p_category in varchar2,
319 p_rank in number,
320 p_attribute_category in varchar2,
321 p_attribute1 in varchar2,
322 p_attribute2 in varchar2,
323 p_attribute3 in varchar2,
324 p_attribute4 in varchar2,
325 p_attribute5 in varchar2,
326 p_attribute6 in varchar2,
327 p_attribute7 in varchar2,
328 p_attribute8 in varchar2,
329 p_attribute9 in varchar2,
330 p_attribute10 in varchar2,
331 p_attribute11 in varchar2,
332 p_attribute12 in varchar2,
333 p_attribute13 in varchar2,
334 p_attribute14 in varchar2,
335 p_attribute15 in varchar2,
336 p_attribute16 in varchar2,
337 p_attribute17 in varchar2,
338 p_attribute18 in varchar2,
339 p_attribute19 in varchar2,
340 p_attribute20 in varchar2,
341 p_object_version_number in number,
342 p_information_category in varchar2,
343 p_information1 in varchar2,
344 p_information2 in varchar2,
345 p_information3 in varchar2,
346 p_information4 in varchar2,
347 p_information5 in varchar2,
348 p_information6 in varchar2,
349 p_information7 in varchar2,
350 p_information8 in varchar2,
351 p_information9 in varchar2,
352 p_information10 in varchar2,
353 p_information11 in varchar2,
354 p_information12 in varchar2,
355 p_information13 in varchar2,
356 p_information14 in varchar2,
357 p_information15 in varchar2,
358 p_information16 in varchar2,
359 p_information17 in varchar2,
360 p_information18 in varchar2,
361 p_information19 in varchar2,
362 p_information20 in varchar2,
363 p_information21 in varchar2,
364 p_information22 in varchar2,
365 p_information23 in varchar2,
366 p_information24 in varchar2,
367 p_information25 in varchar2,
368 p_information26 in varchar2,
369 p_information27 in varchar2,
370 p_information28 in varchar2,
371 p_information29 in varchar2,
375 ,p_qualification_type in varchar2
372 p_information30 in varchar2
373 -- BUG3356369
374 ,p_qual_framework_id in number
376 ,p_credit_type in varchar2
377 ,p_credits in number
378 ,p_level_type in varchar2
379 ,p_level_number in number
380 ,p_field in varchar2
381 ,p_sub_field in varchar2
382 ,p_provider in varchar2
383 ,p_qa_organization in varchar2
384 )
385 Return g_rec_type;
386 --
387 end per_eqt_shd;