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 sets
        DataSetDef dataSetDef = DataSetDefFactory.newSQLDataSetDef()
         .uuid("all_employees")
         .dataSource("java:comp/jdbc/test")
         .dbTable("employees")
         .buildDef();
     
    • 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 name
        allColumns - 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 SQL
        allColumns - 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.