Package org.dashbuilder.dataset.def
Interface DataSetDefBuilder<T>
-
- All Known Subinterfaces:
BeanDataSetDefBuilder<T>,CSVDataSetDefBuilder<T>,ElasticSearchDataSetDefBuilder<T>,KafkaDataSetDefBuilder<T>,PrometheusDataSetDefBuilder<T>,SQLDataSetDefBuilder<T>,StaticDataSetDefBuilder<T>
- All Known Implementing Classes:
AbstractDataSetDefBuilder,BeanDataSetDefBuilderImpl,CSVDataSetDefBuilderImpl,KafkaDataSetDefBuilderImpl,PrometheusDataSetDefBuilderImpl,SQLDataSetDefBuilderImpl,StaticDataSetDefBuilderImpl
public interface DataSetDefBuilder<T>Interface for the assembly of a DataSetDef instance in a friendly manner.DataSetDef providerSettings = DataSetDefFactory.newSQLDataSetDef() .uuid("all_employees") .datasource("jndi/mydatasource") .query("SELECT * FROM employee") .label("id") .build();- See Also:
DataSetDef
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description DataSetDefbuildDef()TcacheOff()Disables the cacheTcacheOn(int maxRowsInCache)Enables the cache for this data setTcolumn(String columnId, ColumnType type)Add an empty column of the specified type.Tdate(String columnId)Add an empty column of type date.Tlabel(String columnId)Add an empty column of type label.Tname(String name)Set the DataSetDef name.Tnumber(String columnId)Add an empty column of numeric type.TpushOff()Disable the ability to push remote data sets from server.TpushOn(int pushMaxSize)Enable the ability to push remote data sets from server.TrefreshOff()Turns of the data set refresh mechanism.TrefreshOn(String refreshTime, boolean refreshAlways)Turns on the data set refresh mechanism.Ttext(String columnId)Add an empty column of type text.Tuuid(String uuid)Set the DataSetDef UUID.
-
-
-
Method Detail
-
uuid
T uuid(String uuid)
Set the DataSetDef UUID.- Parameters:
uuid- The UUID of the DataSetDef that is being assembled.- Returns:
- The DataSetDefBuilder instance that is being used to configure a DataSetDef.
-
name
T name(String name)
Set the DataSetDef name.- Parameters:
name- The name of the DataSetDef that is being assembled.- Returns:
- The DataSetDefBuilder instance that is being used to configure a DataSetDef.
-
buildDef
DataSetDef buildDef()
- Returns:
- The DataSetDef instance that has been configured.
- See Also:
DataSetDef
-
pushOn
T pushOn(int pushMaxSize)
Enable the ability to push remote data sets from server.- Parameters:
pushMaxSize- The maximum size (in kbytes) a data set may have in order to be pushed to clients.- Returns:
- The DataSetDefBuilder instance that is being used to configure a DataSetDef.
-
pushOff
T pushOff()
Disable the ability to push remote data sets from server.- Returns:
- The DataSetDefBuilder instance that is being used to configure a DataSetDef.
-
cacheOn
T cacheOn(int maxRowsInCache)
Enables the cache for this data set- Parameters:
maxRowsInCache- Max. rows the cache is able to handle. For higher values the cache is automatically disabled.- Returns:
- The DataSetDefBuilder instance that is being used to configure a DataSetDef.
-
cacheOff
T cacheOff()
Disables the cache- Returns:
- The DataSetDefBuilder instance that is being used to configure a DataSetDef.
-
refreshOn
T refreshOn(String refreshTime, boolean refreshAlways)
Turns on the data set refresh mechanism. Every time the refresh time is met the data set will be forced to refresh. Any cache on the data set will be considered stale from that time on.- Parameters:
refreshTime- The amount of time between refresh intervalsTimeAmountrefreshAlways- If false then the refresh will be only performed when the underlying data provider determines that the data set has become stale. Otherwise the data set is always refreshed. data set is outdated. This can be very useful to avoid refreshing unnecessarily.- Returns:
- The DataSetDefBuilder instance that is being used to configure a DataSetDef.
-
refreshOff
T refreshOff()
Turns of the data set refresh mechanism.- Returns:
- The DataSetDefBuilder instance that is being used to configure a DataSetDef.
-
number
T number(String columnId)
Add an empty column of numeric type.- Returns:
- The DataSetDefBuilder instance that is being used to configure a DataSetDef.
-
date
T date(String columnId)
Add an empty column of type date.- Returns:
- The DataSetDefBuilder instance that is being used to configure a DataSetDef.
-
column
T column(String columnId, ColumnType type)
Add an empty column of the specified type.- Returns:
- The DataSetDefBuilder instance that is being used to configure a DataSetDef.
-
-