Package mondrian.rolap
Class RolapCacheRegion
- java.lang.Object
-
- mondrian.rolap.RolapCacheRegion
-
public class RolapCacheRegion extends Object
ARolapCacheRegion
represents a region of multidimensional space in the cache.The region is represented in terms of the columns of a given
RolapStar
, and constraints on those columns.Compare with
CacheControl.CellRegion
: aCellRegion
is in terms ofMember
objects (logical); whereas aRolapCacheRegion
is in terms of columns (physical).
-
-
Constructor Summary
Constructors Constructor Description RolapCacheRegion(RolapStar star, List<RolapStar.Measure> starMeasureList)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addPredicate(RolapStar.Column column, StarColumnPredicate predicate)
Adds a predicate which applies to a single column.void
addPredicate(StarPredicate predicate)
Adds a predicate which applies to multiple columns.Collection<StarColumnPredicate>
getColumnPredicates()
Returns the list of all column predicates.BitKey
getConstrainedColumnsBitKey()
StarColumnPredicate
getPredicate(int columnOrdinal)
Returns the predicate associated with thecolumnOrdinal
th column.StarColumnPredicate
getPredicate(String columnName)
Returns the predicate associated with thecolumnName
, where column name is the generic SQL expression in the form of:Collection<StarPredicate>
getPredicates()
Returns a collection of all multi-column predicates.
-
-
-
Constructor Detail
-
RolapCacheRegion
public RolapCacheRegion(RolapStar star, List<RolapStar.Measure> starMeasureList)
-
-
Method Detail
-
getConstrainedColumnsBitKey
public BitKey getConstrainedColumnsBitKey()
-
addPredicate
public void addPredicate(RolapStar.Column column, StarColumnPredicate predicate)
Adds a predicate which applies to a single column.- Parameters:
column
- Constrained columnpredicate
- Predicate
-
getPredicate
public StarColumnPredicate getPredicate(int columnOrdinal)
Returns the predicate associated with thecolumnOrdinal
th column.- Parameters:
columnOrdinal
- Column ordinal- Returns:
- Predicate, or null if not constrained
-
getPredicate
public StarColumnPredicate getPredicate(String columnName)
Returns the predicate associated with thecolumnName
, where column name is the generic SQL expression in the form of:table.column
- Parameters:
columnName
- Column name- Returns:
- Predicate, or null if not constrained
-
addPredicate
public void addPredicate(StarPredicate predicate)
Adds a predicate which applies to multiple columns.The typical example of a multi-column predicate is a member constraint. For example, the constraint "m between 1997.Q3 and 1998.Q2" translates into "year = 1997 and quarter >= Q3 or year = 1998 and quarter <= Q2".
- Parameters:
predicate
- Predicate
-
getPredicates
public Collection<StarPredicate> getPredicates()
Returns a collection of all multi-column predicates.- Returns:
- Collection of all multi-column constraints
-
getColumnPredicates
public Collection<StarColumnPredicate> getColumnPredicates()
Returns the list of all column predicates.
-
-