DBA Data[Home] [Help]

PACKAGE: APPS.BEN_ECV_SHD

Source


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