mondrian.rolap.agg
Class CellRequest

java.lang.Object
  extended by mondrian.rolap.agg.CellRequest

public class CellRequest
extends Object

A CellRequest contains the context necessary to get a cell value from a star.

Since:
21 March, 2002
Author:
jhyde
 

Field Summary
 boolean drillThrough
           
 boolean extendedContext
           
 
Constructor Summary
CellRequest(RolapStar.Measure measure, boolean extendedContext, boolean drillThrough)
          Creates a CellRequest.
 
Method Summary
 void addAggregateList(BitKey compoundBitKey, StarPredicate compoundPredicate)
          Add compound member (formed via aggregate function) constraint to the Cell.
 void addConstrainedColumn(RolapStar.Column column, StarColumnPredicate predicate)
          Adds a constraint to this request.
 Map<BitKey,StarPredicate> getCompoundPredicateMap()
          Get the map of compound predicates
 RolapStar.Column[] getConstrainedColumns()
           
 BitKey getConstrainedColumnsBitKey()
          Returns the BitKey for the list of columns.
 RolapStar.Measure getMeasure()
           
 Object[] getSingleValues()
          Returns an array of the values for each column.
 List<StarColumnPredicate> getValueList()
           
 boolean isUnsatisfiable()
          Returns whether this cell request is impossible to satisfy.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

extendedContext

public final boolean extendedContext

drillThrough

public final boolean drillThrough
Constructor Detail

CellRequest

public CellRequest(RolapStar.Measure measure,
                   boolean extendedContext,
                   boolean drillThrough)
Creates a CellRequest.

Parameters:
measure - Measure the request is for
extendedContext - If a drill-through request, whether to join in unconstrained levels so as to display extra columns
drillThrough - Whether this is a request for a drill-through set
Method Detail

addConstrainedColumn

public final void addConstrainedColumn(RolapStar.Column column,
                                       StarColumnPredicate predicate)
Adds a constraint to this request.

Parameters:
column - Column to constraint
predicate - Constraint to apply, or null to add column to the output without applying constraint

addAggregateList

public void addAggregateList(BitKey compoundBitKey,
                             StarPredicate compoundPredicate)
Add compound member (formed via aggregate function) constraint to the Cell.

Parameters:
compoundBitKey -
compoundPredicate -

getMeasure

public RolapStar.Measure getMeasure()

getConstrainedColumns

public RolapStar.Column[] getConstrainedColumns()

getConstrainedColumnsBitKey

public BitKey getConstrainedColumnsBitKey()
Returns the BitKey for the list of columns.

Returns:
BitKey for the list of columns

getCompoundPredicateMap

public Map<BitKey,StarPredicate> getCompoundPredicateMap()
Get the map of compound predicates

Returns:
predicate map

getValueList

public List<StarColumnPredicate> getValueList()

getSingleValues

public Object[] getSingleValues()
Returns an array of the values for each column.

The caller must check whether this request is satisfiable before calling this method. May throw NullPointerException if request is not satisfiable.

Pre-condition:
!isUnsatisfiable()
Returns:
Array of values for each column

isUnsatisfiable

public boolean isUnsatisfiable()
Returns whether this cell request is impossible to satisfy. This occurs when the same column has two or more inconsistent constraints.

Returns:
whether this cell request is impossible to satisfy

SourceForge.net_Logo