Package mondrian.rolap.aggmatcher
Class AggTableManager
- java.lang.Object
-
- mondrian.rolap.aggmatcher.AggTableManager
-
public class AggTableManager extends Object
Manages aggregate tables.It is used as follows:
- A
RolapSchema
creates anAggTableManager
, and stores it in a member variable to ensure that it is not garbage-collected. - The
RolapSchema
callsinitialize()
, which scans the JDBC catalog and identifies aggregate tables. - For each aggregate table, it creates an
AggStar
and callsRolapStar.addAggStar(AggStar)
.
- Author:
- Richard M. Emberson
- A
-
-
Constructor Summary
Constructors Constructor Description AggTableManager(RolapSchema schema)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
bindToStar(JdbcSchema.Table dbFactTable, RolapStar star, MessageRecorder msgRecorder)
This method mines the RolapStar and annotes the JdbcSchema.Table dbFactTable by creating JdbcSchema.Table.Column.Usage instances.void
finalCleanUp()
This should ONLY be called if the AggTableManager is no longer going to be used.protected List<ExplicitRules.Group>
getAggGroups(RolapStar star)
Returns a list containing everyExplicitRules.Group
in every cubes in a givenRolapStar
.org.apache.log4j.Logger
getLogger()
Get the Logger.void
initialize()
Initializes this object, loading all aggregate tables and associating them withRolapStar
s.
-
-
-
Constructor Detail
-
AggTableManager
public AggTableManager(RolapSchema schema)
-
-
Method Detail
-
finalCleanUp
public void finalCleanUp()
This should ONLY be called if the AggTableManager is no longer going to be used. In fact, it should only be called indirectly by its associated RolapSchema object.
-
getLogger
public org.apache.log4j.Logger getLogger()
Get the Logger.
-
initialize
public void initialize()
Initializes this object, loading all aggregate tables and associating them withRolapStar
s. This method should only be called once.
-
getAggGroups
protected List<ExplicitRules.Group> getAggGroups(RolapStar star)
Returns a list containing everyExplicitRules.Group
in every cubes in a givenRolapStar
.
-
bindToStar
void bindToStar(JdbcSchema.Table dbFactTable, RolapStar star, MessageRecorder msgRecorder) throws SQLException
This method mines the RolapStar and annotes the JdbcSchema.Table dbFactTable by creating JdbcSchema.Table.Column.Usage instances. For example, a measure in the RolapStar becomes a measure usage for the column with the same name and a RolapStar foreign key column becomes a foreign key usage for the column with the same name.- Throws:
SQLException
-
-