Package mondrian.rolap
Class RolapResult.RolapResultEvaluatorRoot
- java.lang.Object
-
- mondrian.rolap.RolapResult.RolapResultEvaluatorRoot
-
- Enclosing class:
- RolapResult
protected static class RolapResult.RolapResultEvaluatorRoot extends Object
Extension toRolapEvaluatorRootwhich is capable of evaluating sets and named sets.A given set is only evaluated once each time a query is executed; the result is added to the
namedSetEvaluatorscache on first execution and re-used.Named sets are always evaluated in the context of the slicer.
-
-
Constructor Summary
Constructors Constructor Description RolapResultEvaluatorRoot(RolapResult result)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearResultCache(boolean clearValidResult)Clears the expression result cache.protected Evaluator.NamedSetEvaluatorevaluateNamedSet(NamedSet namedSet, boolean create)Evaluates a named set.protected Evaluator.SetEvaluatorevaluateSet(Exp exp, boolean create)Evaluates a named set represented by an expression.ObjectgetCacheResult(Object key)Gets result from cache.ObjectgetParameterValue(ParameterSlot slot)Returns the value of a parameter, evaluating its default expression if necessary.DategetQueryStartTime()Get query start time.voidputCacheResult(Object key, Object result, boolean isValidResult)Puts result in cache.
-
-
-
Field Detail
-
execution
public final Execution execution
-
-
Constructor Detail
-
RolapResultEvaluatorRoot
public RolapResultEvaluatorRoot(RolapResult result)
-
-
Method Detail
-
evaluateNamedSet
protected Evaluator.NamedSetEvaluator evaluateNamedSet(NamedSet namedSet, boolean create)
Evaluates a named set.The default implementation throws
UnsupportedOperationException.- Parameters:
namedSet- Named setcreate- Whether to create named set evaluator if not found
-
evaluateSet
protected Evaluator.SetEvaluator evaluateSet(Exp exp, boolean create)
Evaluates a named set represented by an expression.The default implementation throws
UnsupportedOperationException.- Parameters:
exp- Expressioncreate- Whether to create named set evaluator if not found
-
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- keyresult- value to be cachedisValidResult- 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
-
-