DBA Data[Home] [Help]

PACKAGE: APPS.PER_DIS_SHD

Source


1 Package per_dis_shd as
2 /* $Header: pedisrhi.pkh 120.0 2005/05/31 07:41:06 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (disability_id                   number(10)
10   ,effective_start_date            date
11   ,effective_end_date              date
12   ,person_id                       number(10)
13   ,incident_id                     number(10)
14   ,organization_id                 number(15)
15   ,registration_id                 varchar2(30)
16   ,registration_date               date
17   ,registration_exp_date           date
18   ,category                        varchar2(30)
19   ,status                          varchar2(30)
20   ,description                     varchar2(2000)
21   ,degree                          number(9,2)       -- Increased length
22   ,quota_fte                       number(9,2)       -- Increased length
23   ,reason                          varchar2(30)
24   ,pre_registration_job            varchar2(30)
25   ,work_restriction                varchar2(2000)
26   ,attribute_category              varchar2(30)
27   ,attribute1                      varchar2(150)
28   ,attribute2                      varchar2(150)
29   ,attribute3                      varchar2(150)
30   ,attribute4                      varchar2(150)
31   ,attribute5                      varchar2(150)
32   ,attribute6                      varchar2(150)
33   ,attribute7                      varchar2(150)
34   ,attribute8                      varchar2(150)
35   ,attribute9                      varchar2(150)
36   ,attribute10                     varchar2(150)
37   ,attribute11                     varchar2(150)
38   ,attribute12                     varchar2(150)
39   ,attribute13                     varchar2(150)
40   ,attribute14                     varchar2(150)
41   ,attribute15                     varchar2(150)
42   ,attribute16                     varchar2(150)
43   ,attribute17                     varchar2(150)
44   ,attribute18                     varchar2(150)
45   ,attribute19                     varchar2(150)
46   ,attribute20                     varchar2(150)
47   ,attribute21                     varchar2(150)
48   ,attribute22                     varchar2(150)
49   ,attribute23                     varchar2(150)
50   ,attribute24                     varchar2(150)
51   ,attribute25                     varchar2(150)
52   ,attribute26                     varchar2(150)
53   ,attribute27                     varchar2(150)
54   ,attribute28                     varchar2(150)
55   ,attribute29                     varchar2(150)
56   ,attribute30                     varchar2(150)
57   ,dis_information_category        varchar2(30)
58   ,dis_information1                varchar2(150)
59   ,dis_information2                varchar2(150)
60   ,dis_information3                varchar2(150)
61   ,dis_information4                varchar2(150)
62   ,dis_information5                varchar2(150)
63   ,dis_information6                varchar2(150)
64   ,dis_information7                varchar2(150)
65   ,dis_information8                varchar2(150)
66   ,dis_information9                varchar2(150)
67   ,dis_information10               varchar2(150)
68   ,dis_information11               varchar2(150)
69   ,dis_information12               varchar2(150)
70   ,dis_information13               varchar2(150)
71   ,dis_information14               varchar2(150)
72   ,dis_information15               varchar2(150)
73   ,dis_information16               varchar2(150)
74   ,dis_information17               varchar2(150)
75   ,dis_information18               varchar2(150)
76   ,dis_information19               varchar2(150)
77   ,dis_information20               varchar2(150)
78   ,dis_information21               varchar2(150)
79   ,dis_information22               varchar2(150)
80   ,dis_information23               varchar2(150)
81   ,dis_information24               varchar2(150)
82   ,dis_information25               varchar2(150)
83   ,dis_information26               varchar2(150)
84   ,dis_information27               varchar2(150)
85   ,dis_information28               varchar2(150)
86   ,dis_information29               varchar2(150)
87   ,dis_information30               varchar2(150)
88   ,object_version_number           number(9)
89   );
90 --
91 -- ----------------------------------------------------------------------------
92 -- |           Global Definitions - Internal Development Use Only             |
93 -- ----------------------------------------------------------------------------
94 --
95 g_old_rec  g_rec_type;                            -- Global record definition
96 --
97 -- ----------------------------------------------------------------------------
98 -- |---------------------------< constraint_error >---------------------------|
99 -- ----------------------------------------------------------------------------
100 -- {Start Of Comments}
101 --
102 -- Description:
103 --   This procedure is called when a constraint has been violated (i.e.
104 --   The exception hr_api.check_integrity_violated,
105 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
106 --   hr_api.unique_integrity_violated has been raised).
107 --   The exceptions can only be raised as follows:
108 --   1) A check constraint can only be violated during an INSERT or UPDATE
109 --      dml operation.
110 --   2) A parent integrity constraint can only be violated during an
111 --      INSERT or UPDATE dml operation.
112 --   3) A child integrity constraint can only be violated during an
113 --      DELETE dml operation.
114 --   4) A unique integrity constraint can only be violated during INSERT or
115 --      UPDATE dml operation.
116 --
117 -- Prerequisites:
118 --   1) Either hr_api.check_integrity_violated,
119 --      hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
120 --      hr_api.unique_integrity_violated has been raised with the subsequent
121 --      stripping of the constraint name from the generated error message
122 --      text.
123 --   2) Standalone validation test which corresponds with a constraint error.
124 --
125 -- In Parameter:
126 --   p_constraint_name is in upper format and is just the constraint name
127 --   (e.g. not prefixed by brackets, schema owner etc).
128 --
129 -- Post Success:
130 --   Development dependant.
131 --
132 -- Post Failure:
133 --   Developement dependant.
134 --
135 -- Developer Implementation Notes:
136 --   For each constraint being checked the hr system package failure message
137 --   has been generated as a template only. These system error messages should
138 --   be modified as required (i.e. change the system failure message to a user
139 --   friendly defined error message).
140 --
141 -- Access Status:
142 --   Internal Development Use Only.
143 --
144 -- {End Of Comments}
145 -- ----------------------------------------------------------------------------
146 Procedure constraint_error
147   (p_constraint_name in all_constraints.constraint_name%TYPE);
148 --
149 -- ----------------------------------------------------------------------------
150 -- |-----------------------------< api_updating >-----------------------------|
151 -- ----------------------------------------------------------------------------
152 --  {Start Of Comments}
153 --
154 -- Description:
155 --   This function is used to populate the g_old_rec record with the
156 --   current row from the database for the specified primary key
157 --   provided that the primary key exists and is valid and does not
158 --   already match the current g_old_rec. The function will always return
159 --   a TRUE value if the g_old_rec is populated with the current row.
160 --   A FALSE value will be returned if all of the primary key arguments
161 --   are null.
162 --
163 -- Prerequisites:
164 --   None.
165 --
166 -- In Parameters:
167 --
168 -- Post Success:
169 --   A value of TRUE will be returned indiciating that the g_old_rec
170 --   is current.
171 --   A value of FALSE will be returned if all of the primary key arguments
172 --   have a null value (this indicates that the row has not be inserted into
173 --   the Schema), and therefore could never have a corresponding row.
174 --
175 -- Post Failure:
176 --   A failure can only occur under two circumstances:
177 --   1) The primary key is invalid (i.e. a row does not exist for the
178 --      specified primary key values).
179 --   2) If an object_version_number exists but is NOT the same as the current
180 --      g_old_rec value.
181 --
182 -- Developer Implementation Notes:
183 --   None.
184 --
185 -- Access Status:
186 --   Internal Development Use Only.
187 --
188 -- {End Of Comments}
189 -- ----------------------------------------------------------------------------
190 Function api_updating
191   (p_effective_date                   in date
192   ,p_disability_id                    in number
193   ,p_object_version_number            in number
194   ) Return Boolean;
195 --
196 -- ----------------------------------------------------------------------------
197 -- |---------------------------< find_dt_upd_modes >--------------------------|
198 -- ----------------------------------------------------------------------------
199 -- {Start Of Comments}
200 --
201 -- Description:
202 --   This procedure is used to determine what datetrack update modes are
203 --   allowed as of the effective date for this entity. The procedure will
204 --   return a corresponding Boolean value for each of the update modes
205 --   available where TRUE indicates that the corresponding update mode
206 --   is available.
207 --
208 -- Prerequisites:
209 --   None.
210 --
211 -- In Parameters:
212 --   p_effective_date
213 --     Specifies the date at which the datetrack modes will be operated on.
214 --   p_base_key_value
215 --     Specifies the primary key value for this datetrack entity.
216 --     (E.g. For this entity the assignment of the argument would be:
217 --           p_base_key_value = :disability_id).
218 --
219 -- Post Success:
220 --   Processing continues.
221 --
222 -- Post Failure:
223 --   Failure might occur if for the specified effective date and primary key
224 --   value a row doesn't exist.
225 --
226 -- Developer Implementation Notes:
227 --   This procedure could require changes if this entity has any sepcific
228 --   delete restrictions.
229 --   For example, this entity might disallow the datetrack update mode of
230 --   UPDATE. To implement this you would have to set and return a Boolean
231 --   value of FALSE after the call to the dt_api.find_dt_upd_modes procedure.
232 --
233 -- Access Status:
234 --   Internal Development Use Only.
235 --
236 -- {End Of Comments}
237 -- ----------------------------------------------------------------------------
238 Procedure find_dt_upd_modes
239   (p_effective_date         in date
240   ,p_base_key_value         in number
241   ,p_correction             out nocopy boolean
242   ,p_update                 out nocopy boolean
243   ,p_update_override        out nocopy boolean
244   ,p_update_change_insert   out nocopy boolean
245   );
246 --
247 -- ----------------------------------------------------------------------------
248 -- |---------------------------< find_dt_del_modes >--------------------------|
249 -- ----------------------------------------------------------------------------
250 -- {Start Of Comments}
251 --
252 -- Description:
253 --   This procedure is used to determine what datetrack delete modes are
254 --   allowed as of the effective date for this entity. The procedure will
255 --   return a corresponding Boolean value for each of the delete modes
256 --   available where TRUE indicates that the corresponding delete mode is
257 --   available.
258 --
259 -- Prerequisites:
260 --   None.
261 --
262 -- In Parameters:
263 --   p_effective_date
264 --     Specifies the date at which the datetrack modes will be operated on.
265 --   p_base_key_value
266 --     Specifies the primary key value for this datetrack entity.
267 --     (E.g. For this entity the assignment of the argument would be:
268 --           p_base_key_value = :disability_id).
269 --
270 -- Post Success:
271 --   Processing continues.
272 --
273 -- Post Failure:
274 --   Failure might occur if for the specified effective date and primary key
275 --   value a row doesn't exist.
276 --
277 -- Developer Implementation Notes:
278 --   This procedure could require changes if this entity has any sepcific
279 --   delete restrictions.
280 --   For example, this entity might disallow the datetrack delete mode of
281 --   ZAP. To implement this you would have to set and return a Boolean value
282 --   of FALSE after the call to the dt_api.find_dt_del_modes procedure.
283 --
284 -- Access Status:
285 --   Internal Development Use Only.
286 --
287 -- {End Of Comments}
288 -- ----------------------------------------------------------------------------
289 Procedure find_dt_del_modes
290   (p_effective_date        in date
291   ,p_base_key_value        in number
292   ,p_zap                   out nocopy boolean
293   ,p_delete                out nocopy boolean
294   ,p_future_change         out nocopy boolean
295   ,p_delete_next_change    out nocopy boolean
296   );
297 --
298 -- ----------------------------------------------------------------------------
299 -- |-----------------------< upd_effective_end_date >-------------------------|
300 -- ----------------------------------------------------------------------------
301 -- {Start Of Comments}
302 --
303 -- Description:
304 --   This procedure will update the specified datetrack row with the
305 --   specified new effective end date. The object version number is also
306 --   set to the next object version number. DateTrack modes which call
307 --   this procedure are: UPDATE, UPDATE_CHANGE_INSERT,
308 --   UPDATE_OVERRIDE, DELETE, FUTURE_CHANGE and DELETE_NEXT_CHANGE.
309 --   This is an internal datetrack maintenance procedure which should
310 --   not be modified in anyway.
311 --
312 -- Prerequisites:
313 --   None.
314 --
315 -- In Parameters:
316 --   p_new_effective_end_date
317 --     Specifies the new effective end date which will be set for the
318 --     row as of the effective date.
319 --   p_base_key_value
320 --     Specifies the primary key value for this datetrack entity.
321 --     (E.g. For this entity the assignment of the argument would be:
322 --           p_base_key_value = :disability_id).
323 --
324 -- Post Success:
325 --   The specified row will be updated with the new effective end date and
326 --   object_version_number.
327 --
328 -- Post Failure:
329 --   Failure might occur if for the specified effective date and primary key
330 --   value a row doesn't exist.
331 --
332 -- Developer Implementation Notes:
333 --   This is an internal datetrack maintenance procedure which should
334 --   not be modified in anyway.
335 --
336 -- Access Status:
337 --   Internal Row Handler Use Only.
338 --
339 -- {End Of Comments}
343   ,p_base_key_value         in number
340 -- ----------------------------------------------------------------------------
341 Procedure upd_effective_end_date
342   (p_effective_date         in date
344   ,p_new_effective_end_date in date
345   ,p_validation_start_date  in date
346   ,p_validation_end_date    in date
347   ,p_object_version_number  out nocopy number
348   );
349 --
350 -- ----------------------------------------------------------------------------
351 -- |---------------------------------< lck >----------------------------------|
352 -- ----------------------------------------------------------------------------
353 -- {Start Of Comments}
354 --
355 -- Description:
356 --   The Lck process for datetrack is complicated and comprises of the
357 --   following processing
358 --   The processing steps are as follows:
359 --   1) The row to be updated or deleted must be locked.
360 --      By locking this row, the g_old_rec record data type is populated.
361 --   2) If a comment exists the text is selected from hr_comments.
362 --   3) The datetrack mode is then validated to ensure the operation is
363 --      valid. If the mode is valid the validation start and end dates for
364 --      the mode will be derived and returned. Any required locking is
365 --      completed when the datetrack mode is validated.
366 --
367 -- Prerequisites:
368 --   When attempting to call the lck procedure the object version number,
369 --   primary key, effective date and datetrack mode must be specified.
370 --
371 -- In Parameters:
372 --   p_effective_date
373 --     Specifies the date of the datetrack update operation.
374 --   p_datetrack_mode
375 --     Determines the datetrack update or delete mode.
376 --
377 -- Post Success:
378 --   On successful completion of the Lck process the row to be updated or
379 --   deleted will be locked and selected into the global data structure
380 --   g_old_rec.
381 --
382 -- Post Failure:
383 --   The Lck process can fail for three reasons:
384 --   1) When attempting to lock the row the row could already be locked by
385 --      another user. This will raise the HR_Api.Object_Locked exception.
386 --   2) The row which is required to be locked doesn't exist in the HR Schema.
387 --      This error is trapped and reported using the message name
388 --      'HR_7220_INVALID_PRIMARY_KEY'.
389 --   3) The row although existing in the HR Schema has a different object
390 --      version number than the object version number specified.
391 --      This error is trapped and reported using the message name
392 --      'HR_7155_OBJECT_INVALID'.
393 --
394 -- Developer Implementation Notes:
395 --   None.
396 --
397 -- Access Status:
398 --   Internal Development Use Only.
399 --
400 -- {End Of Comments}
401 -- ----------------------------------------------------------------------------
402 Procedure lck
403   (p_effective_date                   in date
404   ,p_datetrack_mode                   in varchar2
405   ,p_disability_id                    in number
406   ,p_object_version_number            in number
407   ,p_validation_start_date            out nocopy date
408   ,p_validation_end_date              out nocopy date
409   );
410 --
411 -- ----------------------------------------------------------------------------
412 -- |-----------------------------< convert_args >-----------------------------|
413 -- ----------------------------------------------------------------------------
414 -- {Start Of Comments}
415 --
416 -- Description:
417 --   This function is used to turn attribute parameters into the record
418 --   structure parameter g_rec_type.
419 --
420 -- Prerequisites:
421 --   This is a private function and can only be called from the ins or upd
422 --   attribute processes.
423 --
424 -- In Parameters:
425 --
426 -- Post Success:
427 --   A returning record structure will be returned.
428 --
429 -- Post Failure:
430 --   No direct error handling is required within this function.  Any possible
431 --   errors within this function will be a PL/SQL value error due to conversion
432 --   of datatypes or data lengths.
433 --
434 -- Developer Implementation Notes:
435 --   None.
436 --
437 -- Access Status:
438 --   Internal Row Handler Use Only.
439 --
440 -- {End Of Comments}
441 -- ----------------------------------------------------------------------------
442 Function convert_args
443   (p_disability_id                  in number
444   ,p_effective_start_date           in date
445   ,p_effective_end_date             in date
446   ,p_person_id                      in number
447   ,p_incident_id                    in number
448   ,p_organization_id                in number
449   ,p_registration_id                in varchar2
450   ,p_registration_date              in date
451   ,p_registration_exp_date          in date
452   ,p_category                       in varchar2
453   ,p_status                         in varchar2
454   ,p_description                    in varchar2
455   ,p_degree                         in number
456   ,p_quota_fte                      in number
457   ,p_reason                         in varchar2
458   ,p_pre_registration_job           in varchar2
459   ,p_work_restriction               in varchar2
460   ,p_attribute_category             in varchar2
461   ,p_attribute1                     in varchar2
462   ,p_attribute2                     in varchar2
466   ,p_attribute6                     in varchar2
463   ,p_attribute3                     in varchar2
464   ,p_attribute4                     in varchar2
465   ,p_attribute5                     in varchar2
467   ,p_attribute7                     in varchar2
468   ,p_attribute8                     in varchar2
469   ,p_attribute9                     in varchar2
470   ,p_attribute10                    in varchar2
471   ,p_attribute11                    in varchar2
472   ,p_attribute12                    in varchar2
473   ,p_attribute13                    in varchar2
474   ,p_attribute14                    in varchar2
475   ,p_attribute15                    in varchar2
476   ,p_attribute16                    in varchar2
477   ,p_attribute17                    in varchar2
478   ,p_attribute18                    in varchar2
479   ,p_attribute19                    in varchar2
480   ,p_attribute20                    in varchar2
481   ,p_attribute21                    in varchar2
482   ,p_attribute22                    in varchar2
483   ,p_attribute23                    in varchar2
484   ,p_attribute24                    in varchar2
485   ,p_attribute25                    in varchar2
486   ,p_attribute26                    in varchar2
487   ,p_attribute27                    in varchar2
488   ,p_attribute28                    in varchar2
489   ,p_attribute29                    in varchar2
490   ,p_attribute30                    in varchar2
491   ,p_dis_information_category       in varchar2
492   ,p_dis_information1               in varchar2
493   ,p_dis_information2               in varchar2
494   ,p_dis_information3               in varchar2
495   ,p_dis_information4               in varchar2
496   ,p_dis_information5               in varchar2
497   ,p_dis_information6               in varchar2
498   ,p_dis_information7               in varchar2
499   ,p_dis_information8               in varchar2
500   ,p_dis_information9               in varchar2
501   ,p_dis_information10              in varchar2
502   ,p_dis_information11              in varchar2
503   ,p_dis_information12              in varchar2
504   ,p_dis_information13              in varchar2
505   ,p_dis_information14              in varchar2
506   ,p_dis_information15              in varchar2
507   ,p_dis_information16              in varchar2
508   ,p_dis_information17              in varchar2
509   ,p_dis_information18              in varchar2
510   ,p_dis_information19              in varchar2
511   ,p_dis_information20              in varchar2
512   ,p_dis_information21              in varchar2
513   ,p_dis_information22              in varchar2
514   ,p_dis_information23              in varchar2
515   ,p_dis_information24              in varchar2
516   ,p_dis_information25              in varchar2
517   ,p_dis_information26              in varchar2
518   ,p_dis_information27              in varchar2
519   ,p_dis_information28              in varchar2
520   ,p_dis_information29              in varchar2
521   ,p_dis_information30              in varchar2
522   ,p_object_version_number          in number
523   )
524   Return g_rec_type;
525 --
526 end per_dis_shd;