Package mondrian.rolap.aggmatcher
Class AggStar
- java.lang.Object
-
- mondrian.rolap.aggmatcher.AggStar
-
public class AggStar extends Object
Aggregate table version of a RolapStar for a fact table.There is the following class structure:
AggStar Table JoinCondition Column Level extends Column FactTable extends Table Measure extends Table.Column DimTable extends TableEach inner class is non-static meaning that instances have implied references to the enclosing object.
- Author:
- Richard M. Emberson
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classAggStar.DimTableThis class represents a dimension table.classAggStar.FactTableThis is an aggregate fact table.classAggStar.TableBase Table class for the FactTable and DimTable classes.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AggStar.TablefindTable(String name)Find a table by name (alias) that is a descendant of the base fact table.BitKeygetBitKey()Returns the BitKey.BitKeygetDistinctMeasureBitKey()Returns a BitKey containing only distinct measures.AggStar.FactTablegetFactTable()Get the fact table.BitKeygetForeignKeyBitKey()BitKeygetLevelBitKey()Get the foreign-key/level BitKey.BitKeygetMeasureBitKey()Returns a BitKey of all measures.longgetSize()Returns a measure of the IO cost of querying this table.RolapStargetStar()Get this AggStar's RolapStar.booleanhasForeignKeys()Returns whether this AggStar has foreign keys.booleanhasIgnoredColumns()booleanhasLevels()Return true if AggStar has levelsbooleanhasMeasures()Return true if AggStar has measuresbooleanisFullyCollapsed()Returns true if every level column in the AggStar is collapsed.AggStar.Table.ColumnlookupColumn(int bitPos)Get the Column at the bit position.AggStar.Table.LevellookupLevel(int bitPos)Get the Level at the given bit position or return null.AggStar.FactTable.MeasurelookupMeasure(int bitPos)Get the Measure at the given bit position or return null.static AggStarmakeAggStar(RolapStar star, JdbcSchema.Table dbTable, MessageRecorder msgRecorder, long approxRowCount)Creates an AggStar and all of itsAggStar.Table,AggStar.Table.Columns, etc.voidprint(PrintWriter pw, String prefix)Print this AggStar.booleanselect(BitKey levelBitKey, BitKey coreLevelBitKey, BitKey measureBitKey)Return true if this AggStar's level BitKey equals thelevelBitKeyparameter and if this AggStar's measure BitKey is a super set (proper or not) of themeasureBitKeyparameter.booleansuperSetMatch(BitKey bitKey)Is this AggStar's BitKey a super set (proper or not) of the BitKey parameter.StringtoString()
-
-
-
Method Detail
-
makeAggStar
public static AggStar makeAggStar(RolapStar star, JdbcSchema.Table dbTable, MessageRecorder msgRecorder, long approxRowCount)
Creates an AggStar and all of itsAggStar.Table,AggStar.Table.Columns, etc.
-
getFactTable
public AggStar.FactTable getFactTable()
Get the fact table.- Returns:
- the fact table
-
findTable
public AggStar.Table findTable(String name)
Find a table by name (alias) that is a descendant of the base fact table.- Parameters:
name- the table to find- Returns:
- the table or null
-
getSize
public long getSize()
Returns a measure of the IO cost of querying this table. It can be either the row count or the row count times the size of a row. If the propertyMondrianProperties.ChooseAggregateByVolumeis true, then volume is returned, otherwise row count.
-
getForeignKeyBitKey
public BitKey getForeignKeyBitKey()
-
superSetMatch
public boolean superSetMatch(BitKey bitKey)
Is this AggStar's BitKey a super set (proper or not) of the BitKey parameter.- Returns:
- true if it is a super set
-
select
public boolean select(BitKey levelBitKey, BitKey coreLevelBitKey, BitKey measureBitKey)
Return true if this AggStar's level BitKey equals thelevelBitKeyparameter and if this AggStar's measure BitKey is a super set (proper or not) of themeasureBitKeyparameter.
-
getStar
public RolapStar getStar()
Get this AggStar's RolapStar.
-
hasMeasures
public boolean hasMeasures()
Return true if AggStar has measures
-
hasLevels
public boolean hasLevels()
Return true if AggStar has levels
-
hasForeignKeys
public boolean hasForeignKeys()
Returns whether this AggStar has foreign keys.
-
getBitKey
public BitKey getBitKey()
Returns the BitKey.
-
getLevelBitKey
public BitKey getLevelBitKey()
Get the foreign-key/level BitKey.
-
getMeasureBitKey
public BitKey getMeasureBitKey()
Returns a BitKey of all measures.
-
getDistinctMeasureBitKey
public BitKey getDistinctMeasureBitKey()
Returns a BitKey containing only distinct measures.
-
lookupMeasure
public AggStar.FactTable.Measure lookupMeasure(int bitPos)
Get the Measure at the given bit position or return null. Note that there is no check that the bit position is within the range of the array of columns. Nor is there a check that the column type at that position is a Measure.- Returns:
- A Measure or null.
-
lookupLevel
public AggStar.Table.Level lookupLevel(int bitPos)
Get the Level at the given bit position or return null. Note that there is no check that the bit position is within the range of the array of columns. Nor is there a check that the column type at that position is a Level.- Returns:
- A Level or null.
-
lookupColumn
public AggStar.Table.Column lookupColumn(int bitPos)
Get the Column at the bit position. Note that there is no check that the bit position is within the range of the array of columns.
-
isFullyCollapsed
public boolean isFullyCollapsed()
Returns true if every level column in the AggStar is collapsed.
-
hasIgnoredColumns
public boolean hasIgnoredColumns()
-
print
public void print(PrintWriter pw, String prefix)
Print this AggStar.
-
-