|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectmondrian.olap.OlapElementBase
mondrian.olap.CubeBase
mondrian.rolap.RolapCube
public class RolapCube
RolapCube
implements Cube
for a ROLAP database.
Nested Class Summary | |
---|---|
static class |
RolapCube.CubeComparator
|
Field Summary | |
---|---|
(package private) MondrianDef.Relation |
fact
For SQL generator. |
(package private) RolapBaseCubeMeasure |
factCountMeasure
|
(package private) List<RolapHierarchy> |
hierarchyList
|
Fields inherited from class mondrian.olap.CubeBase |
---|
CATALOG_NAME, CUBE_NAME, DIMENSION_UNIQUE_NAME, dimensions, HIERARCHY_UNIQUE_NAME, LEVEL_NUMBER, LEVEL_UNIQUE_NAME, maxNofConstraintsForAdSchemaMember, MDPROP_USERDEFINED0, MDTREEOP_CHILDREN, MDTREEOP_SELF, MEMBER_CAPTION, MEMBER_NAME, MEMBER_TYPE, MEMBER_UNIQUE_NAME, name, SCHEMA_NAME, Tree_Operator |
Fields inherited from class mondrian.olap.OlapElementBase |
---|
caption |
Constructor Summary | |
---|---|
RolapCube(RolapSchema schema,
MondrianDef.Schema xmlSchema,
MondrianDef.Cube xmlCube,
boolean load)
Creates a RolapCube from a regular cube. |
|
RolapCube(RolapSchema schema,
MondrianDef.Schema xmlSchema,
MondrianDef.VirtualCube xmlVirtualCube,
boolean load)
Creates a RolapCube from a virtual cube. |
Method Summary | |
---|---|
void |
checkAggregateModifications()
Check if there are modifications in the aggregations cache |
void |
clearCachedAggregations()
Clear the in memory aggregate cache associated with this Cube, but only if Disabling Caching has been enabled. |
void |
clearCachedAggregations(boolean forced)
Clear the in memory aggregate cache associated with this Cube. |
(package private) void |
createCalculatedMember(RolapHierarchy hierarchy,
String name,
Calc calc)
Creates a calculated member. |
Member |
createCalculatedMember(String xml)
Creates a calculated member in this cube. |
(package private) RolapCubeDimension |
createDimension(MondrianDef.CubeDimension xmlCubeDimension,
MondrianDef.Schema xmlSchema)
|
(package private) static Exp |
createDummyExp(Calc calc)
Creates an expression that compiles to a given compiled expression. |
(package private) void |
createUsage(RolapCubeHierarchy hierarchy,
MondrianDef.CubeDimension cubeDim)
|
(package private) RolapHierarchy |
findBaseCubeHierarchy(RolapHierarchy hierarchy)
Locates the base cube hierarchy for a particular virtual hierarchy. |
RolapCubeLevel |
findBaseCubeLevel(RolapLevel level)
Locates the base cube level for a particular virtual level. |
ExplicitRules.Group |
getAggGroup()
|
(package private) RolapMeasure |
getAtomicCellCountMeasure()
Returns the system measure that counts the number of atomic cells in a given cell. |
(package private) static CellFormatter |
getCellFormatter(String cellFormatterClassName)
Given the name of a cell formatter class, returns a cell formatter. |
(package private) MondrianDef.RelationOrJoin |
getFact()
Returns this cube's fact table, null if the cube is virtual. |
(package private) RolapMeasure |
getFactCountMeasure()
Returns the system measure that counts the number of fact table rows in a given cell. |
(package private) HierarchyUsage |
getFirstUsage(Hierarchy hier)
|
List<RolapHierarchy> |
getHierarchies()
Returns a list of all hierarchies in this cube, in order of dimension. |
protected org.apache.log4j.Logger |
getLogger()
|
(package private) List<Member> |
getMeasures()
|
Hierarchy |
getMeasuresHierarchy()
Returns the the measures hierarchy. |
List<RolapMember> |
getMeasuresMembers()
|
Member[] |
getMembersForQuery(String query,
List<Member> calcMembers)
Returns Member[]. |
NamedSet[] |
getNamedSets()
Returns the named sets of this cube. |
RolapSchema |
getSchema()
|
SchemaReader |
getSchemaReader()
Returns the schema reader which enforces the appropriate access-control context. |
SchemaReader |
getSchemaReader(Role role)
Returns a SchemaReader for which this cube is the context for
lookup up members. |
RolapStar |
getStar()
Returns this cube's underlying star schema. |
RolapHierarchy |
getTimeHierarchy(String funName)
Returns the time hierarchy for this cube. |
HierarchyUsage[] |
getUsages(Hierarchy hierarchy)
A Hierarchy may have one or more HierarchyUsages. |
boolean |
hasAggGroup()
|
boolean |
isCacheAggregations()
Returns true if this Cube is either virtual or if the Cube's RolapStar is caching aggregates. |
boolean |
isVirtual()
Returns whether this cube is virtual. |
(package private) void |
loadAggGroup(MondrianDef.Cube xmlCube)
|
(package private) MondrianDef.CubeDimension |
lookup(MondrianDef.CubeDimension[] xmlDimensions,
String name)
|
OlapElement |
lookupChild(SchemaReader schemaReader,
Id.Segment s)
|
OlapElement |
lookupChild(SchemaReader schemaReader,
Id.Segment s,
MatchType matchType)
Looks up a child element, returning null if it does not exist. |
protected RolapStar.Column |
makeColumns(RolapStar.Table table,
RolapCubeLevel level,
RolapStar.Column parentColumn,
String usagePrefix)
Adds a column to the appropriate table in the RolapStar . |
Set<Dimension> |
nonJoiningDimensions(Member[] tuple)
Finds out non joining dimensions for this cube. |
Set<Dimension> |
nonJoiningDimensions(Set<Dimension> otherDims)
Finds out non joining dimensions for this cube. |
(package private) void |
processFormatStringAttribute(MondrianDef.CalculatedMember xmlCalcMember,
StringBuilder buf)
|
void |
pushAggregateModificationsToGlobalCache()
Push all modifications of the aggregations to global cache, so other queries can start using the new cache |
(package private) void |
registerDimension(RolapCubeDimension dimension)
Understand this and you are no longer a novice. |
void |
setCacheAggregations(boolean cache)
Set if this (non-virtual) Cube's RolapStar should cache aggregations. |
boolean |
shouldIgnoreUnrelatedDimensions(String baseCubeName)
This method tells us if unrelated dimensions to measures from the input base cube should be pushed to default member or not during aggregation. |
Methods inherited from class mondrian.olap.CubeBase |
---|
getDescription, getDimension, getDimensions, getHierarchy, getMonthLevel, getName, getQualifiedName, getQuarterLevel, getUniqueName, getWeekLevel, getYearLevel, lookupDimension, lookupHierarchy |
Methods inherited from class mondrian.olap.OlapElementBase |
---|
clone, computeHashCode, equals, equals, getCaption, hashCode, setCaption, toString |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface mondrian.olap.OlapElement |
---|
getCaption |
Field Detail |
---|
final MondrianDef.Relation fact
RolapBaseCubeMeasure factCountMeasure
final List<RolapHierarchy> hierarchyList
Constructor Detail |
---|
RolapCube(RolapSchema schema, MondrianDef.Schema xmlSchema, MondrianDef.Cube xmlCube, boolean load)
RolapCube
from a regular cube.
RolapCube(RolapSchema schema, MondrianDef.Schema xmlSchema, MondrianDef.VirtualCube xmlVirtualCube, boolean load)
RolapCube
from a virtual cube.
Method Detail |
---|
static CellFormatter getCellFormatter(String cellFormatterClassName) throws Exception
cellFormatterClassName
- Name of cell formatter class
Exception
- if class cannot be instantiatedprotected org.apache.log4j.Logger getLogger()
getLogger
in class OlapElementBase
public boolean hasAggGroup()
public ExplicitRules.Group getAggGroup()
void loadAggGroup(MondrianDef.Cube xmlCube)
void processFormatStringAttribute(MondrianDef.CalculatedMember xmlCalcMember, StringBuilder buf)
public RolapSchema getSchema()
public NamedSet[] getNamedSets()
public SchemaReader getSchemaReader()
getSchemaReader(Role)
public SchemaReader getSchemaReader(Role role)
Cube
SchemaReader
for which this cube is the context for
lookup up members.
If role
is null, the returned schema reader also obeys the
access-control profile of role.
MondrianDef.CubeDimension lookup(MondrianDef.CubeDimension[] xmlDimensions, String name)
public boolean isCacheAggregations()
public void setCacheAggregations(boolean cache)
cache
- Whether this Cube's RolapStar should cache aggregationspublic void clearCachedAggregations()
public void clearCachedAggregations(boolean forced)
public void checkAggregateModifications()
public void pushAggregateModificationsToGlobalCache()
public RolapStar getStar()
void createUsage(RolapCubeHierarchy hierarchy, MondrianDef.CubeDimension cubeDim)
public HierarchyUsage[] getUsages(Hierarchy hierarchy)
hierarchy
- Hierarchy
HierarchyUsage getFirstUsage(Hierarchy hier)
void registerDimension(RolapCubeDimension dimension)
dimension
- Dimensionprotected RolapStar.Column makeColumns(RolapStar.Table table, RolapCubeLevel level, RolapStar.Column parentColumn, String usagePrefix)
RolapStar
.
Note that if the RolapLevel has a table attribute, then the associated
column needs to be associated with that table.
public boolean shouldIgnoreUnrelatedDimensions(String baseCubeName)
baseCubeName
- name of the base cube for which we want
to check this property
public List<RolapHierarchy> getHierarchies()
TODO: Make this method return RolapCubeHierarchy, when the measures hierarchy is a RolapCubeHierarchy.
public Member[] getMembersForQuery(String query, List<Member> calcMembers)
Cube
query
has to be in the
format of something like "[with calculated members] select *members* on
columns from this
".
public RolapHierarchy getTimeHierarchy(String funName)
public Set<Dimension> nonJoiningDimensions(Member[] tuple)
tuple
- array of members
public Set<Dimension> nonJoiningDimensions(Set<Dimension> otherDims)
otherDims
- Set of dimensions to be tested for existence in this
cube
List<Member> getMeasures()
MondrianDef.RelationOrJoin getFact()
public boolean isVirtual()
RolapMeasure getFactCountMeasure()
RolapMeasure getAtomicCellCountMeasure()
A cell is atomic if all dimensions are at their lowest level.
If the fact table has a primary key, this measure is equivalent to the
fact count measure
.
RolapHierarchy findBaseCubeHierarchy(RolapHierarchy hierarchy)
hierarchy
- virtual hierarchy
public RolapCubeLevel findBaseCubeLevel(RolapLevel level)
level
- virtual level
RolapCubeDimension createDimension(MondrianDef.CubeDimension xmlCubeDimension, MondrianDef.Schema xmlSchema)
public OlapElement lookupChild(SchemaReader schemaReader, Id.Segment s)
public OlapElement lookupChild(SchemaReader schemaReader, Id.Segment s, MatchType matchType)
OlapElement
lookupChild
in interface OlapElement
lookupChild
in class CubeBase
public Hierarchy getMeasuresHierarchy()
public List<RolapMember> getMeasuresMembers()
public Member createCalculatedMember(String xml)
Cube
The XML string must be a <CalculatedMember/>
element, as defined in Mondrian.xml
.
xml
- XML stringvoid createCalculatedMember(RolapHierarchy hierarchy, String name, Calc calc)
The member will be called [{dimension name}].[{name}].
Not for public use.
hierarchy
- Hierarchy the calculated member belongs toname
- Name of membercalc
- Compiled expressionstatic Exp createDummyExp(Calc calc)
Use this for synthetic expressions that do not correspond to anything in an MDX parse tree, and just need to compile to a particular compiled expression. The expression has minimal amounts of metadata, for example type information, but the function has no name or description.
DummyExp
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |