Class RolapResult.RolapResultEvaluatorRoot

java.lang.Object
mondrian.rolap.RolapResult.RolapResultEvaluatorRoot
Enclosing class:
RolapResult

protected static class RolapResult.RolapResultEvaluatorRoot extends Object
Extension to RolapEvaluatorRoot which 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 namedSetEvaluators cache on first execution and re-used.

Named sets are always evaluated in the context of the slicer.

  • Field Details

    • execution

      public final Execution execution
  • Constructor Details

    • RolapResultEvaluatorRoot

      public RolapResultEvaluatorRoot(RolapResult result)
  • Method Details

    • evaluateNamedSet

      protected Evaluator.NamedSetEvaluator evaluateNamedSet(NamedSet namedSet, boolean create)
      Evaluates a named set.

      The default implementation throws UnsupportedOperationException.

      Parameters:
      namedSet - Named set
      create - 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 - Expression
      create - 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 - 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