Package com.microstrategy.web.objects.rw
Interface RWUserMetric
-
- All Superinterfaces:
KeyedObject
,RWDataSetItem
,RWUserObject
public interface RWUserMetric extends RWUserObject
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.- Since:
- MicroStrategy Web 8.0.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getDataType()
Returns the data type of this metric.WebFormat
getFormat()
Returns metric formatjava.lang.String
getFormula()
Retruns the string representation of the metric formula.WebMetric
getMetric()
Returns metric definitionboolean
isAggregateFromBase()
Returns whether this metric is aggregated from base.boolean
isFormulaTokenStream()
Check whether the formula is a token streamvoid
setAggregateFromBase(boolean aggregateFromBase)
Set the Metric aggregate from base with different formula.void
setFormula(java.lang.String value)
Allows the user to set the formula of a derived metric.void
setFormula(java.lang.String value, boolean isTokenStream)
Allows the user to set the formula of a derived metric.-
Methods inherited from interface com.microstrategy.utils.KeyedObject
_getObKey
-
Methods inherited from interface com.microstrategy.web.objects.rw.RWDataSetItem
getAlias, getDataSetName, getObject, getSubType, getType, getWorkingSet
-
Methods inherited from interface com.microstrategy.web.objects.rw.RWUserObject
getDataSet, getID, getName, setName
-
-
-
-
Method Detail
-
getFormula
java.lang.String getFormula()
Retruns the string representation of the metric formula.- Returns:
- The formula of the metric.
- See Also:
setFormula(java.lang.String)
-
setFormula
void setFormula(java.lang.String value) throws java.lang.UnsupportedOperationException
Allows the user to set the formula of a derived metric.- Parameters:
value
- The formula to use for the metric.- Throws:
java.lang.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:
getFormula()
-
setFormula
void setFormula(java.lang.String value, boolean isTokenStream) throws java.lang.UnsupportedOperationException
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:
java.lang.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:
getFormula()
-
isFormulaTokenStream
boolean isFormulaTokenStream()
Check whether the formula is a token stream- Returns:
- whether the formula is a token stream
-
getFormat
WebFormat getFormat()
Returns metric format- Returns:
- format
-
getMetric
WebMetric getMetric()
Returns metric definition- Returns:
- metric
- Since:
- MicroStrategy Web 9.0.0
-
isAggregateFromBase
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
-
setAggregateFromBase
void setAggregateFromBase(boolean aggregateFromBase)
Set the Metric aggregate from base with different formula.- Parameters:
aggreageFromBase
- boolean for aggregate from base.
-
getDataType
int getDataType()
Returns the data type of this metric.- Returns:
- value from
EnumDSSXMLDataType
-
-