use of org.openforis.collect.relational.data.DataExtractor in project collect by openforis.
the class JooqDatabaseExporter method insertRecordData.
@Override
public void insertRecordData(CollectRecord record, ProgressListener progressListener) {
for (DataTable table : schema.getDataTables()) {
DataExtractor extractor = DataExtractorFactory.getRecordDataExtractor(table, record);
batchExecutor.addInserts(extractor);
}
}
use of org.openforis.collect.relational.data.DataExtractor in project collect by openforis.
the class JooqDatabaseExporter method insertReferenceData.
@Override
public void insertReferenceData(ProgressListener progressListener) {
List<CodeTable> codeListTables = schema.getCodeListTables();
long totalItems = codeListTables.size();
long processedItems = 0;
for (CodeTable codeTable : codeListTables) {
DataExtractor extractor = DataExtractorFactory.getExtractor(codeTable);
batchExecutor.executeInserts(extractor);
processedItems++;
progressListener.progressMade(new Progress(processedItems, totalItems));
}
}
Aggregations