|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object mondrian.rolap.aggmatcher.ExplicitRules.TableDef
public abstract static class ExplicitRules.TableDef
This is the base class for the exact name based and name pattern based aggregate table mapping definitions. It contains the mappings for the fact count column, optional ignore columns, foreign key mappings, measure column mappings and level column mappings.
Nested Class Summary | |
---|---|
(package private) class |
ExplicitRules.TableDef.Level
This class is used to map from a Level's symbolic name, [Time].[Year] to the aggregate table's column name, TIME_YEAR. |
(package private) class |
ExplicitRules.TableDef.Measure
This class is used to map from a measure's symbolic name, [Measures].[Unit Sales] to the aggregate table's column name, UNIT_SALES_SUM. |
Field Summary | |
---|---|
protected ExplicitRules.Group |
aggGroup
|
protected String |
factCountName
|
protected int |
id
|
protected boolean |
ignoreCase
|
protected List<String> |
ignoreColumnNames
|
Constructor Summary | |
---|---|
protected |
ExplicitRules.TableDef(boolean ignoreCase,
ExplicitRules.Group aggGroup)
|
Method Summary | |
---|---|
protected void |
add(ExplicitRules.TableDef.Level level)
Adds a Level. |
protected void |
add(ExplicitRules.TableDef.Measure measure)
Adds a Measure. |
protected void |
addFK(MondrianDef.AggForeignKey fk)
Add foreign key mapping entry (maps from fact table foreign key column name to aggregate table foreign key column name). |
protected void |
addIgnoreColumnName(String ignoreName)
Adds the name of an aggregate table column that is to be ignored. |
static void |
addLevelTo(ExplicitRules.TableDef tableDef,
String name,
String columnName)
|
static void |
addMeasureTo(ExplicitRules.TableDef tableDef,
String name,
String column)
|
boolean |
columnsOK(RolapStar star,
JdbcSchema.Table dbFactTable,
JdbcSchema.Table dbTable,
MessageRecorder msgRecorder)
Checks that ALL of the columns in the dbTable have a mapping in the tableDef. |
ExplicitRules.Group |
getAggGroup()
Get the Group with which is a part. |
protected String |
getAggregateFK(String baseFK)
Get the name of the aggregate table's foreign key column that matches the base fact table's foreign key column or return null. |
(package private) RolapCube |
getCube()
Get the RolapCube associated with this mapping. |
protected Recognizer.Matcher |
getFactCountMatcher()
Get Matcher for the fact count column. |
protected String |
getFactCountName()
Get the name of the fact count column. |
int |
getId()
TODO: This does not seemed to be used anywhere??? |
protected Iterator<String> |
getIgnoreColumnNames()
Get an Iterator over all ignore column name entries. |
protected Recognizer.Matcher |
getIgnoreMatcher()
Get Matcher for ignore columns. |
List<ExplicitRules.TableDef.Level> |
getLevels()
Gets all level mappings. |
List<ExplicitRules.TableDef.Measure> |
getMeasures()
Gets all level mappings. |
RolapStar |
getStar()
Get the RolapStar associated with this cube. |
boolean |
isIgnoreCase()
Return true if this name/pattern matching ignores case. |
(package private) static ExplicitRules.TableDef |
make(MondrianDef.AggTable aggTable,
ExplicitRules.Group group)
Given a MondrianDef.AggTable instance create a TableDef instance which is either a NameTableDef or PatternTableDef. |
abstract boolean |
matches(String tableName)
Does the TableDef match a table with name tableName. |
void |
print(PrintWriter pw,
String prefix)
|
protected void |
setFactCountName(String factCountName)
Set the name of the fact count column. |
String |
toString()
|
void |
validate(MessageRecorder msgRecorder)
Validate the Levels and Measures, also make sure each definition is different, both name and column. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final int id
protected final boolean ignoreCase
protected final ExplicitRules.Group aggGroup
protected String factCountName
protected List<String> ignoreColumnNames
Constructor Detail |
---|
protected ExplicitRules.TableDef(boolean ignoreCase, ExplicitRules.Group aggGroup)
Method Detail |
---|
static ExplicitRules.TableDef make(MondrianDef.AggTable aggTable, ExplicitRules.Group group)
public static void addLevelTo(ExplicitRules.TableDef tableDef, String name, String columnName)
public static void addMeasureTo(ExplicitRules.TableDef tableDef, String name, String column)
public int getId()
public boolean isIgnoreCase()
public RolapStar getStar()
public ExplicitRules.Group getAggGroup()
protected String getFactCountName()
protected void setFactCountName(String factCountName)
factCountName
- protected Iterator<String> getIgnoreColumnNames()
public List<ExplicitRules.TableDef.Level> getLevels()
public List<ExplicitRules.TableDef.Measure> getMeasures()
protected Recognizer.Matcher getIgnoreMatcher()
protected Recognizer.Matcher getFactCountMatcher()
RolapCube getCube()
public boolean columnsOK(RolapStar star, JdbcSchema.Table dbFactTable, JdbcSchema.Table dbTable, MessageRecorder msgRecorder)
It is an error if there is a column that does not have a mapping.
protected void addIgnoreColumnName(String ignoreName)
protected void addFK(MondrianDef.AggForeignKey fk)
protected String getAggregateFK(String baseFK)
protected void add(ExplicitRules.TableDef.Level level)
protected void add(ExplicitRules.TableDef.Measure measure)
public abstract boolean matches(String tableName)
public void validate(MessageRecorder msgRecorder)
public String toString()
toString
in class Object
public void print(PrintWriter pw, String prefix)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |