1 Package irc_isc_shd as
2 /* $Header: iriscrhi.pkh 120.0 2005/07/26 15:11:23 mbocutt noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- | Global Record Type Specification |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9 (search_criteria_id number(15)
10 ,object_id number(15)
11 ,object_type varchar2(30)
12 ,search_name varchar2(240)
13 ,search_type varchar2(30)
14 ,location varchar2(240)
15 ,distance_to_location varchar2(30)
16 ,geocode_location varchar2(240)
17 ,geocode_country varchar2(30)
18 ,derived_location varchar2(240)
19 ,location_id number(15)
20 ,longitude number
21 ,latitude number
22 ,employee varchar2(30)
23 ,contractor varchar2(30)
24 ,employment_category varchar2(30)
25 ,keywords varchar2(240)
26 ,travel_percentage number
27 ,min_salary number
28 ,max_salary number
29 ,salary_currency varchar2(30)
30 ,salary_period varchar2(30)
31 ,match_competence varchar2(30)
32 ,match_qualification varchar2(30)
33 ,job_title varchar2(240)
34 ,department varchar2(240)
35 ,professional_area varchar2(30)
36 ,work_at_home varchar2(30)
37 ,min_qual_level number(9)
38 ,max_qual_level number(9)
39 ,use_for_matching varchar2(30)
40 ,description_c clob
41 ,description varchar2(32767)
42 ,attribute_category varchar2(30)
43 ,attribute1 varchar2(150)
44 ,attribute2 varchar2(150)
45 ,attribute3 varchar2(150)
46 ,attribute4 varchar2(150)
47 ,attribute5 varchar2(150)
48 ,attribute6 varchar2(150)
49 ,attribute7 varchar2(150)
50 ,attribute8 varchar2(150)
51 ,attribute9 varchar2(150)
52 ,attribute10 varchar2(150)
53 ,attribute11 varchar2(150)
54 ,attribute12 varchar2(150)
55 ,attribute13 varchar2(150)
56 ,attribute14 varchar2(150)
57 ,attribute15 varchar2(150)
58 ,attribute16 varchar2(150)
59 ,attribute17 varchar2(150)
60 ,attribute18 varchar2(150)
61 ,attribute19 varchar2(150)
62 ,attribute20 varchar2(150)
63 ,attribute21 varchar2(240)
64 ,attribute22 varchar2(240)
65 ,attribute23 varchar2(240)
66 ,attribute24 varchar2(240)
67 ,attribute25 varchar2(240)
68 ,attribute26 varchar2(240)
69 ,attribute27 varchar2(240)
70 ,attribute28 varchar2(240)
71 ,attribute29 varchar2(240)
72 ,attribute30 varchar2(240)
73 ,isc_information_category varchar2(30)
74 ,isc_information1 varchar2(150)
75 ,isc_information2 varchar2(150)
76 ,isc_information3 varchar2(150)
77 ,isc_information4 varchar2(150)
78 ,isc_information5 varchar2(150)
79 ,isc_information6 varchar2(150)
80 ,isc_information7 varchar2(150)
81 ,isc_information8 varchar2(150)
82 ,isc_information9 varchar2(150)
83 ,isc_information10 varchar2(150)
84 ,isc_information11 varchar2(150)
85 ,isc_information12 varchar2(150)
86 ,isc_information13 varchar2(150)
87 ,isc_information14 varchar2(150)
88 ,isc_information15 varchar2(150)
89 ,isc_information16 varchar2(150)
90 ,isc_information17 varchar2(150)
91 ,isc_information18 varchar2(150)
92 ,isc_information19 varchar2(150)
93 ,isc_information20 varchar2(150)
94 ,isc_information21 varchar2(150)
95 ,isc_information22 varchar2(150)
96 ,isc_information23 varchar2(150)
97 ,isc_information24 varchar2(150)
98 ,isc_information25 varchar2(150)
99 ,isc_information26 varchar2(150)
100 ,isc_information27 varchar2(150)
101 ,isc_information28 varchar2(150)
102 ,isc_information29 varchar2(150)
103 ,isc_information30 varchar2(150)
104 ,object_version_number number(9)
105 ,date_posted varchar2(30)
106 );
107 --
108 -- ----------------------------------------------------------------------------
109 -- | Global Definitions - Internal Development Use Only |
110 -- ----------------------------------------------------------------------------
111 --
112 g_old_rec g_rec_type; -- Global record definition
113 -- Global table name
114 g_tab_nam constant varchar2(30) := 'IRC_SEARCH_CRITERIA';
115 g_api_dml boolean; -- Global api dml status
116 --
117 -- ----------------------------------------------------------------------------
118 -- |------------------------< return_api_dml_status >-------------------------|
119 -- ----------------------------------------------------------------------------
120 -- {Start Of Comments}
121 --
122 -- Description:
123 -- This function will return the current g_api_dml private global
124 -- boolean status.
125 -- The g_api_dml status determines if at the time of the function
126 -- being executed if a dml statement (i.e. INSERT, UPDATE or DELETE)
127 -- is being issued from within an api.
128 -- If the status is TRUE then a dml statement is being issued from
129 -- within this entity api.
130 -- This function is primarily to support database triggers which
131 -- need to maintain the object_version_number for non-supported
132 -- dml statements (i.e. dml statement issued outside of the api layer).
133 --
134 -- Prerequisites:
135 -- none
136 --
137 -- In Parameters:
138 -- None.
139 --
140 -- Post Success:
141 -- Processing continues.
142 -- If the function returns a TRUE value then, dml is being executed from
143 -- within this api.
144 --
145 -- Post Failure:
146 -- None.
147 --
148 -- Access Status:
149 -- Internal Row Handler Use Only.
150 --
151 -- {End Of Comments}
152 --
153 ----------------------------------------------------------------------------
154 Function return_api_dml_status Return Boolean;
155 --
156 -- ----------------------------------------------------------------------------
157 -- |---------------------------< constraint_error >---------------------------|
158 -- ----------------------------------------------------------------------------
159 -- {Start Of Comments}
160 --
161 -- Description:
162 -- This procedure is called when a constraint has been violated (i.e.
163 -- The exception hr_api.check_integrity_violated,
164 -- hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
165 -- hr_api.unique_integrity_violated has been raised).
166 -- The exceptions can only be raised as follows:
167 -- 1) A check constraint can only be violated during an INSERT or UPDATE
168 -- dml operation.
169 -- 2) A parent integrity constraint can only be violated during an
170 -- INSERT or UPDATE dml operation.
171 -- 3) A child integrity constraint can only be violated during an
172 -- DELETE dml operation.
173 -- 4) A unique integrity constraint can only be violated during INSERT or
174 -- UPDATE dml operation.
175 --
176 -- Prerequisites:
177 -- 1) Either hr_api.check_integrity_violated,
178 -- hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
179 -- hr_api.unique_integrity_violated has been raised with the subsequent
180 -- stripping of the constraint name from the generated error message
181 -- text.
182 -- 2) Standalone validation test which corresponds with a constraint error.
183 --
184 -- In Parameter:
185 -- p_constraint_name is in upper format and is just the constraint name
186 -- (e.g. not prefixed by brackets, schema owner etc).
187 --
188 -- Post Success:
189 -- Development dependant.
190 --
191 -- Post Failure:
192 -- Developement dependant.
193 --
194 -- Developer Implementation Notes:
195 -- For each constraint being checked the hr system package failure message
196 -- has been generated as a template only. These system error messages should
197 -- be modified as required (i.e. change the system failure message to a user
198 -- friendly defined error message).
199 --
200 -- Access Status:
201 -- Internal Development Use Only.
202 --
203 -- {End Of Comments}
204 -- ----------------------------------------------------------------------------
205 Procedure constraint_error
206 (p_constraint_name in all_constraints.constraint_name%TYPE);
207 --
208 -- ----------------------------------------------------------------------------
209 -- |-----------------------------< api_updating >-----------------------------|
210 -- ----------------------------------------------------------------------------
211 -- {Start Of Comments}
212 --
213 -- Description:
214 -- This function is used to populate the g_old_rec record with the
215 -- current row from the database for the specified primary key
216 -- provided that the primary key exists and is valid and does not
217 -- already match the current g_old_rec. The function will always return
218 -- a TRUE value if the g_old_rec is populated with the current row.
219 -- A FALSE value will be returned if all of the primary key arguments
220 -- are null.
221 --
222 -- Prerequisites:
223 -- None.
224 --
225 -- In Parameters:
226 --
227 -- Post Success:
228 -- A value of TRUE will be returned indiciating that the g_old_rec
229 -- is current.
230 -- A value of FALSE will be returned if all of the primary key arguments
231 -- have a null value (this indicates that the row has not be inserted into
232 -- the Schema), and therefore could never have a corresponding row.
233 --
234 -- Post Failure:
235 -- A failure can only occur under two circumstances:
236 -- 1) The primary key is invalid (i.e. a row does not exist for the
237 -- specified primary key values).
238 -- 2) If an object_version_number exists but is NOT the same as the current
239 -- g_old_rec value.
240 --
241 -- Developer Implementation Notes:
242 -- None.
243 --
244 -- Access Status:
245 -- Internal Development Use Only.
246 --
247 -- {End Of Comments}
248 -- ----------------------------------------------------------------------------
249 Function api_updating
250 (p_search_criteria_id in number
251 ,p_object_version_number in number
252 ) Return Boolean;
253 --
254 -- ----------------------------------------------------------------------------
255 -- |---------------------------------< lck >----------------------------------|
256 -- ----------------------------------------------------------------------------
257 -- {Start of comments}
258 --
259 -- Description:
260 -- The Lck process has two main functions to perform. Firstly, the row to be
261 -- updated or deleted must be locked. The locking of the row will only be
262 -- successful if the row is not currently locked by another user.
263 -- Secondly, during the locking of the row, the row is selected into
264 -- the g_old_rec data structure which enables the current row values from
265 -- the server to be available to the api.
266 --
267 -- Prerequisites:
268 -- When attempting to call the lock the object version number (if defined)
269 -- is mandatory.
270 --
271 -- In Parameters:
272 -- The arguments to the Lck process are the primary key(s) which uniquely
273 -- identify the row and the object version number of row.
274 --
275 -- Post Success:
276 -- On successful completion of the Lck process the row to be updated or
277 -- deleted will be locked and selected into the global data structure
278 -- g_old_rec.
279 --
280 -- Post Failure:
281 -- The Lck process can fail for three reasons:
282 -- 1) When attempting to lock the row the row could already be locked by
283 -- another user. This will raise the HR_Api.Object_Locked exception.
284 -- 2) The row which is required to be locked doesn't exist in the HR Schema.
285 -- This error is trapped and reported using the message name
286 -- 'HR_7220_INVALID_PRIMARY_KEY'.
287 -- 3) The row although existing in the HR Schema has a different object
288 -- version number than the object version number specified.
289 -- This error is trapped and reported using the message name
290 -- 'HR_7155_OBJECT_INVALID'.
291 --
292 -- Developer Implementation Notes:
293 -- For each primary key and the object version number arguments add a
294 -- call to hr_api.mandatory_arg_error procedure to ensure that these
295 -- argument values are not null.
296 --
297 -- Access Status:
298 -- Internal Development Use Only.
299 --
300 -- {End of comments}
301 -- ----------------------------------------------------------------------------
302 Procedure lck
303 (p_search_criteria_id in number
304 ,p_object_version_number in number
308 -- |-----------------------------< convert_args >-----------------------------|
305 );
306 --
307 -- ----------------------------------------------------------------------------
309 -- ----------------------------------------------------------------------------
310 -- {Start Of Comments}
311 --
312 -- Description:
313 -- This function is used to turn attribute parameters into the record
314 -- structure parameter g_rec_type.
315 --
316 -- Prerequisites:
317 -- This is a private function and can only be called from the ins or upd
318 -- attribute processes.
319 --
320 -- In Parameters:
321 --
322 -- Post Success:
323 -- A returning record structure will be returned.
324 --
325 -- Post Failure:
326 -- No direct error handling is required within this function. Any possible
327 -- errors within this function will be a PL/SQL value error due to
328 -- conversion of datatypes or data lengths.
329 --
330 -- Developer Implementation Notes:
331 -- None.
332 --
333 -- Access Status:
334 -- Internal Row Handler Use Only.
335 --
336 -- {End Of Comments}
337 -- ----------------------------------------------------------------------------
338 Function convert_args
339 (p_search_criteria_id in number
340 ,p_object_id in number
341 ,p_object_type in varchar2
342 ,p_search_name in varchar2
343 ,p_search_type in varchar2
344 ,p_location in varchar2
345 ,p_distance_to_location in varchar2
346 ,p_geocode_location in varchar2
347 ,p_geocode_country in varchar2
348 ,p_derived_location in varchar2
349 ,p_location_id in number
350 ,p_longitude in number
351 ,p_latitude in number
352 ,p_employee in varchar2
353 ,p_contractor in varchar2
354 ,p_employment_category in varchar2
355 ,p_keywords in varchar2
356 ,p_travel_percentage in number
357 ,p_min_salary in number
358 ,p_max_salary in number
359 ,p_salary_currency in varchar2
360 ,p_salary_period in varchar2
361 ,p_match_competence in varchar2
362 ,p_match_qualification in varchar2
363 ,p_job_title in varchar2
364 ,p_department in varchar2
365 ,p_professional_area in varchar2
366 ,p_work_at_home in varchar2
367 ,p_min_qual_level in number
368 ,p_max_qual_level in number
369 ,p_use_for_matching in varchar2
370 ,p_description in varchar2
371 ,p_attribute_category in varchar2
372 ,p_attribute1 in varchar2
373 ,p_attribute2 in varchar2
374 ,p_attribute3 in varchar2
375 ,p_attribute4 in varchar2
376 ,p_attribute5 in varchar2
377 ,p_attribute6 in varchar2
378 ,p_attribute7 in varchar2
379 ,p_attribute8 in varchar2
380 ,p_attribute9 in varchar2
381 ,p_attribute10 in varchar2
382 ,p_attribute11 in varchar2
383 ,p_attribute12 in varchar2
384 ,p_attribute13 in varchar2
385 ,p_attribute14 in varchar2
386 ,p_attribute15 in varchar2
387 ,p_attribute16 in varchar2
388 ,p_attribute17 in varchar2
389 ,p_attribute18 in varchar2
390 ,p_attribute19 in varchar2
391 ,p_attribute20 in varchar2
392 ,p_attribute21 in varchar2
393 ,p_attribute22 in varchar2
394 ,p_attribute23 in varchar2
395 ,p_attribute24 in varchar2
396 ,p_attribute25 in varchar2
397 ,p_attribute26 in varchar2
398 ,p_attribute27 in varchar2
399 ,p_attribute28 in varchar2
400 ,p_attribute29 in varchar2
401 ,p_attribute30 in varchar2
402 ,p_isc_information_category in varchar2
403 ,p_isc_information1 in varchar2
404 ,p_isc_information2 in varchar2
405 ,p_isc_information3 in varchar2
406 ,p_isc_information4 in varchar2
407 ,p_isc_information5 in varchar2
408 ,p_isc_information6 in varchar2
409 ,p_isc_information7 in varchar2
410 ,p_isc_information8 in varchar2
411 ,p_isc_information9 in varchar2
412 ,p_isc_information10 in varchar2
413 ,p_isc_information11 in varchar2
414 ,p_isc_information12 in varchar2
415 ,p_isc_information13 in varchar2
416 ,p_isc_information14 in varchar2
417 ,p_isc_information15 in varchar2
418 ,p_isc_information16 in varchar2
419 ,p_isc_information17 in varchar2
420 ,p_isc_information18 in varchar2
421 ,p_isc_information19 in varchar2
422 ,p_isc_information20 in varchar2
423 ,p_isc_information21 in varchar2
424 ,p_isc_information22 in varchar2
425 ,p_isc_information23 in varchar2
426 ,p_isc_information24 in varchar2
427 ,p_isc_information25 in varchar2
428 ,p_isc_information26 in varchar2
429 ,p_isc_information27 in varchar2
430 ,p_isc_information28 in varchar2
431 ,p_isc_information29 in varchar2
432 ,p_isc_information30 in varchar2
433 ,p_object_version_number in number
434 ,p_date_posted in varchar2
435 )
436 Return g_rec_type;
437 --
438 end irc_isc_shd;