Class JLibResultSetImporter


  • public class JLibResultSetImporter
    extends Object
    Imports the data of a Data File into a com.basiscomponents.db.ResultSet object using the BASIS JLib.
    • Constructor Detail

      • JLibResultSetImporter

        public JLibResultSetImporter()
    • Method Detail

      • setFile

        public void setFile​(String filePath,
                            String template)
                     throws com.basis.startup.type.BBjException
        Sets the path of the Data file and its Templated String.
        Parameters:
        filePath - The path of the Data file
        template - The Templated String matching the Data file
        Throws:
        com.basis.startup.type.BBjException
      • setOffset

        public void setOffset​(int record,
                              int count)
        Sets the offset and the record index to start from when retrieving the Data from the Data file.
        Parameters:
        record - The record index to start from
        count - The number of records to read from the offset.
      • setFilter

        public void setFilter​(DataRow filter)
        Sets the filter to apply while retrieving the records from the Data file. Currently the filter can be used to specify:
        • a range of values(from-to)
        • an exact primary key value
        • the KNUM to use


        Use the following the field names:
        • JLibResultSetImporter.FILTER_KNUM
        • JLibResultSetImporter.FILTER_RANGE_FROM
        • JLibResultSetImporter.FILTER_RANGE_TO
        • JLibResultSetImporter.FILTER_VALUE
        Parameters:
        filter - The filter to set.
      • setFieldSelection

        public void setFieldSelection​(DataRow fieldSelection)
        Sets the field names to be retrieved from the Data file to the field name's of the given DataRow object.
        Parameters:
        fieldSelection - The DataRow whose field names will be set as field selection.
      • getTemplatedString

        public String getTemplatedString()
        Returns the Templated String.
        Returns:
        The Templated String.