public interface

RWUserMetric

implements RWUserObject
com.microstrategy.web.objects.rw.RWUserMetric

Class Overview

The RWUserMetric class represents an additional derived metric added to the grid or data set. Those metrics are not added to the data set working set but rather a kept in the separate collection.

Summary

Public Methods
abstract int getDataType()
Returns the data type of this metric.
abstract WebFormat getFormat()
Returns metric format
abstract String getFormula()
Retruns the string representation of the metric formula.
abstract WebMetric getMetric()
Returns metric definition
abstract boolean isAggregateFromBase()
Returns whether this metric is aggregated from base.
abstract boolean isFormulaTokenStream()
Check whether the formula is a token stream
abstract void setAggregateFromBase(boolean aggregateFromBase)
Set the Metric aggregate from base with different formula.
abstract void setFormula(String value, boolean isTokenStream)
Allows the user to set the formula of a derived metric.
abstract void setFormula(String value)
Allows the user to set the formula of a derived metric.
[Expand]
Inherited Methods
From interface com.microstrategy.utils.KeyedObject
From interface com.microstrategy.web.objects.rw.RWDataSetItem
From interface com.microstrategy.web.objects.rw.RWUserObject

Public Methods

public abstract int getDataType ()

Returns the data type of this metric.

Returns

public abstract WebFormat getFormat ()

Returns metric format

Returns
  • format

public abstract String getFormula ()

Retruns the string representation of the metric formula.

Returns
  • The formula of the metric.

public abstract WebMetric getMetric ()

Returns metric definition

Returns
  • metric

public abstract boolean isAggregateFromBase ()

Returns whether this metric is aggregated from base. This is a readonly property. It only can be set when first time create the user metric. When this property is true, formula of this metric can not be changed. If user wants a different formula, user needs to remove this metric and add another metric with different formular.

Returns
  • boolean

public abstract boolean isFormulaTokenStream ()

Check whether the formula is a token stream

Returns
  • whether the formula is a token stream

public abstract void setAggregateFromBase (boolean aggregateFromBase)

Set the Metric aggregate from base with different formula.

public abstract void setFormula (String value, boolean isTokenStream)

Allows the user to set the formula of a derived metric.

Parameters
value The formula to use for the metric.
isTokenStream flag to indicate whether the formula is a token stream
Throws
UnsupportedOperationException Thrown if the metric is not derived, and thus the formula cannot be changed, or if this object refers to a metric prompt, or this metric is aggregate from base, therefore its formula is not allowed to be changed.
See Also

public abstract void setFormula (String value)

Allows the user to set the formula of a derived metric.

Parameters
value The formula to use for the metric.
Throws
UnsupportedOperationException Thrown if the metric is not derived, and thus the formula cannot be changed, or if this object refers to a metric prompt, or this metric is aggregate from base, therefore its formula is not allowed to be changed.
See Also