DBA Data[Home] [Help]

PACKAGE: APPS.FFDICT

Source


1 package ffdict as
2 /* $Header: ffdict.pkh 120.3 2006/04/30 07:47:14 arashid noship $ */
3 --
4 ------------------------------ get_context_level ------------------------------
5 --
6 --  NAME
7 --    get_context_level
8 --  DESCRIPTION
9 --    Contexts are allocated a power of 2 number so that database item context
10 --    dependencies can be calculated efficiently in FastFormula using bit masks
11 --    This function returns the next available context level.
12 --
13 -------------------------------------------------------------------------------
14 --
15 function get_context_level return number;
16 --
17 ----------------------------- is_used_in_formula ------------------------------
18 --
19 --  NAME
20 --    is_used_in_formula
21 --
22 --  DESCRIPTION
23 --    Returns TRUE if named item is used within a formula (ie is referenced in
24 --    the FDIU table) visible from the current business group and legislation.
25 --    Otherwise returns FALSE.
26 --
27 --  NOTES
28 --    The purpose of this interface is to prevent compilation / run-time issues
29 --    because of different items with clashing names.
30 --
31 --    Example 1:
32 --    A compiled formula with local variable "L1" has a compilation failure
33 --    because a database item "L1" was created in the mean time. This is
34 --    because local variables must be assigned values but database items
35 --    cannot be assigned values, and a formula item is treated as a database
36 --    item when its name is found in FF_DATABASE_ITEMS or FF_DATABASE_ITEMS_TL.
37 --
38 --    Example 2:
39 --    A database item that was referenced from a compiled formula is deleted.
40 --    The next formula compilation fails because the name is treated as a
41 --    local variable name, and that variable is unitialised.
42 --
43 --    Example 3:
44 --    A new formula context is given the same name as an input variable. This
45 --    leads to problems in existing code that executes a formula, searching
46 --    for contexts and inputs by name.
47 --
48 -------------------------------------------------------------------------------
49 --
50 function is_used_in_formula (p_item_name in varchar2,
51                              p_bus_grp in number,
52                              p_leg_code in varchar2) return boolean;
53 --
54 ---------------------------- dbitl_used_in_formula ----------------------------
55 --
56 --  NAME
57 --    dbitl_used_in_formula
58 --
59 --  DESCRIPTION
60 --    Returns TRUE if a translated database item name is used in a formula
61 --    (ie is referenced in the FDIU table) visible from the current business
62 --    group and legislation.
63 --
64 --  NOTES
65 --    The purpose of this interface is to avoid a formula becoming invalid
66 --    upon the update or deletion of a translated database item name.
67 -------------------------------------------------------------------------------
68 --
69 function dbitl_used_in_formula (p_tl_user_name   in varchar2
70                                ,p_user_name      in varchar2
71                                ,p_user_entity_id in number
72                                ,p_language       in varchar2
73                                ) return boolean;
74 --
75 ----------------------------- dbi_used_in_formula -----------------------------
76 --
77 --  NAME
78 --    dbi_used_in_formula
79 --
80 --  DESCRIPTION
81 --    Returns TRUE if a base database item name is used in a formula
82 --    (ie is referenced in the FDIU table) visible from the current business
83 --    group and legislation.
84 --
85 --  NOTES
86 --    The purpose of this interface is to avoid a formula becoming invalid
87 --    upon the update or deletion of a database item.
88 --
89 -------------------------------------------------------------------------------
90 --
91 function dbi_used_in_formula (p_user_name in varchar2
92                              ,p_user_entity_id in number
93                              ) return boolean;
94 --
95 ------------------------------ validate_formula -------------------------------
96 --
97 --  NAME
98 --    validate_formula
99 --  DESCRIPTION
100 --    Procedure which succeeds if name supplied will make a valid formula
101 --    name. Fails with exception and error if name is invalid.
102 --
103 -------------------------------------------------------------------------------
104 --
105 procedure validate_formula(p_formula_name in out nocopy varchar2,
106                            p_formula_type_id in number,
107                            p_bus_grp in number,
108                            p_leg_code in varchar2);
109 --
110 ------------------------------ validate_formula -------------------------------
111 --
112 --  NAME
113 --    validate_formula - Overload
114 --  DESCRIPTION
115 --    Procedure which succeeds if name supplied will make a valid formula
116 --    name. Fails with exception and error if name is invalid.
117 --    Overloaded to allow date effective formula creation.
118 --
119 -------------------------------------------------------------------------------
120 --
121 procedure validate_formula(p_formula_name         in out nocopy varchar2,
122                            p_formula_type_id      in     number,
123                            p_bus_grp              in     number,
124                            p_leg_code             in     varchar2,
125                            p_effective_start_date in     date,
126                            p_effective_end_date   in out nocopy date);
127 --
128 ------------------------------ validate_dbitem -------------------------------
129 --
130 --  NAME
131 --    validate_dbitem
132 --  DESCRIPTION
133 --    Procedure which succeeds if name supplied will make a valid database
134 --    item name. Fails with exception and error if name is invalid.
135 --  NOTES
136 --    This procedure is required for inserting a new database item.
137 --
138 ------------------------------------------------------------------------------
139 --
140 procedure validate_dbitem(p_dbi_name in out nocopy varchar2,
141                           p_user_entity_id in number);
142 --
143 -------------------------- core_validate_tl_dbitem ---------------------------
144 --
145 --  NAME
146 --    core_validate_tl_dbitem
147 --  DESCRIPTION
148 --    Core procedure for testing whether or not a new translated database
149 --    item name is valid.
150 --
151 --    Parameters:
152 --    USER_NAME:         Base DBI name.
153 --    USER_ENTITY_ID:    USER_ENTITY_ID for this DBI.
154 --    TL_USER_NAME:      The translated name - it is converted to valid
155 --                       DBI format.
156 --
157 --    Returns a status code in p_outcome:
158 --    S - Success
159 --    C - Failure: name clashes with Formula Context name.
160 --    D - Failure: name clashes with a DBI name.
161 --    F - Failure: name used in a compiled Formula other than for a DBI
162 --                 or Context.
163 --
164 --  NOTES
165 --    For FF and Core Pay private use only.
166 --
167 ------------------------------------------------------------------------------
168 --
169 procedure core_validate_tl_dbitem
170 (p_user_name      in varchar2
171 ,p_user_entity_id in number
172 ,p_tl_user_name   in out nocopy varchar2
173 ,p_outcome           out nocopy varchar2
174 );
175 --
176 ------------------------------ validate_tl_dbi -------------------------------
177 --
178 --  NAME
179 --    validate_tl_dbi
180 --
181 --  DESCRIPTION
182 --    Procedure which succeeds if name supplied will make a valid translated
183 --    database item name. Fails with exception and error if name is invalid.
184 --
185 --  NOTES
186 --    This procedure is required for updating a translated database item
187 --    name. It is possible that p_tl_user_name will be modified - if the
188 --    name is not in database item name format, it will be modified.
189 --
190 ------------------------------------------------------------------------------
191 --
192 procedure validate_tl_dbi(p_user_name      in varchar2
193                          ,p_user_entity_id in number
194                          ,p_tl_user_name   in out nocopy varchar2
195                          );
196 --
197 ------------------------------ validate_context -------------------------------
198 --
199 --  NAME
200 --    validate_context
201 --  DESCRIPTION
202 --    Procedure which succeeds if name supplied will make a valid context
203 --    name. Fails with exception and error if name is invalid.
204 --
205 -------------------------------------------------------------------------------
206 --
207 procedure validate_context(p_ctx_name in out nocopy varchar2);
208 --
209 ---------------------------- validate_user_entity -----------------------------
210 --
211 --  NAME
212 --    validate_user_entity
213 --  DESCRIPTION
214 --    Procedure which succeeds if name supplied will make a valid user
215 --    entity name. Fails with exception and error if name is invalid.
216 --
217 -------------------------------------------------------------------------------
218 --
219 procedure validate_user_entity(p_ue_name in out nocopy varchar2,
220                                p_bus_grp in number,
221                                p_leg_code in varchar2);
222 --
223 ----------------------------- validate_function ------------------------------
224 --
225 --  NAME
226 --    validate_function
227 --  DESCRIPTION
228 --    Procedure which succeeds if name supplied will make a valid function
229 --    name. Fails with exception and error if name is invalid.
230 --
231 ------------------------------------------------------------------------------
232 --
233 procedure validate_function(p_func_name in out nocopy varchar2,
234                             p_class in varchar2,
235                             p_alias in varchar2,
236                             p_bus_grp in number,
237                             p_leg_code in varchar2);
238 --
239 ------------------------------ validate_global -------------------------------
240 --
241 --  NAME
242 --    validate_global
243 --  DESCRIPTION
244 --    Procedure which succeeds if name supplied will make a valid global
245 --    variable name. Fails with exception and error if name is invalid.
246 --
247 ------------------------------------------------------------------------------
248 --
249 procedure validate_global(p_glob_name in out nocopy varchar2,
250                           p_bus_grp in number,
254 --
251                           p_leg_code in varchar2);
252 --
253 ---------------------------- validate_tl_global ------------------------------
255 --  NAME
256 --    validate_tl_global
257 --  DESCRIPTION
258 --    Procedure which succeeds if name supplied will make a valid global
259 --    variable name. Fails with exception and error if name is invalid.
260 --
261 ------------------------------------------------------------------------------
262 --
263 procedure validate_tl_global(p_global_id in number,
267 --
264                              p_glob_name in varchar2,
265                              p_bus_grp in number,
266                              p_leg_code in varchar2);
268 -------------------------------- validate_rcu ---------------------------------
269 --
270 --  NAME
271 --    validate_rcu
272 --  DESCRIPTION
273 --    Check adding route context usage does not make any compiled formulae
274 --    invalid. Returns TRUE if OK, FALSE if not OK
275 --
276 -------------------------------------------------------------------------------
277 --
278 procedure validate_rcu(p_route_id in number);
279 --
280 -------------------------------- validate_rpv ---------------------------------
281 --
282 --  NAME
283 --    validate_rpv
284 --  DESCRIPTION
285 --    Check adding route parameter value does not make any compiled formulae
286 --    invalid.  Returns TRUE if OK, FALSE if not OK
287 --
288 -------------------------------------------------------------------------------
289 --
290 procedure validate_rpv(p_user_entity_id in number);
291 --
292 ---------------------------- create_global_dbitem -----------------------------
293 --
294 --  NAME
295 --    create_global_dbitem
296 --  DESCRIPTION
297 --    Does third party inserts to create a database item which is used within
298 --    formulae to access the global variable value
299 --
300 -------------------------------------------------------------------------------
301 --
302 procedure create_global_dbitem(p_name in varchar2,
303                                p_data_type in varchar2,
304                                p_global_id in number,
305                                p_business_group_id in number,
306                                p_legislation_code in varchar2,
307                                p_created_by in number,
308                                p_creation_date in date);
309 --
310 ---------------------------- delete_global_dbitem -----------------------------
311 --
312 --  NAME
313 --    delete_global_dbitem
314 --  DESCRIPTION
315 --    Does third party deletes to remove a database item which is used within
316 --    formulae to access the global variable value
317 --
318 -------------------------------------------------------------------------------
319 --
320 procedure delete_global_dbitem(p_global_id in number);
321 --
325 --    delete_ftcu_check
322 ----------------------------- delete_ftcu_check ------------------------------
323 --
324 --  NAME
326 --  DESCRIPTION
327 --    Check deleting formula type context usage does not make any compiled
328 --    formulae invalid. Returns TRUE if OK, FALSE if not OK
329 --
330 ------------------------------------------------------------------------------
331 --
335 ---------------------------- delete_dbitem_check -----------------------------
332 procedure delete_ftcu_check(p_ftype_id in number,
333                             p_context_id in number);
334 --
336 --
337 --  NAME
338 --    delete_dbitem_check
339 --  DESCRIPTION
340 --    Procedure which succeeds if it is OK to delete named DB item.
341 --
342 ------------------------------------------------------------------------------
343 --
344 procedure delete_dbitem_check(p_item_name in varchar2,
345                               p_user_entity_id in number);
346 --
347 ---------------------------- delete_dbitem_check -----------------------------
348 --
352 --    Procedure which succeeds if it is OK to delete named DB item.
349 --  NAME
350 --    delete_dbitem_check
351 --  DESCRIPTION
353 --    Overloaded because sometimes business group and legislation are known
354 --
355 ------------------------------------------------------------------------------
356 --
357 procedure delete_dbitem_check(p_item_name in varchar2,
358                               p_business_group_id in number,
359                               p_legislation_code in varchar2);
360 --
361 ------------------------------- set_ue_details --------------------------------
362 --
363 --  NAME
364 --    set_ue_details
365 --  DESCRIPTION
366 --    Stores details of UE pending a delete (for use by delete_dbitem_check)
367 --
368 -------------------------------------------------------------------------------
369 --
373 --
370 procedure set_ue_details (user_entity_id in number,
371                           business_group_id in number,
372                           legislation_code in varchar2);
374 ------------------------------ clear_ue_details -------------------------------
375 --
376 --  NAME
377 --    clear_ue_details
378 --  DESCRIPTION
379 --    Clears details of UE following a delete
380 --
381 -------------------------------------------------------------------------------
382 --
383 procedure clear_ue_details;
384 --
385 ---------------------------- update_global_dbitem -----------------------------
386 --
387 --  NAME
388 --    update_global_dbitem
389 --  DESCRIPTION
390 --    Updates FF_DATABASE_ITEMS_TL to create a translated database item name.
391 --
392 -------------------------------------------------------------------------------
393 --
394 procedure update_global_dbitem(p_global_id    in number,
395                                p_new_name     in varchar2,
396                                p_description  in varchar2,
397                                p_source_lang  in varchar2,
398                                p_language     in varchar2);
399 --
400 ------------------------- fetch_referencing_formulas --------------------------
401 --
402 --  NAME
403 --    fetch_referencing_formulas
404 --  DESCRIPTION
405 --    Fetches information about Formulas that reference a particular
406 --    translated Database Item name.
407 --  NOTES
408 --    For Core Pay and Formula team internal use.
409 --
410 -------------------------------------------------------------------------------
411 --
412 procedure fetch_referencing_formulas
413 (p_tl_user_name   in varchar2
414 ,p_user_name      in varchar2
415 ,p_user_entity_id in number
416 ,p_language       in varchar2
417 ,p_formula_ids       out nocopy dbms_sql.number_table
418 ,p_formula_names     out nocopy dbms_sql.varchar2s
419 ,p_eff_start_dates   out nocopy dbms_sql.date_table
420 ,p_eff_end_dates     out nocopy dbms_sql.date_table
421 ,p_bus_group_ids     out nocopy dbms_sql.number_table
422 ,p_leg_codes         out nocopy dbms_sql.varchar2s
423 );
424 --
425 -------------------------------------------------------------------------------
426 --
427 end ffdict;