|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object mondrian.rolap.aggmatcher.Recognizer mondrian.rolap.aggmatcher.ExplicitRecognizer
class ExplicitRecognizer
This is the Recognizer for the aggregate table descriptions that appear in the catalog schema files; the user explicitly defines the aggregate.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class mondrian.rolap.aggmatcher.Recognizer |
---|
Recognizer.Matcher |
Field Summary |
---|
Fields inherited from class mondrian.rolap.aggmatcher.Recognizer |
---|
aggTable, dbFactTable, msgRecorder, returnValue, star |
Constructor Summary | |
---|---|
ExplicitRecognizer(ExplicitRules.TableDef tableDef,
RolapStar star,
RolapCube cube,
JdbcSchema.Table dbFactTable,
JdbcSchema.Table aggTable,
MessageRecorder msgRecorder)
|
Method Summary | |
---|---|
protected int |
checkMeasures()
Make the measures for this aggregate table. |
protected Recognizer.Matcher |
getFactCountMatcher()
Get the Matcher to be used to match the column which is the fact count column. |
protected Recognizer.Matcher |
getIgnoreMatcher()
Get the Matcher to be used to match columns to be ignored. |
protected ExplicitRules.TableDef |
getTableDef()
Get the ExplicitRules.TableDef associated with this instance. |
protected void |
makeMeasure(ExplicitRules.TableDef.Measure measure,
RolapAggregator factAgg,
JdbcSchema.Table.Column aggColumn)
Make a measure. |
protected int |
matchForeignKey(JdbcSchema.Table.Column.Usage factUsage)
This creates a foreign key usage. |
protected boolean |
matchLevel(Hierarchy hierarchy,
HierarchyUsage hierarchyUsage,
RolapLevel rlevel)
This creates a level usage. |
Methods inherited from class mondrian.rolap.aggmatcher.Recognizer |
---|
check, checkFactCount, checkForeignKeys, checkIgnores, checkLevels, checkNosMeasures, checkUnusedColumns, convertAggregator, convertAggregator, findCubes, generateImpliedMeasures, getColumnName, inNotSeenForeignKeys, lookupInChildren, makeFactCount, makeForeignKey, makeIgnore, makeLevel, makeMeasure, makeMeasure |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
ExplicitRecognizer(ExplicitRules.TableDef tableDef, RolapStar star, RolapCube cube, JdbcSchema.Table dbFactTable, JdbcSchema.Table aggTable, MessageRecorder msgRecorder)
Method Detail |
---|
protected ExplicitRules.TableDef getTableDef()
protected Recognizer.Matcher getIgnoreMatcher()
getIgnoreMatcher
in class Recognizer
protected Recognizer.Matcher getFactCountMatcher()
getFactCountMatcher
in class Recognizer
protected int checkMeasures()
First, iterate through all of the columns in the table. For each column, iterate through all of the tableDef measures, the explicit definitions of a measure. If the table's column name matches the column name in the measure definition, then make a measure. Next, look through all of the fact table column usage measures. For each such measure usage that has a sibling foreign key usage see if the tableDef has a foreign key defined with the same name. If so, then, for free, we can make a measure for the aggregate using its foreign key.
checkMeasures
in class Recognizer
protected void makeMeasure(ExplicitRules.TableDef.Measure measure, RolapAggregator factAgg, JdbcSchema.Table.Column aggColumn)
measure
- aggColumn
- protected int matchForeignKey(JdbcSchema.Table.Column.Usage factUsage)
First the column name of the fact usage which is a foreign key is used to search for a foreign key definition in the ExplicitRules.tableDef. If not found, thats ok, it is just a lost dimension. If found, look for a column in the aggregate table with that name and make a foreign key usage.
matchForeignKey
in class Recognizer
protected boolean matchLevel(Hierarchy hierarchy, HierarchyUsage hierarchyUsage, RolapLevel rlevel)
First, iterate through the ExplicitRules.TableDef's level definitions for one with a name equal to the RolapLevel unique name, i.e., [Time].[Quarter]. Now, using the level's column name, search through the aggregate table's columns for one with that name and make a level usage for the column. Return true if the aggregate table's column was found.
matchLevel
in class Recognizer
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |