new String[rowData.values().size()]); data.putParsedData(CsvData.ROW_DATA, columnValues); if (this.table == null || !this.table.equals(table)) { next.add(table);
new String[rowData.values().size()]); data.putParsedData(CsvData.ROW_DATA, columnValues); if (lastTable == null || !lastTable.equals(table)) { return table; } else {
public CsvData nextData() { if (this.table != null) { if (this.data == null) { this.data = this.currentSource.next(); } if (data == null) { closeCurrentSource(); } else { Table targetTable = this.currentSource.getTargetTable(); if (targetTable != null && targetTable.equals(this.table)) { data = enhanceWithLobsFromSourceIfNeeded(this.currentSource.getSourceTable(), data); } else { // the table has changed return null; } } } CsvData dataToReturn = this.data; this.data = null; return dataToReturn; }
protected boolean filterBefore(CsvData data) { boolean process = true; List<IDatabaseWriterFilter> filters = this.writerSettings.getDatabaseWriterFilters(); if (filters != null) { try { statistics.get(batch).startTimer(DataWriterStatisticConstants.FILTERMILLIS); for (IDatabaseWriterFilter filter : filters) { process &= filter.beforeWrite(this.context, this.sourceTable, data); } // re-lookup target table in case the source table has changed Table oldTargetTable = targetTable; if (this.sourceTable!=null) { targetTable = lookupTableAtTarget(this.sourceTable); } if (targetTable!=null && !targetTable.equals(oldTargetTable)) { // allow for auto increment columns to be inserted into if appropriate String quote = getPlatform().getDatabaseInfo().getDelimiterToken(); if (oldTargetTable!=null) { transaction.allowInsertIntoAutoIncrementColumns(false, oldTargetTable, quote); } transaction.allowInsertIntoAutoIncrementColumns(true, targetTable, quote); } } finally { statistics.get(batch).stopTimer(DataWriterStatisticConstants.FILTERMILLIS); } } return process; }