Package org.dashbuilder.dataset.def
Interface SQLDataSetDefBuilder<T extends DataSetDefBuilder>
-
- All Superinterfaces:
DataSetDefBuilder<T>
- All Known Implementing Classes:
SQLDataSetDefBuilderImpl
public interface SQLDataSetDefBuilder<T extends DataSetDefBuilder> extends DataSetDefBuilder<T>
A builder for defining SQL data setsDataSetDef dataSetDef = DataSetDefFactory.newSQLDataSetDef() .uuid("all_employees") .dataSource("java:comp/jdbc/test") .dbTable("employees") .buildDef();
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TdataSource(String dataSource)Set the data source where this data set is stored.TdbSchema(String dbSchema)Set the database schema where the target table reliesTdbSQL(String dbSQL, boolean allColumns)Specifies a custom SQL for the retrieval of the data set rows.TdbTable(String dbTable, boolean allColumns)Set the database table holding all the data set rows.
-
-
-
Method Detail
-
dataSource
T dataSource(String dataSource)
Set the data source where this data set is stored.- Parameters:
dataSource- the data source JNDI name- Returns:
- The DataSetDefBuilder instance that is being used to configure a DataSetDef.
-
dbSchema
T dbSchema(String dbSchema)
Set the database schema where the target table relies- Parameters:
dbSchema- the schema name- Returns:
- The DataSetDefBuilder instance that is being used to configure a DataSetDef.
-
dbTable
T dbTable(String dbTable, boolean allColumns)
Set the database table holding all the data set rows.NOTE: You can either specify a DB table containing all the rows or provide a custom SQL (see the dbSQL method). The SQL settings has preference over the DB table. Therefore, calling to this method will have no effect if the method dbSQL has been previously invoked.
- Parameters:
dbTable- the table nameallColumns- If true then all the DB table columns will be part of the data set. If false then only the columns defined (see the DataSetDefBuilder column definition methods)- Returns:
- The DataSetDefBuilder instance that is being used to configure a DataSetDef.
-
dbSQL
T dbSQL(String dbSQL, boolean allColumns)
Specifies a custom SQL for the retrieval of the data set rows.- Parameters:
dbSQL- the data retrieval SQLallColumns- If true then all the column returned by the SQL will be part of the data set. If false then only the columns defined (see the DataSetDefBuilder column definition methods)- Returns:
- The DataSetDefBuilder instance that is being used to configure a DataSetDef.
-
-