1 package ffdbitem AUTHID CURRENT_USER as
2 /* $Header: ffdbitem.pkh 115.0 99/07/16 02:02:20 porting ship $ */
3 --
4 --
5 -- Copyright (c) Oracle Corporation (UK) Ltd 1994.
6 -- All Rights Reserved.
7 --
8 -- PRODUCT
9 -- Oracle*FastFormula
10 --
11 -- NAME
12 -- ffdbitem
13 --
14 -- NOTES
15 -- Contains utility functions and procedures for accessing database
16 -- item SQL and values
17 --
18 -- MODIFIED
19 -- pgowers 09-FEB-94 Created
20 -- rneale 19-MAY-94 Added exit.
21 -- jthuring 11-OCT-95 Removed spurious start of comment marker
22 -- mfender 11-JUN-97 Create package statement to standard for
23 -- release 11.
24 --
25 -- PUBLIC TYPES
26 --
27 type NAMES is table of ff_contexts.context_name%TYPE
28 index by binary_integer;
29 type TYPES is table of ff_contexts.data_type%TYPE
30 index by binary_integer;
31 type VALS is table of varchar2(255)
32 index by binary_integer;
33
34 type FFCONTEXTS_T is record (
35 context_count number,
36 context_names NAMES,
37 context_types TYPES,
38 bind_names NAMES,
39 bind_values VALS);
40
41 type FFITEM_INFO_T is record (
42 item_name FF_DATABASE_ITEMS.USER_NAME%TYPE,
43 item_sql varchar2(8000),
44 data_type varchar2(1), -- T=Text, N=Number, D=Date
45 notfound_ok boolean, -- TRUE means notfound is legal
46 null_ok boolean, -- TRUE means null is legal
47 contexts FFCONTEXTS_T);
48
49 --
50 -- PUBLIC PROTOTYPES
51
52 ------------------------------- get_dbitem_sql -------------------------------
53 --
54 -- NAME
55 -- get_dbitem_sql
56 --
57 -- DESCRIPTION
58 -- Returns all information for a database item required to fetch it's value
59 -- including SQL, context requirements, data type in FFITEM_INFO_T
60 -- given the database item name, formula type id, business group id
61 -- and legislation code
62 --
63 procedure get_dbitem_info (p_item_name in varchar2,
64 p_formula_type_id in number,
65 p_bg_id in number,
66 p_leg_code in varchar2,
67 p_item_info out FFITEM_INFO_T);
68 --
69 ------------------------------ get_dbitem_value ------------------------------
70 --
71 -- NAME
72 -- get_dbitem_value
73 --
74 -- DESCRIPTION
75 -- Returns the value of a database item given the item details
76 --
77 function get_dbitem_value (p_item_info in FFITEM_INFO_T) return varchar2;
78 --
79 end ffdbitem;