Package org.dashbuilder.dataset.impl
Class AbstractDataSetDefBuilder<T>
- java.lang.Object
-
- org.dashbuilder.dataset.impl.AbstractDataSetDefBuilder<T>
-
- All Implemented Interfaces:
DataSetDefBuilder<T>
- Direct Known Subclasses:
BeanDataSetDefBuilderImpl,CSVDataSetDefBuilderImpl,KafkaDataSetDefBuilderImpl,PrometheusDataSetDefBuilderImpl,SQLDataSetDefBuilderImpl,StaticDataSetDefBuilderImpl
public abstract class AbstractDataSetDefBuilder<T> extends Object implements DataSetDefBuilder<T>
Base class for DataSetDefBuilder implementations.
-
-
Field Summary
Fields Modifier and Type Field Description protected DataSetDefdef
-
Constructor Summary
Constructors Constructor Description AbstractDataSetDefBuilder()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete 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.protected abstract DataSetDefcreateDataSetDef()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.
-
-
-
Field Detail
-
def
protected DataSetDef def
-
-
Method Detail
-
createDataSetDef
protected abstract DataSetDef createDataSetDef()
-
uuid
public T uuid(String uuid)
Description copied from interface:DataSetDefBuilderSet the DataSetDef UUID.- Specified by:
uuidin interfaceDataSetDefBuilder<T>- Parameters:
uuid- The UUID of the DataSetDef that is being assembled.- Returns:
- The DataSetDefBuilder instance that is being used to configure a DataSetDef.
-
name
public T name(String name)
Description copied from interface:DataSetDefBuilderSet the DataSetDef name.- Specified by:
namein interfaceDataSetDefBuilder<T>- Parameters:
name- The name of the DataSetDef that is being assembled.- Returns:
- The DataSetDefBuilder instance that is being used to configure a DataSetDef.
-
pushOn
public T pushOn(int pushMaxSize)
Description copied from interface:DataSetDefBuilderEnable the ability to push remote data sets from server.- Specified by:
pushOnin interfaceDataSetDefBuilder<T>- 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
public T pushOff()
Description copied from interface:DataSetDefBuilderDisable the ability to push remote data sets from server.- Specified by:
pushOffin interfaceDataSetDefBuilder<T>- Returns:
- The DataSetDefBuilder instance that is being used to configure a DataSetDef.
-
cacheOn
public T cacheOn(int maxRowsInCache)
Description copied from interface:DataSetDefBuilderEnables the cache for this data set- Specified by:
cacheOnin interfaceDataSetDefBuilder<T>- 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
public T cacheOff()
Description copied from interface:DataSetDefBuilderDisables the cache- Specified by:
cacheOffin interfaceDataSetDefBuilder<T>- Returns:
- The DataSetDefBuilder instance that is being used to configure a DataSetDef.
-
refreshOn
public T refreshOn(String refreshTime, boolean refreshAlways)
Description copied from interface:DataSetDefBuilderTurns 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.- Specified by:
refreshOnin interfaceDataSetDefBuilder<T>- 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
public T refreshOff()
Description copied from interface:DataSetDefBuilderTurns of the data set refresh mechanism.- Specified by:
refreshOffin interfaceDataSetDefBuilder<T>- Returns:
- The DataSetDefBuilder instance that is being used to configure a DataSetDef.
-
label
public T label(String columnId)
Description copied from interface:DataSetDefBuilderAdd an empty column of type label.- Specified by:
labelin interfaceDataSetDefBuilder<T>
-
text
public T text(String columnId)
Description copied from interface:DataSetDefBuilderAdd an empty column of type text.- Specified by:
textin interfaceDataSetDefBuilder<T>
-
number
public T number(String columnId)
Description copied from interface:DataSetDefBuilderAdd an empty column of numeric type.- Specified by:
numberin interfaceDataSetDefBuilder<T>- Returns:
- The DataSetDefBuilder instance that is being used to configure a DataSetDef.
-
date
public T date(String columnId)
Description copied from interface:DataSetDefBuilderAdd an empty column of type date.- Specified by:
datein interfaceDataSetDefBuilder<T>- Returns:
- The DataSetDefBuilder instance that is being used to configure a DataSetDef.
-
column
public T column(String columnId, ColumnType type)
Description copied from interface:DataSetDefBuilderAdd an empty column of the specified type.- Specified by:
columnin interfaceDataSetDefBuilder<T>- Returns:
- The DataSetDefBuilder instance that is being used to configure a DataSetDef.
-
buildDef
public DataSetDef buildDef()
- Specified by:
buildDefin interfaceDataSetDefBuilder<T>- Returns:
- The DataSetDef instance that has been configured.
- See Also:
DataSetDef
-
-