mondrian.rolap
Class RolapCell

java.lang.Object
  extended by mondrian.rolap.RolapCell
All Implemented Interfaces:
Cell

 class RolapCell
extends java.lang.Object
implements Cell

RolapCell implements Cell within a RolapResult.

Version:
$Id: //open/mondrian/src/main/mondrian/rolap/RolapCell.java#39 $

Field Summary
protected  RolapResult.CellInfo ci
           
protected  int[] pos
           
 
Constructor Summary
RolapCell(RolapResult result, int[] pos, RolapResult.CellInfo ci)
          Creates a RolapCell.
 
Method Summary
 boolean canDrillThrough()
          Returns whether it is possible to drill through this cell.
static RolapCube chooseDrillThroughCube(Member[] currentMembers, RolapCube defaultCube)
           
 java.lang.String getCachedFormatString()
          Return the cached formatted string, that survives an aggregate cache clear.
 Member getContextMember(Dimension dimension)
          Returns the context member for a particular dimension.
 java.util.List<java.lang.Integer> getCoordinateList()
          Returns the coordinates of this Cell in its Result.
 int getDrillThroughCount()
          Returns the number of fact table rows which contributed to this Cell.
 java.lang.String getDrillThroughSQL(boolean extendedContext)
          Create an sql query that, when executed, will return the drill through data for this cell.
 java.lang.String getFormattedValue()
          Returns the cell's value formatted according to the current format string, and locale-specific settings such as currency symbol.
 java.lang.Object getPropertyValue(java.lang.String propertyName)
          Returns the value of a property.
 java.lang.Object getValue()
          Returns the cell's raw value.
 boolean isError()
          Returns whether the cell's calculation returned an error.
 boolean isNull()
          Returns whether the cell's value is null.
 void setValue(Scenario scenario, java.lang.Object newValue, AllocationPolicy allocationPolicy, java.lang.Object... allocationArgs)
          Helper method to implement Cell.setValue(java.lang.Object, org.olap4j.AllocationPolicy, java.lang.Object...).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pos

protected final int[] pos

ci

protected RolapResult.CellInfo ci
Constructor Detail

RolapCell

RolapCell(RolapResult result,
          int[] pos,
          RolapResult.CellInfo ci)
Creates a RolapCell.

Parameters:
result - Result cell belongs to
pos - Coordinates of cell
ci - Cell information, containing value et cetera
Method Detail

getCoordinateList

public java.util.List<java.lang.Integer> getCoordinateList()
Description copied from interface: Cell
Returns the coordinates of this Cell in its Result.

Specified by:
getCoordinateList in interface Cell
Returns:
Coordinates of this Cell

getValue

public java.lang.Object getValue()
Description copied from interface: Cell
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:

Specified by:
getValue in interface Cell

getCachedFormatString

public java.lang.String getCachedFormatString()
Description copied from interface: Cell
Return the cached formatted string, that survives an aggregate cache clear.

Specified by:
getCachedFormatString in interface Cell

getFormattedValue

public java.lang.String getFormattedValue()
Description copied from interface: Cell
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.

Specified by:
getFormattedValue in interface Cell

isNull

public boolean isNull()
Description copied from interface: Cell
Returns whether the cell's value is null.

Specified by:
isNull in interface Cell

isError

public boolean isError()
Description copied from interface: Cell
Returns whether the cell's calculation returned an error.

Specified by:
isError in interface Cell

getDrillThroughSQL

public java.lang.String getDrillThroughSQL(boolean extendedContext)
Create an sql query that, when executed, will return the 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.

Specified by:
getDrillThroughSQL in interface Cell

getDrillThroughCount

public int getDrillThroughCount()
Description copied from interface: Cell
Returns the number of fact table rows which contributed to this Cell.

Specified by:
getDrillThroughCount in interface Cell

canDrillThrough

public boolean canDrillThrough()
Returns whether it is possible to drill through this cell. Drill-through is possible if the measure is a stored measure and not possible for calculated measures.

Specified by:
canDrillThrough in interface Cell
Returns:
true if can drill through

chooseDrillThroughCube

public static RolapCube chooseDrillThroughCube(Member[] currentMembers,
                                               RolapCube defaultCube)

getPropertyValue

public java.lang.Object getPropertyValue(java.lang.String propertyName)
Description copied from interface: Cell
Returns the value of a property.

Specified by:
getPropertyValue in interface Cell
Parameters:
propertyName - Case-sensitive property name
Returns:
Value of property

getContextMember

public Member getContextMember(Dimension dimension)
Description copied from interface: Cell
Returns the context member for a particular dimension. The member is defined as follows (note that there is always a member):

Specified by:
getContextMember in interface Cell

setValue

public void setValue(Scenario scenario,
                     java.lang.Object newValue,
                     AllocationPolicy allocationPolicy,
                     java.lang.Object... allocationArgs)
Description copied from interface: Cell
Helper method to implement Cell.setValue(java.lang.Object, org.olap4j.AllocationPolicy, java.lang.Object...).

Specified by:
setValue in interface Cell
Parameters:
scenario - Scenario
newValue - New value
allocationPolicy - Allocation policy
allocationArgs - Arguments for allocation policy

Get Mondrian at SourceForge.net. Fast, secure and free Open Source software downloads