DBA Data[Home] [Help]

PACKAGE: OLAPSYS.CWM$CLASSIFY

Source


1 package cwm$classify as
2 
3   -- Create a catalog node, returns the node id
4   --
5   -- param catalog_name          the name of the catalog
6   -- param catalog_description   the description for the new catalog
7   -- param parent_catalog_id     the parent for the new catalog, null indicates root
8   --
9   -- raise invalid_name             if catalog name is invalid
10   -- raise catalog_already_exists   if catalog with this name already exists
11   -- raise parent_catalog_not_found if catalog cannot be found for parent_catalog_id
12   function create_catalog(catalog_name varchar2
13                         , catalog_description varchar2
14                         , parent_catalog_id number := null)
15                           return number;
16 
17 
18   -- Add a measure to a catalog node entry
19   --
20   -- param catalog_id            the catalog id to update
21   -- param entity_owner          the owner(user) for the entity
22   -- param entity_name           the name of the cube containing the measure
23   -- param child_entity_name     the name of the measure within the cube
24   --
25   -- raise catalog_not_found      if catalog does not exist
26   -- raise measure_not_found      if measure does not exist
27   -- raise element_already_exists if the entity to add is already in the catalog
28   procedure add_catalog_entity(catalog_id number
29                              , entity_owner varchar2
30                              , entity_name varchar2
31                              , child_entity_name varchar2 := null);
32 
33   -- Add an entity to a descriptor
34   --
35   -- param descriptor_id           the descriptor id to update
36   -- param entity_type             the type of the entity
37   -- param entity_owner            the owner(user) for the entity
38   -- param entity_name             the name of the entity containing the child
39   -- param child_entity_name       the name of the child
40   -- param secondary_child_entity_name  the optional grandchild name
41   --
42   -- raise descriptor_not_found     if descriptor does not exist
43   -- raise element_already_exists   if the entity to add is already in the catalog
44   -- raise entity_type_not_allowed  if entity type does not match descriptor types
45   procedure add_entity_descriptor_use(descriptor_id number
46                                     , entity_type varchar2
47                                     , entity_owner varchar2
48                                     , entity_name varchar2
49 				    , child_entity_name varchar2 := NULL
50 				    , secondary_child_entity_name VARCHAR2 := null);
51 
52   -- Set a catalog's parent identifier, cannot create cyclic recursive references
53   --
54   -- param catalog_id             the catalog id to update
55   -- param parent_catalog_id      the identifier of the parent catalog to reference
56   --
57   -- raise catalog_not_found        if catalog does not exist
58   -- raise parent_catalog_not_found if parent catalog does not exist
59   procedure set_catalog_parent(catalog_id number
60                              , parent_catalog_id number);
61 
62   -- Set a catalog's description
63   --
64   -- param catalog_id             the catalog id to update
65   -- param catalog_description    the description which will be set for the catalog
66   --
67   -- raise catalog_not_found        if catalog does not exist
68   procedure set_catalog_description(catalog_id number
69                              , catalog_description varchar2);
70 
71   -- Drop a catalog, if catalog has children exception is raised, cascade forces drop.
72   --
73   -- param catalog_id             the catalog id to update
74   -- param cascade                this indicates all children will be dropped to for catalog
75   --
76   -- raise catalog_not_found        if catalog does not exist
77   -- raise catalog_has_sub_catalogs if catalog has sub-catalogs and cascade (TRUE) is not specified
78   procedure drop_catalog(catalog_id number
79                              , cascade boolean := false);
80 
81   -- Remove a measure from a catalog node entry
82   --
83   -- param catalog_id             the catalog id to update
84   -- param cascade                this indicates all children will be dropped to for catalog
85   --
86   -- raise catalog_not_found        if catalog does not exist
87   -- raise measure_not_found        if measure does not exist, or is not accessible to the user
88   -- raise element_does_not_exist   if the entity passed does not exist in the catalog
89   procedure remove_catalog_entity(catalog_id number
90                              , entity_owner varchar2
91                              , entity_name varchar2
92                              , child_entity_name varchar2);
93 
94 
95   -- Lock a catalog node for update
96   --
97   -- param catalog_id            id of the catalog node to lock
98   -- param wait_for_lock         wait for lock if acquired by other user
99   --
100   -- raise no_access_privileges  if no privileges to edit the catalog
101   -- raise catalog_not_found     if attribute doesn't exist
102   -- raise failed_to_gain_lock   if lock could not be acquired
103   procedure lock_catalog(catalog_id number, wait_for_lock boolean := false);
104 
105   -- Create a descriptor type, name must be unique
106   --
107   -- param descriptor_type        a string representing the new descriptor type
108   --
109   -- raise descriptor_type_already_exists if the type already exists
110   -- raise no_access_privileges           need to be an OLAP_DBA to execute this
111   procedure create_descriptor_type(descriptor_type varchar2);
112 
113 
114   -- Drop a descriptor type
115   --
116   -- param  descriptor_type           the value for the type of descriptor
117   --
118   -- raise descriptor_type_not_found  if the type does not exist
119   -- raise descriptor_type_in_use     if the type is in use
120   -- raise no_access_privileges       need to be an OLAP_DBA to execute this
121   procedure drop_descriptor_type(descriptor_type varchar2);
122 
123 
124   -- Add an entity type to the descriptor type
125   --
126   -- param  descriptor_type           the value for the type of descriptor
127   -- param  entity_type               the value for the type of entity
128   --
129   -- raise descriptor_type_not_found  if the type does not exist
130   -- raise entity_type_not_allowed    if the type is invalid
131   procedure add_descriptor_entity_type(descriptor_type varchar2
132                                       ,entity_type varchar2);
133 
134 
135   -- Remove an entity type from a the descriptor type
136   --
137   -- param  descriptor_type           the value for the type of descriptor
138   -- param  entity_type               the value for the type of entity
139   --
140   -- raise descriptor_type_not_found  if the type does not exist
141   -- raise entity_type_not_allowed    if the type is invalid
142   procedure remove_descriptor_entity_type(descriptor_type varchar2
143                                       ,entity_type varchar2);
144 
145   -- Function to create a new descriptor based on a descriptor type, id returned
146   --
147   -- param  descriptor_type           the value for the type of descriptor
148   -- param  descriptor_value          the value for the descriptor
149   -- param  description               the description for the new descriptor
150   --
151   -- raise descriptor_type_not_found    if the type does not exist
152   -- raise descriptor_with_value_exists if the descriptor value for this type exists
153   -- raise no_access_privileges         need to be an OLAP_DBA to execute this
154   function create_descriptor(descriptor_type varchar2
155                             ,descriptor_value varchar2
156                             ,description varchar2) return number;
157 
158 
159   -- Procedure to drop a descriptor given its id
160   --
161   -- param  descriptor_id             the id of the descriptor created in create_descriptor
162   --
163   -- raise descriptor_undefined       if the descriptor does not exist
164   -- raise no_access_privileges       need to be an OLAP_DBA to execute this
165   procedure drop_descriptor(descriptor_id number);
166 
167 
168   -- Remove an entity from a descriptor
169   --
170   -- param descriptor_id         the descriptor id to update
171   -- param entity_type           the type of the entity
172   -- param entity_owner          the owner(user) for the entity
173   -- param entity_name           the name of the entity containing the child
174   -- param child_entity_name     the name of the child
175   -- param secondary_child_entity_name the optional grandchild name
176   --
177   -- raise descriptor_not_found      if descriptor does not exist
178   -- raise element_already_exists if the entity to add is already in the catalog
179   procedure remove_entity_descriptor_use(descriptor_id number
180                                      ,entity_type varchar2
181                                      ,entity_owner varchar2
182                                      ,entity_name varchar2
183 				     ,child_entity_name varchar2 := NULL
184 				     , secondary_child_entity_name VARCHAR2 := null);
185 
186 end;