mondrian.rolap.aggmatcher
Class AggGen

java.lang.Object
  extended by mondrian.rolap.aggmatcher.AggGen

public class AggGen
extends 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
AggGen(String cubeName, RolapStar star, RolapStar.Column[] columns)
           
 
Method Summary
protected  void addForeignKeyToNotLostColumnUsages(JdbcSchema.Table.Column column)
           
 String createCollapsed()
          Return a String containing the sql code to create a collapsed dimension table.
 String createLost()
          Return a String containing the sql code to create a lost dimension table.
protected  JdbcSchema.Table.Column getColumn(JdbcSchema.Table table, String name)
           
protected  String getFactCount()
           
protected  RolapStar.Table getFactTable()
           
protected  String getFactTableName()
           
protected  String getRolapStarColumnName(RolapStar.Column rColumn)
           
protected  SqlQuery getSqlQuery()
           
protected  JdbcSchema.Table getTable(JdbcSchema db, RolapStar.Table rt)
           
protected  JdbcSchema.Table getTable(JdbcSchema db, String name)
           
 String insertIntoCollapsed()
          Return the sql code to populate a collapsed dimension table from the fact table.
 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)  String makeCollapsedAggregateTableName(String factTableName)
           
(package private)  String makeLostAggregateTableName(String factTableName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AggGen

public AggGen(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 String getFactTableName()

getSqlQuery

protected SqlQuery getSqlQuery()

getFactCount

protected String getFactCount()

getTable

protected JdbcSchema.Table getTable(JdbcSchema db,
                                    RolapStar.Table rt)

getTable

protected JdbcSchema.Table getTable(JdbcSchema db,
                                    String name)

getColumn

protected JdbcSchema.Table.Column getColumn(JdbcSchema.Table table,
                                            String name)

getRolapStarColumnName

protected String getRolapStarColumnName(RolapStar.Column rColumn)

addForeignKeyToNotLostColumnUsages

protected void addForeignKeyToNotLostColumnUsages(JdbcSchema.Table.Column column)

makeLostAggregateTableName

String makeLostAggregateTableName(String factTableName)

makeCollapsedAggregateTableName

String makeCollapsedAggregateTableName(String factTableName)

createLost

public String createLost()
Return a String containing the sql code to create a lost dimension table.

Returns:
lost dimension sql code

insertIntoLost

public String insertIntoLost()
Return the sql code to populate a lost dimension table from the fact table.


createCollapsed

public String createCollapsed()
Return a String containing the sql code to create a collapsed dimension table.

Returns:
collapsed dimension sql code

insertIntoCollapsed

public String insertIntoCollapsed()
Return the sql code to populate a collapsed dimension table from the fact table.


SourceForge.net_Logo