1 package ZPB_OLAP_VIEWS_PKG as
2 /* $Header: ZPBVOLVS.pls 120.5 2007/12/04 14:40:00 mbhat ship $ */
3
4 -------------------------------------------------------------------------------
5 -- COMPILE_VIEWS
6 --
7 -- Recompiles views that have become INVALID, usually due to the recompilation/
8 -- patch of this file.
9 --
10 -------------------------------------------------------------------------------
11 procedure COMPILE_VIEWS;
12
13 -------------------------------------------------------------------------------
14 -- CREATE_ATTRIBUTE_VIEWS
15 --
16 -- Builds the SQL mapping structures for an AW's attributes
17 --
18 -- IN:
19 -- p_aw (varchar2) - The name of the AW
20 -- p_type (varchar2) - The type of the AW (SHARED or PERSONAL)
21 -- p_attributes (varchar2) - list of attr IDs in Dimdim. If null,
22 -- all attributes are built
23 -------------------------------------------------------------------------------
24 procedure CREATE_ATTRIBUTE_VIEWS (p_aw in varchar2,
25 p_type in varchar2,
26 p_attributes in varchar2 := null);
27
28 -------------------------------------------------------------------------------
29 -- CREATE_CUBE_VIEW
30 --
31 -- Builds the SQL view for an empty cube
32 --
33 -- IN:
34 -- p_aw (varchar2) - The name of the AW holding the cube
35 -- p_awType (varchar2) - PERSONAL or SHARED: the AW type
36 -- p_view (varchar2) - The name of the view to create
37 -- p_lmap (varchar2) - The name of the LMAP variable to use for this view
38 -- p_colVar (varchar2) - The name of the COLCOUNTVAR variable
39 -- p_dims (varchar2) - Space sparated string of dim ID's (in the DimDim)
40 -- that defined the shape of the cube
41 -------------------------------------------------------------------------------
42 procedure CREATE_CUBE_VIEW (p_aw IN VARCHAR2,
43 p_awType IN VARCHAR2,
44 p_view IN VARCHAR2,
45 p_lmap IN VARCHAR2,
46 p_colVar IN VARCHAR2,
47 p_dims IN VARCHAR2,
48 p_mode IN VARCHAR2 default 'DEFAULT');
49
50 -------------------------------------------------------------------------------
51 -- CREATE_DIMENSION_VIEWS
52 --
53 -- Builds the SQL views which expose the dimensions
54 --
55 -- IN:
56 -- p_aw (varchar2) - The name of the data AW
57 -- p_type (varchar2) - The AW type (PERSONAL or SHARED)
58 -- p_dimension (varchar2) - A dimension to build dimension views. If null,
59 -- all dimensions are built
60 -- p_hierarchy (varchar2) - The hierarchy to build the view. If null,
61 -- all hierarchies
62 -------------------------------------------------------------------------------
63 procedure CREATE_DIMENSION_VIEWS (p_aw in varchar2,
64 p_type in varchar2,
65 p_dimension in varchar2 default null,
66 p_hierarchy in varchar2 default null);
67
68 -------------------------------------------------------------------------------
69 -- CREATE_SECURITY_VIEW
70 --
71 -- IN: p_aw - The AW
72 -- p_measures - A space-separated list of measures, valid entries are
73 -- ('OWNERMAP', 'SECWRITEMAP.F', 'SECFULLSCPVW')
74 -- p_measView - The name of the measure view
75 -- p_dims - Space-separated list of dimensions
76 -------------------------------------------------------------------------------
77 procedure CREATE_SECURITY_VIEW (p_aw in varchar2,
78 p_measures in varchar2,
79 p_measView in varchar2,
80 p_dims in varchar2);
81
82 -------------------------------------------------------------------------------
83 -- CREATE_VIEW_STRUCTURES
84 --
85 -- Builds the views on the shared AW for exposing EPB-specific
86 -- information to the middle tier
87 --
88 -- IN: p_dataAw (varchar2) - The actual name of the data AW
89 -- p_annotAw (varchar2) - The actual name of the annotation AW
90 --
91 -------------------------------------------------------------------------------
92 procedure CREATE_VIEW_STRUCTURES (p_dataAW in varchar2,
93 p_annotAW in varchar2);
94
95 -------------------------------------------------------------------------------
96 -- GET_LIMITMAP - Returns the limitmap for a dimension given.
97 -- DEPRECATED! Only left in to simplify upgrade of dev env's
98 --
99 -- IN:
100 -- p_type (varchar2) - The AW type (either 'SHARED' or 'PERSONAL')
101 -- p_dim (varchar2) - The dimension (the physical AW object)
102 -- p_hier (varchar2) - The hierarchy ID, null denotes no hierarchy
103 --
104 -- OUT:
105 -- The limitmap for the parameters specified
106 -------------------------------------------------------------------------------
107 function GET_LIMITMAP (p_type in varchar2,
108 p_dim in varchar2,
109 p_hier in varchar2 := null)
110 return varchar2;
111
112 -------------------------------------------------------------------------------
113 -- INITIALIZE - Initializes the session to run SQL queries against the OLAP
114 -- views. This is only needed for sessions that have not had
115 -- a normal OLAP startup called (ie, Apps sessions)
116 --
117 -- IN:
118 -- p_type (varchar2) - The AW type (either 'SHARED' or 'PERSONAL')
119 -------------------------------------------------------------------------------
120 procedure INITIALIZE (p_type in varchar2);
121
122 -------------------------------------------------------------------------------
123 -- REMOVE_DIMENSION_VIEW
124 --
125 -- IN:
126 -- p_aw - The AW storing the dimension
127 -- p_type - PERSONAL or SHARED, the AW type
128 -- p_dim - The dimension ID in the DimDim
129 -- p_hierarchy - The hierarchy ID in the HierDim
130 -- Removes the view for the dimension's hierarchy.
131 -------------------------------------------------------------------------------
132 procedure REMOVE_DIMENSION_VIEW (p_aw in varchar2,
133 p_type in varchar2,
134 p_dim in varchar2,
135 p_hierarchy in varchar2);
136 -------------------------------------------------------------------------------
137 -- REMOVE_BUSAREA_VIEWS
138 --
139 -- Removes all SQL views for a business area
140 --
141 -- IN: p_business_area - The Business Area ID
142 --
143 -------------------------------------------------------------------------------
144 procedure REMOVE_BUSAREA_VIEWS (p_business_area in NUMBER);
145
146 ------------------------------------------------------------------------------
147 -- REMOVE_USER_VIEWS -- REMOVE_USER_VIEWS
148 --
149 -- Removes all relational views for the user
150 -- IN: p_user varchar2 - The user ID
151 -- p_business_area number - The business area ID
152 --
153 ------------------------------------------------------------------------------
154 procedure REMOVE_USER_VIEWS (p_user in varchar2,
155 p_business_area in number);
156
157 -------------------------------------------------------------------------------
158 -- DROP_VIEW
159 --
160 -- Drops the view and its corresponding objects
161 --
162 -- IN: p_view (varchar2) - The name of the view
163 --
164 -------------------------------------------------------------------------------
165 procedure DROP_VIEW (p_view in varchar2);
166
167 end ZPB_OLAP_VIEWS_PKG;