Class RolapResult

  • All Implemented Interfaces:
    Result

    public class RolapResult
    extends ResultBase
    A RolapResult is the result of running a query.
    Since:
    10 August, 2001
    Author:
    jhyde
    • Field Detail

      • LOGGER

        static final org.apache.log4j.Logger LOGGER
      • formatValueFormatters

        protected static final java.util.Map<java.util.Locale,​RolapResult.ValueFormatter> formatValueFormatters
        Synchronized Map from Locale to ValueFormatter. It is expected that there will be only a small number of Locale's. Should these be a WeakHashMap?
    • Constructor Detail

      • RolapResult

        RolapResult​(Execution execution,
                    boolean execute)
        Creates a RolapResult.
        Parameters:
        execution - Execution of a statement
        execute - Whether to execute the query
    • Method Detail

      • removeDimension

        protected boolean removeDimension​(Dimension dimension,
                                          java.util.List<java.util.List<Member>> memberLists)
      • getExecution

        public final Execution getExecution()
      • replaceNonAllMembers

        protected boolean replaceNonAllMembers​(java.util.List<java.util.List<Member>> nonAllMembers,
                                               mondrian.rolap.RolapResult.AxisMemberList axisMembers)
      • loadMembers

        protected void loadMembers​(java.util.List<java.util.List<Member>> nonAllMembers,
                                   RolapEvaluator evaluator,
                                   QueryAxis axis,
                                   Calc calc,
                                   mondrian.rolap.RolapResult.AxisMemberList axisMembers)
      • evalLoad

        void evalLoad​(java.util.List<java.util.List<Member>> nonAllMembers,
                      int cnt,
                      Evaluator evaluator,
                      QueryAxis axis,
                      Calc calc,
                      mondrian.rolap.RolapResult.AxisMemberList axisMembers)
      • loadSpecialMembers

        protected void loadSpecialMembers​(java.util.List<Member> nonDefaultAllMembers,
                                          java.util.List<java.util.List<Member>> nonAllMembers,
                                          java.util.List<Member> measureMembers)
        Finds all root Members 1) whose Hierarchy does not have an ALL Member, 2) whose default Member is not the ALL Member and 3) all Measures.
        Parameters:
        nonDefaultAllMembers - List of all root Members for Hierarchies whose default Member is not the ALL Member.
        nonAllMembers - List of root Members for Hierarchies that have no ALL Member.
        measureMembers - List all Measures
      • getLogger

        protected org.apache.log4j.Logger getLogger()
        Specified by:
        getLogger in class ResultBase
      • getCell

        public Cell getCell​(int[] pos)
        Get the Cell for the given Cell position.
        Parameters:
        pos - Cell position.
        Returns:
        the Cell associated with the Cell position.
      • isDirty

        boolean isDirty()
      • evaluateExp

        java.lang.Object evaluateExp​(Calc calc,
                                     RolapEvaluator slicerEvaluator,
                                     Evaluator contextEvaluator)
        Evaluates an expression. Intended for evaluating named sets.

        Does not modify the contents of the evaluator.

        Parameters:
        calc - Compiled expression
        slicerEvaluator - Evaluation context for slicers
        contextEvaluator - Evaluation context (optional)
        Returns:
        Result
      • getCellOrdinal

        int getCellOrdinal​(int[] pos)
        Converts a set of cell coordinates to a cell ordinal.

        This method can be expensive, because the ordinal is computed from the length of the axes, and therefore the axes need to be instantiated.

      • makeModulos

        protected void makeModulos()
        Instantiates the calculator to convert cell coordinates to a cell ordinal and vice versa.

        To create the calculator, any axis that is based upon an Iterable is converted into a List - thus increasing memory usage.

      • getCellMembers

        RolapMember[] getCellMembers​(int[] pos)
        Called only by RolapCell. Use this when creating an Evaluator is not required.
        Parameters:
        pos - Coordinates of cell
        Returns:
        Members which form the context of the given cell
      • getRootEvaluator

        Evaluator getRootEvaluator()
      • getEvaluator

        Evaluator getEvaluator​(int[] pos)
      • populateEvaluator

        void populateEvaluator​(Evaluator evaluator,
                               int[] pos)