public class BatchedMovementsFileReader extends DataFileReader
Modifier and Type | Field and Description |
---|---|
private static String |
BATCH_SIZE |
private StringBuilder |
createTableCommand |
private DatabaseImpl |
database |
private String |
dataFile |
private Collection<Integer> |
dateFields |
private String |
dateFormat |
private static String |
DEPARTURE_DATE |
private static String |
DEPARTURE_ID |
private static String |
DESTINATION_DATE |
private static String |
DESTINATION_ID |
private Map<String,Integer> |
insertedColInfo |
private String |
insertString |
private static String |
MARKET_DATE |
private static String |
MARKET_ID |
private static String |
SECTION_NAME |
private static String |
SPECIES |
private static String |
TABLE_NAME |
Constructor and Description |
---|
BatchedMovementsFileReader(DataFiles.BatchMovementFile movementFile,
DatabaseImpl dbImpl)
Create the movement file reader.
|
Modifier and Type | Method and Description |
---|---|
int |
insert()
Insert the data from the input file into the database.
|
asCsv, asQuestionCsv, createTable, insert, updateCreateTableCommand
private DatabaseImpl database
private String dataFile
private String dateFormat
private static final String TABLE_NAME
private StringBuilder createTableCommand
private String insertString
private Collection<Integer> dateFields
private static final String BATCH_SIZE
private static final String DEPARTURE_DATE
private static final String DEPARTURE_ID
private static final String DESTINATION_DATE
private static final String DESTINATION_ID
private static final String MARKET_ID
private static final String MARKET_DATE
private static final String SPECIES
private static final String SECTION_NAME
public BatchedMovementsFileReader(DataFiles.BatchMovementFile movementFile, DatabaseImpl dbImpl)
movementFile
- the [xml] tag of the config file that is to be read.dbImpl
- the implementation of the database object.public final int insert()
DataFileReader
insert
in class DataFileReader
Copyright © 2015 University of Glasgow. All rights reserved.