DBA Data[Home] [Help]

PACKAGE: APPS.PER_SPP_SHD

Source


1 Package per_spp_shd as
2 /* $Header: pespprhi.pkh 120.1 2005/12/12 21:15:29 vbanner noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |                    Global Record Type Specification                      |
6 -- ----------------------------------------------------------------------------
7 --
8 Type g_rec_type Is Record
9   (placement_id                    number(15)
10   ,effective_start_date            date
11   ,effective_end_date              date
12   ,business_group_id               number(15)
13   ,assignment_id                   number(10)
14   ,step_id                         number(15)
15   ,auto_increment_flag             varchar2(30)
16   ,parent_spine_id                 number(15)
17   ,reason                          varchar2(30)
18   ,request_id                      number(15)
19   ,program_application_id          number(15)
20   ,program_id                      number(15)
21   ,program_update_date             date
22   ,increment_number                number
23   ,information1                    varchar2(150)
24   ,information2                    varchar2(150)
25   ,information3                    varchar2(150)
26   ,information4                    varchar2(150)
27   ,information5                    varchar2(150)
28   ,information6                    varchar2(150)
29   ,information7                    varchar2(150)
30   ,information8                    varchar2(150)
31   ,information9                    varchar2(150)
32   ,information10                   varchar2(150)
33   ,information11                   varchar2(150)
34   ,information12                   varchar2(150)
35   ,information13                   varchar2(150)
36   ,information14                   varchar2(150)
37   ,information15                   varchar2(150)
38   ,information16                   varchar2(150)
39   ,information17                   varchar2(150)
40   ,information18                   varchar2(150)
41   ,information19                   varchar2(150)
42   ,information20                   varchar2(150)
43   ,information21                   varchar2(150)
44   ,information22                   varchar2(150)
45   ,information23                   varchar2(150)
46   ,information24                   varchar2(150)
47   ,information25                   varchar2(150)
48   ,information26                   varchar2(150)
49   ,information27                   varchar2(150)
50   ,information28                   varchar2(150)
51   ,information29                   varchar2(150)
52   ,information30                   varchar2(150)
53   ,information_category            varchar2(30)
54   ,object_version_number           number
55   );
56 --
57 -- ----------------------------------------------------------------------------
58 -- |           Global Definitions - Internal Development Use Only             |
59 -- ----------------------------------------------------------------------------
60 --
61 g_old_rec  g_rec_type;                            -- Global record definition
62 g_api_dml  boolean;                               -- Global api dml status
63 --
64 -- ----------------------------------------------------------------------------
65 -- |------------------------< return_api_dml_status >-------------------------|
66 -- ----------------------------------------------------------------------------
67 -- {Start Of Comments}
68 --
69 -- Description:
70 --   This function will return the current g_api_dml private global
71 --   boolean status.
72 --   The g_api_dml status determines if at the time of the function
73 --   being executed if a dml statement (i.e. INSERT, UPDATE or DELETE)
74 --   is being issued from within an api.
75 --   If the status is TRUE then a dml statement is being issued from
76 --   within this entity api.
77 --   This function is primarily to support database triggers which
78 --   need to maintain the object_version_number for non-supported
79 --   dml statements (i.e. dml statement issued outside of the api layer).
80 --
81 -- Prerequisites:
82 --   None.
83 --
84 -- In Parameters:
85 --   None.
86 --
87 -- Post Success:
88 --   Processing continues.
89 --   If the function returns a TRUE value then, dml is being executed from
90 --   within this api.
91 --
92 -- Post Failure:
93 --   None.
94 --
95 -- Access Status:
96 --   Internal Row Handler Use Only.
97 --
98 -- {End Of Comments}
99 -- ----------------------------------------------------------------------------
100 Function return_api_dml_status Return Boolean;
101 --
102 -- ----------------------------------------------------------------------------
103 -- |---------------------------< constraint_error >---------------------------|
104 -- ----------------------------------------------------------------------------
105 -- {Start Of Comments}
106 --
107 -- Description:
108 --   This procedure is called when a constraint has been violated (i.e.
109 --   The exception hr_api.check_integrity_violated,
110 --   hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
111 --   hr_api.unique_integrity_violated has been raised).
112 --   The exceptions can only be raised as follows:
113 --   1) A check constraint can only be violated during an INSERT or UPDATE
114 --      dml operation.
115 --   2) A parent integrity constraint can only be violated during an
116 --      INSERT or UPDATE dml operation.
117 --   3) A child integrity constraint can only be violated during an
118 --      DELETE dml operation.
119 --   4) A unique integrity constraint can only be violated during INSERT or
120 --      UPDATE dml operation.
121 --
122 -- Prerequisites:
123 --   1) Either hr_api.check_integrity_violated,
124 --      hr_api.parent_integrity_violated, hr_api.child_integrity_violated or
125 --      hr_api.unique_integrity_violated has been raised with the subsequent
126 --      stripping of the constraint name from the generated error message
127 --      text.
128 --   2) Standalone validation test which corresponds with a constraint error.
129 --
130 -- In Parameter:
131 --   p_constraint_name is in upper format and is just the constraint name
132 --   (e.g. not prefixed by brackets, schema owner etc).
133 --
134 -- Post Success:
135 --   Development dependant.
136 --
137 -- Post Failure:
138 --   Developement dependant.
139 --
140 -- Developer Implementation Notes:
141 --   For each constraint being checked the hr system package failure message
142 --   has been generated as a template only. These system error messages should
143 --   be modified as required (i.e. change the system failure message to a user
144 --   friendly defined error message).
145 --
146 -- Access Status:
147 --   Internal Development Use Only.
148 --
149 -- {End Of Comments}
150 -- ----------------------------------------------------------------------------
151 Procedure constraint_error
152   (p_constraint_name in all_constraints.constraint_name%TYPE);
153 --
154 -- ----------------------------------------------------------------------------
155 -- |-----------------------------< api_updating >-----------------------------|
156 -- ----------------------------------------------------------------------------
157 --  {Start Of Comments}
158 --
159 -- Description:
160 --   This function is used to populate the g_old_rec record with the
161 --   current row from the database for the specified primary key
162 --   provided that the primary key exists and is valid and does not
163 --   already match the current g_old_rec. The function will always return
164 --   a TRUE value if the g_old_rec is populated with the current row.
165 --   A FALSE value will be returned if all of the primary key arguments
166 --   are null.
167 --
168 -- Prerequisites:
169 --   None.
170 --
171 -- In Parameters:
172 --
173 -- Post Success:
174 --   A value of TRUE will be returned indiciating that the g_old_rec
175 --   is current.
176 --   A value of FALSE will be returned if all of the primary key arguments
177 --   have a null value (this indicates that the row has not be inserted into
178 --   the Schema), and therefore could never have a corresponding row.
179 --
180 -- Post Failure:
181 --   A failure can only occur under two circumstances:
182 --   1) The primary key is invalid (i.e. a row does not exist for the
183 --      specified primary key values).
184 --   2) If an object_version_number exists but is NOT the same as the current
185 --      g_old_rec value.
186 --
187 -- Developer Implementation Notes:
188 --   None.
189 --
190 -- Access Status:
191 --   Internal Development Use Only.
192 --
193 -- {End Of Comments}
194 -- ----------------------------------------------------------------------------
195 Function api_updating
196   (p_effective_date                   in date
197   ,p_placement_id                     in number
198   ,p_object_version_number            in number
199   ) Return Boolean;
200 --
201 -- ----------------------------------------------------------------------------
202 -- |---------------------------< find_dt_upd_modes >--------------------------|
203 -- ----------------------------------------------------------------------------
204 -- {Start Of Comments}
205 --
206 -- Description:
207 --   This procedure is used to determine what datetrack update modes are
208 --   allowed as of the effective date for this entity. The procedure will
209 --   return a corresponding Boolean value for each of the update modes
210 --   available where TRUE indicates that the corresponding update mode
211 --   is available.
212 --
213 -- Prerequisites:
214 --   None.
215 --
216 -- In Parameters:
217 --   p_effective_date
218 --     Specifies the date at which the datetrack modes will be operated on.
219 --   p_base_key_value
220 --     Specifies the primary key value for this datetrack entity.
221 --     (E.g. For this entity the assignment of the argument would be:
222 --           p_base_key_value = :placement_id).
223 --
224 -- Post Success:
225 --   Processing continues.
226 --
227 -- Post Failure:
228 --   Failure might occur if for the specified effective date and primary key
229 --   value a row doesn't exist.
230 --
231 -- Developer Implementation Notes:
232 --   This procedure could require changes if this entity has any sepcific
233 --   delete restrictions.
234 --   For example, this entity might disallow the datetrack update mode of
235 --   UPDATE. To implement this you would have to set and return a Boolean
236 --   value of FALSE after the call to the dt_api.find_dt_upd_modes procedure.
237 --
238 -- Access Status:
239 --   Internal Development Use Only.
240 --
241 -- {End Of Comments}
242 -- ----------------------------------------------------------------------------
243 Procedure find_dt_upd_modes
244   (p_effective_date         in date
245   ,p_base_key_value         in number
246   ,p_correction             out nocopy boolean
247   ,p_update                 out nocopy boolean
248   ,p_update_override        out nocopy boolean
249   ,p_update_change_insert   out nocopy boolean
250   );
251 --
252 -- ----------------------------------------------------------------------------
253 -- |---------------------------< find_dt_del_modes >--------------------------|
254 -- ----------------------------------------------------------------------------
255 -- {Start Of Comments}
256 --
257 -- Description:
258 --   This procedure is used to determine what datetrack delete modes are
259 --   allowed as of the effective date for this entity. The procedure will
260 --   return a corresponding Boolean value for each of the delete modes
261 --   available where TRUE indicates that the corresponding delete mode is
262 --   available.
263 --
264 -- Prerequisites:
265 --   None.
266 --
267 -- In Parameters:
268 --   p_effective_date
269 --     Specifies the date at which the datetrack modes will be operated on.
270 --   p_base_key_value
271 --     Specifies the primary key value for this datetrack entity.
272 --     (E.g. For this entity the assignment of the argument would be:
273 --           p_base_key_value = :placement_id).
274 --
275 -- Post Success:
276 --   Processing continues.
277 --
278 -- Post Failure:
279 --   Failure might occur if for the specified effective date and primary key
280 --   value a row doesn't exist.
281 --
282 -- Developer Implementation Notes:
283 --   This procedure could require changes if this entity has any sepcific
284 --   delete restrictions.
285 --   For example, this entity might disallow the datetrack delete mode of
286 --   ZAP. To implement this you would have to set and return a Boolean value
287 --   of FALSE after the call to the dt_api.find_dt_del_modes procedure.
288 --
289 -- Access Status:
290 --   Internal Development Use Only.
291 --
292 -- {End Of Comments}
293 -- ----------------------------------------------------------------------------
294 Procedure find_dt_del_modes
295   (p_effective_date        in date
296   ,p_base_key_value        in number
297   ,p_zap                   out nocopy boolean
298   ,p_delete                out nocopy boolean
299   ,p_future_change         out nocopy boolean
300   ,p_delete_next_change    out nocopy boolean
301   );
302 --
303 -- ----------------------------------------------------------------------------
304 -- |-----------------------< upd_effective_end_date >-------------------------|
305 -- ----------------------------------------------------------------------------
306 -- {Start Of Comments}
307 --
308 -- Description:
309 --   This procedure will update the specified datetrack row with the
310 --   specified new effective end date. The object version number is also
311 --   set to the next object version number. DateTrack modes which call
312 --   this procedure are: UPDATE, UPDATE_CHANGE_INSERT,
313 --   UPDATE_OVERRIDE, DELETE, FUTURE_CHANGE and DELETE_NEXT_CHANGE.
314 --   This is an internal datetrack maintenance procedure which should
315 --   not be modified in anyway.
316 --
317 -- Prerequisites:
318 --   None.
319 --
320 -- In Parameters:
321 --   p_new_effective_end_date
322 --     Specifies the new effective end date which will be set for the
323 --     row as of the effective date.
324 --   p_base_key_value
325 --     Specifies the primary key value for this datetrack entity.
326 --     (E.g. For this entity the assignment of the argument would be:
327 --           p_base_key_value = :placement_id).
328 --
329 -- Post Success:
330 --   The specified row will be updated with the new effective end date and
331 --   object_version_number.
332 --
333 -- Post Failure:
334 --   Failure might occur if for the specified effective date and primary key
335 --   value a row doesn't exist.
336 --
337 -- Developer Implementation Notes:
338 --   This is an internal datetrack maintenance procedure which should
339 --   not be modified in anyway.
340 --
341 -- Access Status:
342 --   Internal Row Handler Use Only.
343 --
344 -- {End Of Comments}
345 -- ----------------------------------------------------------------------------
346 Procedure upd_effective_end_date
347   (p_effective_date         in date
348   ,p_base_key_value         in number
349   ,p_new_effective_end_date in date
350   ,p_validation_start_date  in date
351   ,p_validation_end_date    in date
352   ,p_object_version_number  out nocopy number
353   );
354 --
355 -- ----------------------------------------------------------------------------
356 -- |---------------------------------< lck >----------------------------------|
357 -- ----------------------------------------------------------------------------
358 -- {Start Of Comments}
359 --
360 -- Description:
361 --   The Lck process for datetrack is complicated and comprises of the
362 --   following processing
363 --   The processing steps are as follows:
364 --   1) The row to be updated or deleted must be locked.
365 --      By locking this row, the g_old_rec record data type is populated.
366 --   2) If a comment exists the text is selected from hr_comments.
367 --   3) The datetrack mode is then validated to ensure the operation is
368 --      valid. If the mode is valid the validation start and end dates for
372 -- Prerequisites:
369 --      the mode will be derived and returned. Any required locking is
370 --      completed when the datetrack mode is validated.
371 --
373 --   When attempting to call the lck procedure the object version number,
374 --   primary key, effective date and datetrack mode must be specified.
375 --
376 -- In Parameters:
377 --   p_effective_date
378 --     Specifies the date of the datetrack update operation.
379 --   p_datetrack_mode
380 --     Determines the datetrack update or delete mode.
381 --
382 -- Post Success:
383 --   On successful completion of the Lck process the row to be updated or
384 --   deleted will be locked and selected into the global data structure
385 --   g_old_rec.
386 --
387 -- Post Failure:
388 --   The Lck process can fail for three reasons:
389 --   1) When attempting to lock the row the row could already be locked by
390 --      another user. This will raise the HR_Api.Object_Locked exception.
391 --   2) The row which is required to be locked doesn't exist in the HR Schema.
392 --      This error is trapped and reported using the message name
393 --      'HR_7220_INVALID_PRIMARY_KEY'.
394 --   3) The row although existing in the HR Schema has a different object
395 --      version number than the object version number specified.
396 --      This error is trapped and reported using the message name
397 --      'HR_7155_OBJECT_INVALID'.
398 --
399 -- Developer Implementation Notes:
400 --   None.
401 --
402 -- Access Status:
403 --   Internal Development Use Only.
404 --
405 -- {End Of Comments}
406 -- ----------------------------------------------------------------------------
407 Procedure lck
408   (p_effective_date                   in date
409   ,p_datetrack_mode                   in varchar2 default hr_api.g_update
410   ,p_placement_id                     in number
411   ,p_object_version_number            in number
412   ,p_validation_start_date            out nocopy date
413   ,p_validation_end_date              out nocopy date
414   );
415 --
416 -- ----------------------------------------------------------------------------
417 -- |-----------------------------< convert_args >-----------------------------|
418 -- ----------------------------------------------------------------------------
419 -- {Start Of Comments}
420 --
421 -- Description:
422 --   This function is used to turn attribute parameters into the record
423 --   structure parameter g_rec_type.
424 --
425 -- Prerequisites:
426 --   This is a private function and can only be called from the ins or upd
427 --   attribute processes.
428 --
429 -- In Parameters:
430 --
431 -- Post Success:
432 --   A returning record structure will be returned.
433 --
434 -- Post Failure:
435 --   No direct error handling is required within this function.  Any possible
436 --   errors within this function will be a PL/SQL value error due to conversion
437 --   of datatypes or data lengths.
438 --
439 -- Developer Implementation Notes:
440 --   None.
441 --
442 -- Access Status:
443 --   Internal Row Handler Use Only.
444 --
445 -- {End Of Comments}
446 -- ----------------------------------------------------------------------------
447 Function convert_args
448   (p_placement_id                   in number
449   ,p_effective_start_date           in date
450   ,p_effective_end_date             in date
451   ,p_business_group_id              in number
452   ,p_assignment_id                  in number
453   ,p_step_id                        in number
454   ,p_auto_increment_flag            in varchar2
455   ,p_parent_spine_id                in number
456   ,p_reason                         in varchar2
457   ,p_request_id                     in number
458   ,p_program_application_id         in number
459   ,p_program_id                     in number
460   ,p_program_update_date            in date
461   ,p_increment_number               in number
462   ,p_information1                   in varchar2
463   ,p_information2                   in varchar2
464   ,p_information3                   in varchar2
465   ,p_information4                   in varchar2
466   ,p_information5                   in varchar2
467   ,p_information6                   in varchar2
468   ,p_information7                   in varchar2
469   ,p_information8                   in varchar2
470   ,p_information9                   in varchar2
471   ,p_information10                  in varchar2
472   ,p_information11                  in varchar2
473   ,p_information12                  in varchar2
474   ,p_information13                  in varchar2
475   ,p_information14                  in varchar2
476   ,p_information15                  in varchar2
477   ,p_information16                  in varchar2
478   ,p_information17                  in varchar2
479   ,p_information18                  in varchar2
480   ,p_information19                  in varchar2
481   ,p_information20                  in varchar2
482   ,p_information21                  in varchar2
483   ,p_information22                  in varchar2
484   ,p_information23                  in varchar2
485   ,p_information24                  in varchar2
486   ,p_information25                  in varchar2
487   ,p_information26                  in varchar2
488   ,p_information27                  in varchar2
489   ,p_information28                  in varchar2
490   ,p_information29                  in varchar2
491   ,p_information30                  in varchar2
492   ,p_information_category           in varchar2
493   ,p_object_version_number          in number
494   )
495   Return g_rec_type;
496 --
497 end per_spp_shd;