DBA Data[Home] [Help]

PACKAGE: APPS.DT_CLIENT_SUPPORT_UTILITY

Source


1 Package dt_client_support_utility AUTHID CURRENT_USER As
2 /* $Header: dtclsutl.pkh 120.0 2005/05/27 23:10:37 appldev noship $ */
3 --
4 -- ----------------------------------------------------------------------------
5 -- |---------------------------< get_update_mode_list >-----------------------|
6 -- ----------------------------------------------------------------------------
7 -- {Start Of Comments}
8 --
9 -- Description:
10 --   This procedure is used to determine which datetrack update modes are
11 --   allowed as of a specific date for particular entity and row. This
12 --   procedure will return a Boolean value for each of the DateTrack
13 --   update modes. A TRUE value indicates that the corresponding update mode
14 --   is available.
15 --
16 -- Pre-Requisities:
17 --   The package procedure specified in the p_package_name and
18 --   p_procedure_name parameter must exist in the database. The package
19 --   procedure must have the following parameters defined:
20 --     P_EFFECTIVE_DATE       IN     DATE
21 --     P_BASE_KEY_VALUE       IN     NUMBER
22 --     P_CORRECTION              OUT BOOLEAN
23 --     P_UPDATE                  OUT BOOLEAN
24 --     P_UPDATE_OVERRIDE         OUT BOOLEAN
25 --     P_UPDATE_CHANGE_INSERT    OUT BOOLEAN
26 --
27 -- In Parameters:
28 --   Name                           Reqd Type     Description
29 --   p_effective_date               Yes  date     Effective date of the update
30 --                                                operation.
31 --   p_package_name                 Yes  varchar2 Name of the stored package
32 --                                                to be called.
33 --   p_procedure_name               Yes  varchar2 Name of the find_dt_upd_modes
34 --                                                procedure to call in the
35 --                                                p_package_name package.
36 --   p_base_key_value               Yes  number   The row identifier value
37 --                                                which needs to be passed to
38 --                                                the p_package_name package,
39 --                                                p_procedure_name procedure.
40 --
41 -- Post Success:
42 --   The corresponding OUT parameter for each DateTrack delete mode, will
43 --   indicate if it can be used for the specified row (p_base_key_value) as
44 --   of the specified date (p_effective_date).
45 --
46 --   Name                           Type     Description
47 --   p_correction                   boolean  Set to TRUE if the CORRECTION
48 --                                           DateTrack mode is available.
49 --                                           Otherwise set to FALSE.
50 --   p_update                       boolean  Set to TRUE if the UPDATE
51 --                                           DateTrack mode is available.
52 --                                           Otherwise set to FALSE.
53 --   p_update_override              boolean  Set to TRUE if the UPDATE_OVERRIDE
54 --                                           DateTrack mode is available.
55 --                                           Otherwise set to FALSE.
56 --   p_update_change_insert         boolean  Set to TRUE if the
57 --                                           UPDATE_CHANGE_INSERT
58 --                                           DateTrack mode is available.
59 --                                           Otherwise set to FALSE.
60 --
61 -- Post Failure:
62 --   An Oracle or application error message will be raised.
63 --
64 -- Developer Implementation Notes:
65 --   This procedure should only be called from the DTCSAPI Forms library.
66 --   If a list of valid update modes is required in any other case then the
67 --   correspond row handler find_dt_upd_modes procedure should be called
68 --   directly.
69 --
70 -- Access Status:
71 --   Internal Development Use Only.
72 --
73 -- {End Of Comments}
74 --
75 procedure get_update_mode_list
76   (p_effective_date                in     date
77   ,p_package_name                  in     varchar2
78   ,p_procedure_name                in     varchar2
79   ,p_base_key_value                in     number
80   ,p_correction                       out nocopy boolean
81   ,p_update                           out nocopy boolean
82   ,p_update_override                  out nocopy boolean
83   ,p_update_change_insert             out nocopy boolean
84   );
85 --
86 -- ----------------------------------------------------------------------------
87 -- |---------------------------< get_delete_mode_list >-----------------------|
88 -- ----------------------------------------------------------------------------
89 -- {Start Of Comments}
90 --
91 -- Description:
92 --   This procedure is used to determine which datetrack delete modes are
93 --   allowed as of a specific date for particular entity and row. This
94 --   procedure will return a Boolean value for each of the DateTrack
95 --   delete modes. A TRUE value indicates that the corresponding delete mode
96 --   is available.
97 --
98 -- Pre-Requisities:
99 --   The package procedure specified in the p_package_name and
100 --   p_procedure_name parameter must exist in the database. The package
101 --   procedure must have the following parameters defined:
102 --     P_EFFECTIVE_DATE       IN     DATE
103 --     P_BASE_KEY_VALUE       IN     NUMBER
104 --     P_ZAP                     OUT BOOLEAN
105 --     P_DELETE                  OUT BOOLEAN
106 --     P_FUTURE_CHANGE           OUT BOOLEAN
107 --     P_DELETE_NEXT_CHANGE      OUT BOOLEAN
108 --
109 -- In Parameters:
110 --   Name                           Reqd Type     Description
111 --   p_effective_date               Yes  date     Effective date of the delete
112 --                                                operation.
113 --   p_package_name                 Yes  varchar2 Name of the stored package
114 --                                                to be called.
115 --   p_procedure_name               Yes  varchar2 Name of the find_dt_del_modes
116 --                                                procedure to call in the
117 --                                                p_package_name package.
118 --   p_base_key_value               Yes  number   The row identifier value
119 --                                                which needs to be passed to
120 --                                                the p_package_name package,
121 --                                                p_procedure_name procedure.
122 --
123 -- Post Success:
124 --   The corresponding OUT parameter for each DateTrack delete mode, will
125 --   indicate if it can be used for the specified row (p_base_key_value) as
126 --   of the specified date (p_effective_date).
127 --
128 --   Name                           Type     Description
129 --   p_zap                          boolean  Set to TRUE if the ZAP
130 --                                           DateTrack mode is available.
131 --                                           Otherwise set to FALSE.
132 --   p_delete                       boolean  Set to TRUE if the DELETE
133 --                                           DateTrack mode is available.
134 --                                           Otherwise set to FALSE.
135 --   p_future_change                boolean  Set to TRUE if the FUTURE_CHANGE
136 --                                           DateTrack mode is available.
137 --                                           Otherwise set to FALSE.
138 --   p_delete_next_change           boolean  Set to TRUE if the
139 --                                           DELETE_NEXT_CHANGE
140 --                                           DateTrack mode is available.
141 --                                           Otherwise set to FALSE.
142 --
143 -- Post Failure:
144 --   An Oracle or application error message will be raised.
145 --
146 -- Developer Implementation Notes:
147 --   This procedure should only be called from the DTCSAPI Forms library.
148 --   If a list of valid delete modes is required in any other case then the
149 --   correspond row handler find_dt_del_modes procedure should be called
150 --   directly.
151 --
152 -- Access Status:
153 --   Internal Development Use Only.
154 --
155 -- {End Of Comments}
156 --
157 procedure get_delete_mode_list
158   (p_effective_date                in     date
159   ,p_package_name                  in     varchar2
160   ,p_procedure_name                in     varchar2
161   ,p_base_key_value                in     number
162   ,p_zap                              out nocopy boolean
163   ,p_delete                           out nocopy boolean
164   ,p_future_change                    out nocopy boolean
165   ,p_delete_next_change               out nocopy boolean
166   );
167 --
168 -- ----------------------------------------------------------------------------
169 -- |-------------------------------< lock_record >----------------------------|
170 -- ----------------------------------------------------------------------------
171 -- {Start Of Comments}
172 --
173 -- Description:
174 --   This procedure takes out database locks as of a specific date,
175 --   for a particular entity and record.
176 --
177 -- Pre-Requisities:
178 --   The package procedure specified in the p_package_name and
179 --   p_procedure_name parameter must exist in the database. The package
180 --   procedure must have the following parameters defined.
181 --     P_EFFECTIVE_DATE         IN     DATE
182 --     P_DATETRACK_MODE         IN     VARCHAR2
183 --     p_<uid_item_name>        IN     NUMBER
184 --     P_OBJECT_VERSION_NUMBER  IN     NUMBER
185 --     P_VALIDATION_START_DATE     OUT DATE
186 --     P_VALIDATION_END_DATE       OUT DATE
187 --
188 -- In Parameters:
189 --   Name                           Reqd Type     Description
190 --   p_effective_date               Yes  date     Effective date of the lock
191 --                                                operation.
192 --   p_datetrack_mode               Yes  varchar2 DateTrack mode.
193 --   p_object_version_number        Yes  number   Object Version number of
194 --                                                the current record.
195 --   p_package_name                 Yes  varchar2 Name of the stored package
196 --                                                to be called.
197 --   p_procedure_name               Yes  varchar2 Name of the lck
198 --                                                procedure to call in the
199 --                                                p_package_name package.
200 --   p_uid_item_name                Yes  varchar2 Name of the unique ID
201 --                                                column name, without a "p_"
202 --                                                prefix.
203 --   p_base_key_value               Yes  number   The row identifier value
204 --                                                which needs to be passed into
205 --                                                the package procedure
206 --                                                "p_<p_uid_item_name>"
207 --                                                parameter.
208 --
209 -- Post Success:
210 --   The OUT parameter values indicate the date range the record is changing.
211 --   Any existing rows in the database which overlap this date range will
212 --   have been locked. Depending on the table and the DateTrack mode parent
213 --   table or child records will also be locked.
214 --
215 --   Name                           Type     Description
216 --   p_validation_start_date        date     The earliest day the record will
217 --                                           be changed for the specified
218 --                                           DateTrack mode.
219 --   p_validation_end_date          date     The latest day the record will
220 --                                           be changed for the specified
221 --                                           DateTrack mode.
222 --
223 -- Post Failure:
224 --   An Oracle or application error message will be raised and the database
225 --   locks will not be obtained.
226 --
227 -- Developer Implementation Notes:
228 --   This procedure should only be called from the DTCSAPI Forms library.
229 --   If a record locking is required in any other case then the correspond
230 --   row handler lck procedure should be called directly.
231 --
232 -- Access Status:
233 --   Internal Development Use Only.
234 --
235 -- {End Of Comments}
236 --
237 procedure lock_record
238   (p_effective_date                in     date
239   ,p_datetrack_mode                in     varchar2
240   ,p_object_version_number         in     number
241   ,p_package_name                  in     varchar2
242   ,p_procedure_name                in     varchar2
243   ,p_uid_item_name                 in     varchar2
244   ,p_base_key_value                in     number
245   ,p_validation_start_date            out nocopy date
246   ,p_validation_end_date              out nocopy date
247   );
248 --
249 -- ----------------------------------------------------------------------------
250 -- |---------------------------< get_update_modes_and_dates >-----------------------|
251 -- ----------------------------------------------------------------------------
252 -- {Start Of Comments}
253 --
254 -- Description:
255 --   This procedure is used to determine which datetrack update modes are
256 --   allowed as of a specific date for particular entity and row. This
257 --   procedure will return a value 1 for each of the DateTrack
258 --   update modes. Also returns the validation date range for each of the
259 --   applicable datetrack mode. This procedure will be called from the
260 --   Framework code to support datatracking.
261 --
262 -- Pre-Requisities:
263 --   The package procedure specified in the p_package_name and
264 --   p_procedure_name parameter must exist in the database. The package
265 --   procedure must have the following parameters defined:
266 --     P_EFFECTIVE_DATE       IN     DATE
267 --     P_BASE_KEY_VALUE       IN     NUMBER
268 --     P_CORRECTION              OUT NUMBER
269 --     P_UPDATE                  OUT NUMBER
270 --     P_UPDATE_OVERRIDE         OUT NUMBER
271 --     P_UPDATE_CHANGE_INSERT    OUT NUMBER
272 --     P_UPDATE_START_DATE       OUT DATE
273 --     P_UPDATE_END_DATE         OUT DATE
274 --     P_UPD_CHG_START_DATE      OUT DATE
275 --     P_UPD_CHG_END_DATE        OUT DATE
276 --     P_CORRRECT_START_DATE     OUT DATE
277 --     P_CORRECT_END_DATE        OUT DATE
278 --     P_OVERRIDE_START_DATE     OUT DATE
279 --     P_OVERRIDE_END_DATE       OUT DATE
280 --
281 
282 -- In Parameters:
283 --   Name                           Reqd Type     Description
284 --   p_effective_date               Yes  date     Effective date of the update
285 --                                                operation.
286 --   p_package_name                 Yes  varchar2 Name of the stored package
287 --                                                to be called.
288 --   p_procedure_name               Yes  varchar2 Name of the
289 --                                                find_dt_upd_modes_and_dates
290 --                                                procedure to call in the
291 --                                                p_package_name package.
292 --   p_base_key_value               Yes  number   The row identifier value
293 --                                                which needs to be passed to
294 --                                                the p_package_name package,
295 --                                                p_procedure_name procedure.
296 --
297 -- Post Success:
298 --   The corresponding OUT parameter for each DateTrack delete mode, will
299 --   indicate if it can be used for the specified row (p_base_key_value) as
300 --   of the specified date (p_effective_date).
301 --
302 --   Name                           Type     Description
303 --   p_correction                   NUMBER   Set to 1 if the CORRECTION
304 --                                           DateTrack mode is available.
305 --                                           Otherwise set to 0.
306 --   p_update                       NUMBER   Set to 1 if the UPDATE
307 --                                           DateTrack mode is available.
308 --                                           Otherwise set to 0.
309 --   p_update_override              NUMBER   Set to 1 if the UPDATE_OVERRIDE
310 --                                           DateTrack mode is available.
311 --                                           Otherwise set to 0.
312 --   p_update_change_insert         NUMBER   Set to 1 if the
313 --                                           UPDATE_CHANGE_INSERT
314 --                                           DateTrack mode is available.
315 --                                           Otherwise set to 0.
316 --   p_update_start_date            DATE     Set to validation start date for
317 --                                           the UPDATE mode. This is set only
318 --                                           when p_update parameter
319 --                                           is set to 1.
320 --   p_update_end_date              DATE     Set to validation end date for
321 --                                           the UPDATE mode. This is set only
322 --                                           when p_update parameter
323 --                                           is set to 1.
324 --   p_upd_chg_start_date           DATE     Set to validation start date for
325 --                                           the UPDATE_CHANGE_INSERT mode.
326 --                                           This is set only when
327 --                                           p_update_change_insert parameter
328 --                                           is set to 1.
329 --   p_upd_chg_end_date             DATE     Set to validation end date for
330 --                                           the UPDATE_CHANGE_INSERT mode.
331 --                                           This is set only when
332 --                                           p_update_change_insert parameter
333 --                                           is set to 1.
334 --   p_correction_start_date        DATE     Set to validation start date for
335 --                                           the CORRECTION mode. This is set
336 --                                           only when p_correction parameter
337 --                                           is set to 1.
338 --   p_correction_end_date          DATE     Set to validation end date for
339 --                                           the CORRECTION mode. This is set
340 --                                           only when p_correction parameter
341 --                                           is set to 1.
342 --   p_override_start_date          DATE     Set to validation start date for
343 --                                           the UPDATE_OVERRIDE mode. This is
344 --                                           set only p_update_override
345 --                                           parameter is set to 1.
346 --   p_override_end_date            DATE     Set to validation end date for
347 --                                           the UPDATE_OVERRIDE mode. This is
348 --                                           set only p_update_override
349 --                                           parameter is set to 1.
350 -- Post Failure:
351 --   An Oracle or application error message will be raised.
352 --
353 -- Developer Implementation Notes:
354 --   This procedure should only be called from the DT infractructure for
355 --   OAF based modules. If a list of valid update modes is required in
356 --   any other case then the correspond row handler find_dt_upd_modes
357 --   procedure should be called  directly.
358 --
359 -- Access Status:
360 --   Internal Development Use Only.
361 --
362 -- {End Of Comments}
363 --
364 procedure get_update_modes_and_dates
365   (p_effective_date                in     date
366   ,p_package_name                  in     varchar2
367   ,p_procedure_name                in     varchar2
368   ,p_base_key_value                in     number
369   ,p_correction                    out nocopy number
370   ,p_update                        out nocopy number
371   ,p_update_override               out nocopy number
372   ,p_update_change_insert          out nocopy number
373   ,p_correction_start_date         out nocopy date
374   ,p_correction_end_date           out nocopy date
375   ,p_update_start_date             out nocopy date
376   ,p_update_end_date               out nocopy date
377   ,p_override_start_date           out nocopy date
378   ,p_override_end_date             out nocopy date
379   ,p_upd_chg_start_date            out nocopy date
380   ,p_upd_chg_end_date              out nocopy date
381   );
382 --
383 -- ----------------------------------------------------------------------------
384 -- |---------------------< get_delete_modes_and_dates >-----------------------|
385 -- ----------------------------------------------------------------------------
386 -- {Start Of Comments}
387 --
388 -- Description:
389 --   This procedure is used to determine which datetrack delete modes are
390 --   allowed as of a specific date for particular entity and row. This
391 --   procedure will return a value 1 for each of the valid DateTrack
392 --   delete modes. Also returns the validation date range for each of the
393 --   applicable datetrack mode. This package will be called from the
394 --   Framework code to support datetracking.
395 --
396 -- Pre-Requisities:
397 --   The package procedure specified in the p_package_name and
398 --   p_procedure_name parameter must exist in the database. The package
399 --   procedure must have the following parameters defined:
403 --     P_DELETE                  OUT NUMBER
400 --     P_EFFECTIVE_DATE       IN     DATE
401 --     P_BASE_KEY_VALUE       IN     NUMBER
402 --     P_ZAP                     OUT NUMBER
404 --     P_FUTURE_CHANGE           OUT NUMBER
405 --     P_DELETE_NEXT_CHANGE      OUT NUMBER
406 --     P_ZAP_START_DATE          OUT DATE
407 --     P_ZAP_END_DATE            OUT DATE
408 --     P_DELETE_START_DATE       OUT DATE
409 --     P_DELETE_END_DATE         OUT DATE
410 --     P_DEL_FUTURE_START_DATE   OUT DATE
411 --     P_DEL_FUTURE_END_DATE     OUT DATE
412 --     P_DEL_NEXT_START_DATE     OUT DATE
413 --     P_DEL_NEXT_END_DATE       OUT DATE
414 --
415 
416 -- In Parameters:
417 --   Name                           Reqd Type     Description
418 --   p_effective_date               Yes  date     Effective date of the update
419 --                                                operation.
420 --   p_package_name                 Yes  varchar2 Name of the stored package
421 --                                                to be called.
422 --   p_procedure_name               Yes  varchar2 Name of the
423 --                                                find_dt_del_modes_and_dates
424 --                                                procedure to call in the
425 --                                                p_package_name package.
426 --   p_base_key_value               Yes  number   The row identifier value
427 --                                                which needs to be passed to
428 --                                                the p_package_name package,
429 --                                                p_procedure_name procedure.
430 --
431 -- Post Success:
432 --   The corresponding OUT parameter for each DateTrack delete mode, will
433 --   indicate if it can be used for the specified row (p_base_key_value) as
434 --   of the specified date (p_effective_date).
435 --
436 --   Name                           Type     Description
437 --   p_zap                          NUMBER   Set to 1 if the ZAP
438 --                                           DateTrack mode is available.
439 --                                           Otherwise set to 0.
440 --   p_delete                       NUMBER   Set to 1 if the DELETE
441 --                                           DateTrack mode is available.
442 --                                           Otherwise set to 0.
443 --   p_future_change                NUMBER   Set to 1 if the FUTURE_CHANGE
444 --                                           DateTrack mode is available.
445 --                                           Otherwise set to 0.
446 --   p_delete_next_change           NUMBER   Set to 1 if the
447 --                                           DELETE_NEXT_CHANGE
448 --                                           DateTrack mode is available.
449 --                                           Otherwise set to 0.
450 --   p_zap_start_date               DATE     Set to validation start date for
451 --                                           the ZAP mode. This is set only
452 --                                           when p_zap parameter is set to 1.
453 --   p_zap_end_date                 DATE     Set to validation end date for
454 --                                           the ZAP mode. This is set only
455 --                                           when p_zap parameter is set to 1.
456 --   p_delete_start_date            DATE     Set to validation start date for
457 --                                           the DELETE mode.
458 --                                           This is set only when
459 --                                           p_delete parameter is set to 1.
460 --   p_delete_end_date              DATE     Set to validation end date for
461 --                                           the DELETE mode.This is set only
462 --                                           where p_delete parameter is set
463 --                                           to 1.
464 --   p_del_future_start_date        DATE     Set to validation start date for
465 --                                           the FUTURE_CHANGE mode. This is set
466 --                                           only when p_future_change parameter
467 --                                           is set to 1.
468 --   p_del_future_end_date          DATE     Set to validation end date for
469 --                                           the FUTURE_CHANGE mode. This is set
470 --                                           only when p_future_change parameter
471 --                                           is set to 1.
472 --   p_del_next_start_date          DATE     Set to validation start date for
473 --                                           the DELETE_NEXT_CHANGE mode. This
474 --                                           is set only p_delete_next_change
475 --                                           parameter is set to 1.
476 --   p_del_next_end_date            DATE     Set to validation end date for
477 --                                           the DELETE_NEXT_CHANGE mode. This
478 --                                           is set only p_delete_next_change
479 --                                           parameter is set to 1.
480 --
481 -- Post Failure:
482 --   An Oracle or application error message will be raised.
483 --
484 -- Developer Implementation Notes:
485 --   This procedure should only be called from the DT infractructure for
486 --   OAF based modules. If a list of valid delete modes is required in
487 --   any other case then the corresponding row handler find_dt_del_modes
488 --   procedure should be called  directly.
489 --
490 -- Access Status:
491 --   Internal Development Use Only.
492 --
493 -- {End Of Comments}
494 --
498   ,p_procedure_name                in     varchar2
495 procedure get_delete_modes_and_dates
496   (p_effective_date                in     date
497   ,p_package_name                  in     varchar2
499   ,p_base_key_value                in     number
500   ,p_zap                           out nocopy number
501   ,p_delete                        out nocopy number
502   ,p_future_change                 out nocopy number
503   ,p_delete_next_change            out nocopy number
504   ,p_zap_start_date                out nocopy date
505   ,p_zap_end_date                  out nocopy date
506   ,p_delete_start_date             out nocopy date
507   ,p_delete_end_date               out nocopy date
508   ,p_del_future_start_date         out nocopy date
509   ,p_del_future_end_date           out nocopy date
510   ,p_del_next_start_date           out nocopy date
511   ,p_del_next_end_date             out nocopy date
512   );
513 
514 end dt_client_support_utility;