Package mondrian.olap
Interface Cell
- All Known Implementing Classes:
RolapCell
public interface Cell
- Since:
- 6 August, 2001
- Author:
- jhyde
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns true if drill through is possible for this Cell.Return the cached formatted string, that survives an aggregate cache clear.getContextMember
(Hierarchy hierarchy) Returns the context member for a particular dimension.Returns the coordinates of this Cell in itsResult
.int
Returns the number of fact table rows which contributed to this Cell.getDrillThroughSQL
(boolean extendedContext) Returns a SQL query that, when executed, returns drill through data for this Cell.Returns the cell's value formatted according to the current format string, and locale-specific settings such as currency symbol.getPropertyValue
(String propertyName) Returns the value of a property.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
(org.olap4j.Scenario scenario, Object newValue, org.olap4j.AllocationPolicy allocationPolicy, Object... allocationArgs) Helper method to implementCell.setValue(java.lang.Object, org.olap4j.AllocationPolicy, java.lang.Object...)
.
-
Method Details
-
getCoordinateList
Returns the coordinates of this Cell in itsResult
.- 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:
- if the cell is null, the value is
Util.nullValue
; - if the cell contains an error, the value is an instance of
Throwable
; - otherwise, the type of this value depends upon the type of
measure: possible types include
BigDecimal
,Double
,Integer
andString
.
- if the cell is null, the value is
-
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, seeFormat
. -
isNull
boolean isNull()Returns whether the cell's value is null. -
isError
boolean isError()Returns whether the cell's calculation returned an error. -
getDrillThroughSQL
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
Returns the value of a property.- Parameters:
propertyName
- Case-sensitive property name- Returns:
- Value of property
-
getContextMember
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 implementCell.setValue(java.lang.Object, org.olap4j.AllocationPolicy, java.lang.Object...)
.- Parameters:
scenario
- ScenarionewValue
- New valueallocationPolicy
- Allocation policyallocationArgs
- Arguments for allocation policy
-