Package mondrian.rolap.aggmatcher
Class AggGen
- java.lang.Object
-
- mondrian.rolap.aggmatcher.AggGen
-
public class AggGen extends java.lang.Object
This class is used to create "lost" and "collapsed" aggregate table creation sql (creates the rdbms table and inserts into it from the base fact table).- Author:
- Richard M. Emberson
-
-
Constructor Summary
Constructors Constructor Description AggGen(java.lang.String cubeName, RolapStar star, RolapStar.Column[] columns)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addForeignKeyToNotLostColumnUsages(JdbcSchema.Table.Column column)
java.lang.String
createCollapsed()
Return a String containing the sql code to create a collapsed dimension table.java.lang.String
createLost()
Return a String containing the sql code to create a lost dimension table.protected JdbcSchema.Table.Column
getColumn(JdbcSchema.Table table, java.lang.String name)
protected java.lang.String
getFactCount()
protected RolapStar.Table
getFactTable()
protected java.lang.String
getFactTableName()
protected java.lang.String
getRolapStarColumnName(RolapStar.Column rColumn)
protected SqlQuery
getSqlQuery()
protected JdbcSchema.Table
getTable(JdbcSchema db, java.lang.String name)
protected JdbcSchema.Table
getTable(JdbcSchema db, RolapStar.Table rt)
java.lang.String
insertIntoCollapsed()
Return the sql code to populate a collapsed dimension table from the fact table.java.lang.String
insertIntoLost()
Return the sql code to populate a lost dimension table from the fact table.boolean
isReady()
Return true if this instance is ready to generate the sql.(package private) java.lang.String
makeCollapsedAggregateTableName(java.lang.String factTableName)
(package private) java.lang.String
makeLostAggregateTableName(java.lang.String factTableName)
-
-
-
Constructor Detail
-
AggGen
public AggGen(java.lang.String cubeName, RolapStar star, RolapStar.Column[] columns)
-
-
Method Detail
-
isReady
public boolean isReady()
Return true if this instance is ready to generate the sql. If false, then something went wrong as it was trying to understand the columns.
-
getFactTable
protected RolapStar.Table getFactTable()
-
getFactTableName
protected java.lang.String getFactTableName()
-
getSqlQuery
protected SqlQuery getSqlQuery()
-
getFactCount
protected java.lang.String getFactCount()
-
getTable
protected JdbcSchema.Table getTable(JdbcSchema db, RolapStar.Table rt)
-
getTable
protected JdbcSchema.Table getTable(JdbcSchema db, java.lang.String name)
-
getColumn
protected JdbcSchema.Table.Column getColumn(JdbcSchema.Table table, java.lang.String name)
-
getRolapStarColumnName
protected java.lang.String getRolapStarColumnName(RolapStar.Column rColumn)
-
addForeignKeyToNotLostColumnUsages
protected void addForeignKeyToNotLostColumnUsages(JdbcSchema.Table.Column column)
-
makeLostAggregateTableName
java.lang.String makeLostAggregateTableName(java.lang.String factTableName)
-
makeCollapsedAggregateTableName
java.lang.String makeCollapsedAggregateTableName(java.lang.String factTableName)
-
createLost
public java.lang.String createLost()
Return a String containing the sql code to create a lost dimension table.- Returns:
- lost dimension sql code
-
insertIntoLost
public java.lang.String insertIntoLost()
Return the sql code to populate a lost dimension table from the fact table.
-
createCollapsed
public java.lang.String createCollapsed()
Return a String containing the sql code to create a collapsed dimension table.- Returns:
- collapsed dimension sql code
-
insertIntoCollapsed
public java.lang.String insertIntoCollapsed()
Return the sql code to populate a collapsed dimension table from the fact table.
-
-