Package io.revealbi.core.data
Class RVDataModelField
java.lang.Object
io.revealbi.core.data.RVDataModelField
- Direct Known Subclasses:
RVDataModelCalculatedField
Represents a field in the data model.
Used with IRVDataModelProvider to edit the schema of a data source item.
- API Note:
- This class is part of the beta
IRVDataModelProviderAPI and may change in future releases.
-
Constructor Summary
ConstructorsConstructorDescriptionRVDataModelField(String name, RVDashboardDataType type) Creates a new data model field with the given name and type. -
Method Summary
Modifier and TypeMethodDescriptionReturns the default aggregation type for this field.Returns the description of the field.getLabel()Returns the label of the field (display name).getName()Returns the name of the field.getType()Returns the data type of the field.booleanReturns whether week-level grouping is enabled for date fields.voidsetDefaultAggregation(RVDashboardAggregationType defaultAggregation) Sets the default aggregation type for this field.voidsetDescription(String description) Sets the description for the field.voidSets the label (display name) for the field.voidsetType(RVDashboardDataType type) Sets the data type of the field.voidsetWeekLevelEnabled(boolean weekLevelEnabled) Sets whether week-level grouping is enabled for date fields.
-
Constructor Details
-
RVDataModelField
Creates a new data model field with the given name and type.- Parameters:
name- The name of the field.type- The data type of the field.
-
-
Method Details
-
getName
Returns the name of the field.- Returns:
- The field name.
-
getLabel
Returns the label of the field (display name).- Returns:
- The field label.
-
setLabel
Sets the label (display name) for the field.- Parameters:
label- The label to set.
-
getDescription
Returns the description of the field.- Returns:
- The field description.
-
setDescription
Sets the description for the field.- Parameters:
description- The description to set.
-
getType
Returns the data type of the field.- Returns:
- The data type.
-
setType
Sets the data type of the field.- Parameters:
type- The data type to set.
-
isWeekLevelEnabled
public boolean isWeekLevelEnabled()Returns whether week-level grouping is enabled for date fields.- Returns:
trueif week level is enabled.
-
setWeekLevelEnabled
public void setWeekLevelEnabled(boolean weekLevelEnabled) Sets whether week-level grouping is enabled for date fields.- Parameters:
weekLevelEnabled-trueto enable week level.
-
getDefaultAggregation
Returns the default aggregation type for this field.- Returns:
- The default aggregation.
-
setDefaultAggregation
Sets the default aggregation type for this field.- Parameters:
defaultAggregation- The default aggregation to set.
-