Class 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 Detail

      • execution

        public final Execution execution
    • Constructor Detail

      • RolapResultEvaluatorRoot

        public RolapResultEvaluatorRoot​(RolapResult result)
    • Method Detail

      • 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
      • 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