Package io.revealbi.core.data
Class RVDataModelCalculatedField
java.lang.Object
io.revealbi.core.data.RVDataModelField
io.revealbi.core.data.RVDataModelCalculatedField
Represents a calculated field in the data model.
Extends RVDataModelField with an expression that defines the calculation.
Use this with IRVDataModelProvider.getCalculatedFields(RVDataSourceItem, io.revealbi.core.IRequestContext)
to inject custom calculated fields into a data source.
- API Note:
- This class is part of the beta
IRVDataModelProviderAPI and may change in future releases.
-
Constructor Summary
ConstructorsConstructorDescriptionRVDataModelCalculatedField(String name, RVDashboardDataType type, String expression) Creates a new calculated field with the given name, type, and expression. -
Method Summary
Modifier and TypeMethodDescriptionReturns the expression that defines this calculated field.voidsetExpression(String expression) Sets the expression that defines this calculated field.Methods inherited from class io.revealbi.core.data.RVDataModelField
getDefaultAggregation, getDescription, getLabel, getName, getType, isWeekLevelEnabled, setDefaultAggregation, setDescription, setLabel, setType, setWeekLevelEnabled
-
Constructor Details
-
RVDataModelCalculatedField
Creates a new calculated field with the given name, type, and expression.- Parameters:
name- The name of the calculated field.type- The data type of the result.expression- The expression that defines the calculation.
-
-
Method Details
-
getExpression
Returns the expression that defines this calculated field.- Returns:
- The calculation expression.
-
setExpression
Sets the expression that defines this calculated field.- Parameters:
expression- The calculation expression.
-