Package mondrian.rolap.aggmatcher
Class AggStar
java.lang.Object
mondrian.rolap.aggmatcher.AggStar
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 Table
Each inner class is non-static meaning that instances have implied references to the enclosing object.
- Author:
- Richard M. Emberson
-
Nested Class Summary
Modifier and TypeClassDescriptionclass
This class represents a dimension table.class
This is an aggregate fact table.class
Base Table class for the FactTable and DimTable classes. -
Method Summary
Modifier and TypeMethodDescriptionFind a table by name (alias) that is a descendant of the base fact table.Returns the BitKey.Returns a BitKey containing only distinct measures.Get the fact table.Get the foreign-key/level BitKey.Returns a BitKey of all measures.long
getSize()
Returns a measure of the IO cost of querying this table.getStar()
Get this AggStar's RolapStar.boolean
Returns whether this AggStar has foreign keys.boolean
boolean
Return true if AggStar has levelsboolean
Return true if AggStar has measuresboolean
Returns true if every level column in the AggStar is collapsed.lookupColumn
(int bitPos) Get the Column at the bit position.lookupLevel
(int bitPos) Get the Level at the given bit position or return null.lookupMeasure
(int bitPos) Get the Measure at the given bit position or return null.static AggStar
makeAggStar
(RolapStar star, JdbcSchema.Table dbTable, MessageRecorder msgRecorder, long approxRowCount) Creates an AggStar and all of itsAggStar.Table
,AggStar.Table.Column
s, etc.void
print
(PrintWriter pw, String prefix) Print this AggStar.boolean
Return true if this AggStar's level BitKey equals thelevelBitKey
parameter and if this AggStar's measure BitKey is a super set (proper or not) of themeasureBitKey
parameter.boolean
superSetMatch
(BitKey bitKey) Is this AggStar's BitKey a super set (proper or not) of the BitKey parameter.toString()
-
Method Details
-
makeAggStar
public static AggStar makeAggStar(RolapStar star, JdbcSchema.Table dbTable, MessageRecorder msgRecorder, long approxRowCount) Creates an AggStar and all of itsAggStar.Table
,AggStar.Table.Column
s, etc. -
getFactTable
Get the fact table.- Returns:
- the fact table
-
findTable
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.ChooseAggregateByVolume
is true, then volume is returned, otherwise row count. -
getForeignKeyBitKey
-
superSetMatch
Is this AggStar's BitKey a super set (proper or not) of the BitKey parameter.- Returns:
- true if it is a super set
-
select
Return true if this AggStar's level BitKey equals thelevelBitKey
parameter and if this AggStar's measure BitKey is a super set (proper or not) of themeasureBitKey
parameter. -
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
Returns the BitKey. -
getLevelBitKey
Get the foreign-key/level BitKey. -
getMeasureBitKey
Returns a BitKey of all measures. -
getDistinctMeasureBitKey
Returns a BitKey containing only distinct measures. -
lookupMeasure
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
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
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() -
toString
-
print
Print this AggStar.
-