class DefaultRecognizer extends Recognizer
Recognizer.Matcher
aggTable, dbFactTable, msgRecorder, returnValue, star
Constructor and Description |
---|
DefaultRecognizer(DefaultRules aggDefault,
RolapStar star,
JdbcSchema.Table dbFactTable,
JdbcSchema.Table aggTable,
MessageRecorder msgRecorder) |
Modifier and Type | Method and Description |
---|---|
protected int |
checkMeasures()
Create measures for an 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 Recognizer.Matcher |
getMeasureMatcher(JdbcSchema.Table.Column.Usage factUsage)
Get the Match used to identify columns that are measures.
|
(package private) DefaultRules |
getRules()
Get the DefaultRules instance associated with this object.
|
protected int |
matchForeignKey(JdbcSchema.Table.Column.Usage factUsage)
This creates a foreign key usage.
|
protected void |
matchLevels(Hierarchy hierarchy,
HierarchyUsage hierarchyUsage)
Create level usages.
|
check, checkFactCount, checkForeignKeys, checkIgnores, checkLevels, checkNosMeasures, checkUnusedColumns, convertAggregator, convertAggregator, findCubes, generateImpliedMeasures, getColumnName, inNotSeenForeignKeys, lookupInChildren, makeFactCount, makeForeignKey, makeIgnore, makeLevelColumnUsage, makeMeasure, makeMeasure
DefaultRecognizer(DefaultRules aggDefault, RolapStar star, JdbcSchema.Table dbFactTable, JdbcSchema.Table aggTable, MessageRecorder msgRecorder)
DefaultRules getRules()
protected Recognizer.Matcher getIgnoreMatcher()
getIgnoreMatcher
in class Recognizer
protected Recognizer.Matcher getFactCountMatcher()
getFactCountMatcher
in class Recognizer
protected Recognizer.Matcher getMeasureMatcher(JdbcSchema.Table.Column.Usage factUsage)
protected int checkMeasures()
First, iterator through all fact table measure usages. Create a Matcher for each such usage. Iterate through all aggregate table columns. For each column that matches create a measure usage.
Per fact table measure usage, at most only one aggregate measure should be created.
checkMeasures
in class Recognizer
protected int matchForeignKey(JdbcSchema.Table.Column.Usage factUsage)
Using the foreign key Matcher with the fact usage's column name the aggregate table's columns are searched for one that matches. For each that matches a foreign key usage is created (thought if more than one is created its is an error which is handled in the calling code.
matchForeignKey
in class Recognizer
protected void matchLevels(Hierarchy hierarchy, HierarchyUsage hierarchyUsage)
A Matcher is created using the Hierarchy's name, the RolapLevel name, and the column name associated with the RolapLevel's key expression. The aggregate table columns are search for the first match and, if found, a level usage is created for that column.
matchLevels
in class Recognizer