Package com.basiscomponents.db.importer
Class JLibResultSetImporter
- java.lang.Object
- 
- com.basiscomponents.db.importer.JLibResultSetImporter
 
- 
 public class JLibResultSetImporter extends Object Imports the data of a Data File into a com.basiscomponents.db.ResultSet object using the BASIS JLib.
- 
- 
Field SummaryFields Modifier and Type Field Description static StringFILTER_KNUMstatic StringFILTER_RANGE_FROMstatic StringFILTER_RANGE_TOstatic StringFILTER_VALUE
 - 
Constructor SummaryConstructors Constructor Description JLibResultSetImporter()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetTemplatedString()Returns the Templated String.ResultSetretrieve()Returns a ResultSet object with the content of the Data file based on the specified filter, offset, field selection.voidsetFieldSelection(DataRow fieldSelection)Sets the field names to be retrieved from the Data file to the field name's of the given DataRow object.voidsetFile(String filePath, String template)Sets the path of the Data file and its Templated String.voidsetFilter(DataRow filter)Sets the filter to apply while retrieving the records from the Data file.voidsetOffset(int record, int count)Sets the offset and the record index to start from when retrieving the Data from the Data file.
 
- 
- 
- 
Field Detail- 
FILTER_KNUMpublic static final String FILTER_KNUM - See Also:
- Constant Field Values
 
 - 
FILTER_RANGE_FROMpublic static final String FILTER_RANGE_FROM - See Also:
- Constant Field Values
 
 - 
FILTER_RANGE_TOpublic static final String FILTER_RANGE_TO - See Also:
- Constant Field Values
 
 - 
FILTER_VALUEpublic static final String FILTER_VALUE - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
setFilepublic 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
 
 - 
setOffsetpublic 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.
 
 - 
setFilterpublic 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.
 
 - 
setFieldSelectionpublic 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.
 
 - 
retrievepublic ResultSet retrieve() throws IndexOutOfBoundsException, NoSuchFieldException, Exception Returns a ResultSet object with the content of the Data file based on the specified filter, offset, field selection.- Returns:
- A ResultSet object with the records of the data file.
- Throws:
- IndexOutOfBoundsException
- NoSuchFieldException
- Exception
 
 - 
getTemplatedStringpublic String getTemplatedString() Returns the Templated String.- Returns:
- The Templated String.
 
 
- 
 
-