class ExplicitRecognizer extends Recognizer
Recognizer.Matcher
aggTable, dbFactTable, msgRecorder, returnValue, star
Constructor and Description |
---|
ExplicitRecognizer(ExplicitRules.TableDef tableDef,
RolapStar star,
RolapCube cube,
JdbcSchema.Table dbFactTable,
JdbcSchema.Table aggTable,
MessageRecorder msgRecorder) |
Modifier and Type | Method and Description |
---|---|
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)
Creates a foreign key usage.
|
protected void |
matchLevels(Hierarchy hierarchy,
HierarchyUsage hierarchyUsage)
Creates a level usage.
|
check, checkFactCount, checkForeignKeys, checkIgnores, checkLevels, checkNosMeasures, checkUnusedColumns, convertAggregator, convertAggregator, findCubes, generateImpliedMeasures, getColumnName, inNotSeenForeignKeys, lookupInChildren, makeFactCount, makeForeignKey, makeIgnore, makeLevelColumnUsage, makeMeasure, makeMeasure
ExplicitRecognizer(ExplicitRules.TableDef tableDef, RolapStar star, RolapCube cube, JdbcSchema.Table dbFactTable, JdbcSchema.Table aggTable, MessageRecorder msgRecorder)
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)
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 void matchLevels(Hierarchy hierarchy, HierarchyUsage hierarchyUsage)
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.
matchLevels
in class Recognizer