public class SqlLoaderControlDataSet extends CachedDataSet implements IDataSet
IDataSet given a directory containing control
files. It handles translations of "null"(the string), into null.
Example usage:
The file
File ctlDir = new File("src/sqlloader");
File orderedTablesFile = new File("src/sqlloader/tables.lst");
IDataSet dataSet = new SqlLoaderControlDataSet(ctlDir, orderedTablesFile);
orderedTablesFile must contain the names of the tables to
be imported. As a convention the .ctl file must have the same name as the table names file.
Here an example of the "tables.lst" file:
| LANGUAGE COUNTRY |
ctlDir directory must then contain the files COUNTRY.ctl
and LANGUAGE.ctl.
_orderedTableNameMap| Constructor and Description |
|---|
SqlLoaderControlDataSet(File ctlDir,
File orderedTablesFile)
The Constructor.
|
SqlLoaderControlDataSet(File ctlDir,
List orderedTableNames)
The Constructor.
|
SqlLoaderControlDataSet(String ctlDir,
String orderedTablesFile)
The Constructor.
|
createIterator, endDataSet, endTable, row, startDataSet, startTablecreateTableNameMap, getTable, getTableMetaData, getTableNames, getTables, isCaseSensitiveTableNames, iterator, reverseIterator, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetTable, getTableMetaData, getTableNames, getTables, isCaseSensitiveTableNames, iterator, reverseIteratorpublic SqlLoaderControlDataSet(String ctlDir, String orderedTablesFile) throws DataSetException
ctlDir - the control files directoryorderedTablesFile - the table order fileDataSetException - the data set exceptionpublic SqlLoaderControlDataSet(File ctlDir, File orderedTablesFile) throws DataSetException
ctlDir - the control files directoryorderedTablesFile - the table order fileDataSetException - the data set exceptionpublic SqlLoaderControlDataSet(File ctlDir, List orderedTableNames) throws DataSetException
ctlDir - the control files directoryorderedTableNames - a list of strings that contains the ordered table namesDataSetException - the data set exceptionCopyright © 2002-2017. All Rights Reserved.