Package mondrian.rolap
Class RolapAggregationManager
- java.lang.Object
-
- mondrian.rolap.RolapAggregationManager
-
- Direct Known Subclasses:
AggregationManager
public abstract class RolapAggregationManager extends Object
RolapAggregationManager
manages allSegment
s in the system.The bits of the implementation which depend upon dimensional concepts
RolapMember
, etc.) live in this class, and the other bits live in the derived class,AggregationManager
.- Since:
- 30 August, 2001
- Author:
- jhyde
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
RolapAggregationManager.PinSet
A set of segments which are pinned (prevented from garbage collection) for a short duration as a result of a cache inquiry.
-
Constructor Summary
Constructors Modifier Constructor Description protected
RolapAggregationManager()
Creates the RolapAggregationManager.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract RolapAggregationManager.PinSet
createPinSet()
Creates aRolapAggregationManager.PinSet
.mondrian.rolap.CellReader
getCacheCellReader()
Returns aCellReader
which reads cells from cache.abstract Object
getCellFromCache(CellRequest request)
Retrieves the value of a cell from the cache.abstract Object
getCellFromCache(CellRequest request, RolapAggregationManager.PinSet pinSet)
abstract String
getDrillThroughSql(DrillThroughCellRequest request, StarPredicate starPredicateSlicer, List<OlapElement> fields, boolean countOnly)
Generates a SQL statement which will return the rows which contribute to this request.static RolapCacheRegion
makeCacheRegion(RolapStar star, CacheControl.CellRegion region)
static DrillThroughCellRequest
makeDrillThroughRequest(Member[] members, boolean extendedContext, RolapCube cube, List<OlapElement> returnClauseMembers)
Creates a request for the fact-table rows underlying the cell identified bymembers
.static CellRequest
makeRequest(Member[] members)
Creates a request to evaluate the cell identified bymembers
.static CellRequest
makeRequest(RolapEvaluator evaluator)
Creates a request to evaluate the cell identified by the context specified inevaluator
.
-
-
-
Method Detail
-
makeRequest
public static CellRequest makeRequest(Member[] members)
Creates a request to evaluate the cell identified bymembers
.If any of the members is the null member, returns null, since there is no cell. If the measure is calculated, returns null.
- Parameters:
members
- Set of members which constrain the cell- Returns:
- Cell request, or null if the requst is unsatisfiable
-
makeDrillThroughRequest
public static DrillThroughCellRequest makeDrillThroughRequest(Member[] members, boolean extendedContext, RolapCube cube, List<OlapElement> returnClauseMembers)
Creates a request for the fact-table rows underlying the cell identified bymembers
.If any of the members is the null member, returns null, since there is no cell. If the measure is calculated, returns null.
- Parameters:
members
- Set of members which constrain the cellextendedContext
- If true, add non-constraining columns to the query for levels below each current member. This additional context makes the drill-through queries easier for humans to understand.cube
- Cube- Returns:
- Cell request, or null if the requst is unsatisfiable
-
makeRequest
public static CellRequest makeRequest(RolapEvaluator evaluator)
Creates a request to evaluate the cell identified by the context specified inevaluator
.If any of the members from the context is the null member, returns null, since there is no cell. If the measure is calculated, returns null.
- Parameters:
evaluator
- the cell specified by the evaluator context- Returns:
- Cell request, or null if the requst is unsatisfiable
-
getCellFromCache
public abstract Object getCellFromCache(CellRequest request)
Retrieves the value of a cell from the cache.- Parameters:
request
- Cell request- Returns:
- Cell value, or null if cell is not in any aggregation in cache,
or
Util.nullValue
if cell's value is null
-
getCellFromCache
public abstract Object getCellFromCache(CellRequest request, RolapAggregationManager.PinSet pinSet)
-
getDrillThroughSql
public abstract String getDrillThroughSql(DrillThroughCellRequest request, StarPredicate starPredicateSlicer, List<OlapElement> fields, boolean countOnly)
Generates a SQL statement which will return the rows which contribute to this request.- Parameters:
request
- Cell requestcountOnly
- If true, return a statment which returns only the countstarPredicateSlicer
- A StarPredicate representing slicer positions that could not be represented by the CellRequest, ornull
if no additional predicate is necessary.- Returns:
- SQL statement
-
makeCacheRegion
public static RolapCacheRegion makeCacheRegion(RolapStar star, CacheControl.CellRegion region)
-
getCacheCellReader
public mondrian.rolap.CellReader getCacheCellReader()
Returns aCellReader
which reads cells from cache.
-
createPinSet
public abstract RolapAggregationManager.PinSet createPinSet()
Creates aRolapAggregationManager.PinSet
.- Returns:
- a new PinSet
-
-