mondrian.rolap
Class RolapEvaluator.RolapEvaluatorRoot

java.lang.Object
  extended by mondrian.rolap.RolapEvaluator.RolapEvaluatorRoot
Direct Known Subclasses:
RolapResult.RolapResultEvaluatorRoot
Enclosing class:
RolapEvaluator

protected static class RolapEvaluator.RolapEvaluatorRoot
extends Object

 

Field Summary
(package private)  Map<List<Object>,Calc> compiledExps
           
(package private)  RolapConnection connection
           
(package private)  RolapCube cube
           
(package private)  SqlQuery.Dialect currentDialect
           
(package private)  Map<Object,Object> expResultCache
           
(package private)  SchemaReader schemaReader
           
(package private)  Map<Object,Object> tmpExpResultCache
           
 
Constructor Summary
RolapEvaluator.RolapEvaluatorRoot(Query query)
           
 
Method Summary
 void clearResultCache(boolean clearValidResult)
          Clears the expression result cache.
protected  Object evaluateNamedSet(String name, Exp exp)
          Evaluates a named set.
 Object getCacheResult(Object key)
          Gets result from cache.
(package private)  Calc getCompiled(Exp exp, boolean scalar, ResultStyle resultStyle)
          Implements a cheap-and-cheerful mapping from expressions to compiled expressions.
 Object getParameterValue(ParameterSlot slot)
          Returns the value of a parameter, evaluating its default expression if necessary.
 Date getQueryStartTime()
          Get query start time.
protected  void init(Evaluator evaluator)
          First evaluator calls this method on construction.
 void putCacheResult(Object key, Object result, boolean isValidResult)
          Puts result in cache.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

expResultCache

final Map<Object,Object> expResultCache

tmpExpResultCache

final Map<Object,Object> tmpExpResultCache

cube

final RolapCube cube

connection

final RolapConnection connection

schemaReader

final SchemaReader schemaReader

compiledExps

final Map<List<Object>,Calc> compiledExps

currentDialect

final SqlQuery.Dialect currentDialect
Constructor Detail

RolapEvaluator.RolapEvaluatorRoot

public RolapEvaluator.RolapEvaluatorRoot(Query query)
Method Detail

getCompiled

final Calc getCompiled(Exp exp,
                       boolean scalar,
                       ResultStyle resultStyle)
Implements a cheap-and-cheerful mapping from expressions to compiled expressions.

TODO: Save compiled expressions somewhere better.

Parameters:
exp - Expression
scalar - Whether expression is scalar
resultStyle - Preferred result style; if null, use query's default result style; ignored if expression is scalar
Returns:
compiled expression

evaluateNamedSet

protected Object evaluateNamedSet(String name,
                                  Exp exp)
Evaluates a named set.

The default implementation throws UnsupportedOperationException.


init

protected void init(Evaluator evaluator)
First evaluator calls this method on construction.


getParameterValue

public Object getParameterValue(ParameterSlot slot)
Returns the value of a parameter, evaluating its default expression if necessary.

The default implementation throws UnsupportedOperationException.


putCacheResult

public final void putCacheResult(Object key,
                                 Object result,
                                 boolean isValidResult)
Puts result in cache.

Parameters:
key - key
result - value to be cached
isValidResult - indicate if this result is valid

getCacheResult

public final Object getCacheResult(Object key)
Gets result from cache.

Parameters:
key - cache key
Returns:
cached expression

clearResultCache

public final void clearResultCache(boolean clearValidResult)
Clears the expression result cache.

Parameters:
clearValidResult - whether to clear valid expression results

getQueryStartTime

public Date getQueryStartTime()
Get query start time.

Returns:
the query start time

SourceForge.net_Logo