Package mondrian.rolap
Class RolapCell
- java.lang.Object
-
- mondrian.rolap.RolapCell
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanDrillThrough()Returns whether it is possible to drill through this cell.static RolapCubechooseDrillThroughCube(Member[] currentMembers, RolapCube defaultCube)SqlStatementdrillThroughInternal(int maxRowCount, int firstRowOrdinal, List<OlapElement> fields, boolean extendedContext, org.apache.logging.log4j.Logger logger)Generates an executes a SQL statement to drill through this cell.StringgetCachedFormatString()Return the cached formatted string, that survives an aggregate cache clear.MembergetContextMember(Hierarchy hierarchy)Returns the context member for a particular dimension.List<Integer>getCoordinateList()Returns the coordinates of this Cell in itsResult.intgetDrillThroughCount()Returns the number of fact table rows which contributed to this Cell.StringgetDrillThroughSQL(boolean extendedContext)Returns a SQL query that, when executed, returns drill through data for this Cell.StringgetDrillThroughSQL(List<OlapElement> fields, boolean extendedContext)StringgetFormattedValue()Returns the cell's value formatted according to the current format string, and locale-specific settings such as currency symbol.ObjectgetPropertyValue(String propertyName)Returns the value of a property.ObjectgetValue()Returns the cell's raw value.booleanisError()Returns whether the cell's calculation returned an error.booleanisNull()Returns whether the cell's value is null.voidsetValue(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 Detail
-
getCoordinateList
public List<Integer> getCoordinateList()
Description copied from interface:CellReturns the coordinates of this Cell in itsResult.- Specified by:
getCoordinateListin interfaceCell- Returns:
- Coordinates of this Cell
-
getValue
public Object getValue()
Description copied from interface:CellReturns 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,IntegerandString.
- if the cell is null, the value is
-
getCachedFormatString
public String getCachedFormatString()
Description copied from interface:CellReturn the cached formatted string, that survives an aggregate cache clear.- Specified by:
getCachedFormatStringin interfaceCell
-
getFormattedValue
public String getFormattedValue()
Description copied from interface:CellReturns 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.- Specified by:
getFormattedValuein interfaceCell
-
isNull
public boolean isNull()
Description copied from interface:CellReturns whether the cell's value is null.
-
isError
public boolean isError()
Description copied from interface:CellReturns whether the cell's calculation returned an error.
-
getDrillThroughSQL
public String getDrillThroughSQL(boolean extendedContext)
Description copied from interface:CellReturns a SQL query that, when executed, returns drill through data for this Cell.If the parameter
extendedContextis 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
extendedContextis 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.
- Specified by:
getDrillThroughSQLin interfaceCell
-
getDrillThroughSQL
public String getDrillThroughSQL(List<OlapElement> fields, boolean extendedContext)
-
getDrillThroughCount
public int getDrillThroughCount()
Description copied from interface:CellReturns the number of fact table rows which contributed to this Cell.- Specified by:
getDrillThroughCountin interfaceCell
-
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:
canDrillThroughin interfaceCell- Returns:
- true if can drill through
-
chooseDrillThroughCube
public static RolapCube chooseDrillThroughCube(Member[] currentMembers, RolapCube defaultCube)
-
drillThroughInternal
public SqlStatement drillThroughInternal(int maxRowCount, int firstRowOrdinal, List<OlapElement> fields, boolean extendedContext, org.apache.logging.log4j.Logger logger)
Generates an executes a SQL statement to drill through this cell.Throws if this cell is not drillable.
Enforces limits on the starting and last row.
If tabFields is not null, returns the specified columns. (This option is deprecated.)
- Parameters:
maxRowCount- Maximum number of rows to retrieve, <= 0 if unlimitedfirstRowOrdinal- Ordinal of row to skip to (1-based), or 0 to start from beginningfields- List of field expressions to return as the result set columns.extendedContext- If true, add non-constraining columns to the query for levels below each current member. This additional context makes the drill-through queries easier for humans to understand.logger- Logger. If not null and debug is enabled, log SQL here- Returns:
- executed SQL statement
-
getPropertyValue
public Object getPropertyValue(String propertyName)
Description copied from interface:CellReturns the value of a property.- Specified by:
getPropertyValuein interfaceCell- Parameters:
propertyName- Case-sensitive property name- Returns:
- Value of property
-
getContextMember
public Member getContextMember(Hierarchy hierarchy)
Description copied from interface:CellReturns 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).
- Specified by:
getContextMemberin interfaceCell- Parameters:
hierarchy- Hierarchy- Returns:
- current member of given hierarchy
-
-