Package mondrian.olap

Interface Cell

  • All Known Implementing Classes:
    RolapCell

    public interface Cell
    A Cell is an item in the grid of a Result. It is returned by Result.getCell(int[]).
    Since:
    6 August, 2001
    Author:
    jhyde
    • Method Detail

      • getCoordinateList

        List<Integer> getCoordinateList()
        Returns the coordinates of this Cell in its Result.
        Returns:
        Coordinates of this Cell
      • getValue

        Object getValue()
        Returns the cell's raw value. This is useful for sending to further data processing, such as plotting a chart.

        The value is never null. It may have various types:

      • getCachedFormatString

        String getCachedFormatString()
        Return the cached formatted string, that survives an aggregate cache clear.
      • getFormattedValue

        String getFormattedValue()
        Returns the cell's value formatted according to the current format string, and locale-specific settings such as currency symbol. The current format string may itself be derived via an expression. For more information about format strings, see Format.
      • isNull

        boolean isNull()
        Returns whether the cell's value is null.
      • isError

        boolean isError()
        Returns whether the cell's calculation returned an error.
      • getDrillThroughSQL

        String getDrillThroughSQL​(boolean extendedContext)
        Returns a SQL query that, when executed, returns drill through data for this Cell.

        If the parameter extendedContext is true, then the query will include all the levels (i.e. columns) of non-constraining members (i.e. members which are at the "All" level).

        If the parameter extendedContext is false, the query will exclude the levels (coulmns) of non-constraining members.

        The result is null if the cell is based upon a calculated member.

      • canDrillThrough

        boolean canDrillThrough()
        Returns true if drill through is possible for this Cell. Returns false if the Cell is based on a calculated measure.
        Returns:
        Whether can drill through on this cell
      • getDrillThroughCount

        int getDrillThroughCount()
        Returns the number of fact table rows which contributed to this Cell.
      • getPropertyValue

        Object getPropertyValue​(String propertyName)
        Returns the value of a property.
        Parameters:
        propertyName - Case-sensitive property name
        Returns:
        Value of property
      • getContextMember

        Member getContextMember​(Hierarchy hierarchy)
        Returns the context member for a particular dimension. The member is defined as follows (note that there is always a member):
        • If the dimension appears on one of the visible axes, the context member is simply the member on the current row or column.
        • If the dimension appears in the slicer, the context member is the member of that dimension in the slier.
        • Otherwise, the context member is the default member of that dimension (usually the 'all' member).
        Parameters:
        hierarchy - Hierarchy
        Returns:
        current member of given hierarchy
      • setValue

        void setValue​(org.olap4j.Scenario scenario,
                      Object newValue,
                      org.olap4j.AllocationPolicy allocationPolicy,
                      Object... allocationArgs)
        Helper method to implement Cell.setValue(java.lang.Object, org.olap4j.AllocationPolicy, java.lang.Object...).
        Parameters:
        scenario - Scenario
        newValue - New value
        allocationPolicy - Allocation policy
        allocationArgs - Arguments for allocation policy