CsvType
- Klasse des CSV-Zielobjektespublic abstract class CsvImportTask<CsvType> extends ImmoToolTask<Long,Void>
ImmoToolTask
zum Import von CSV-Tabellen.ImmoToolTask.Adapter, ImmoToolTask.Callback, ImmoToolTask.Listener
SwingWorker.StateValue
Modifier | Constructor and Description |
---|---|
protected |
CsvImportTask(File csvFile) |
Modifier and Type | Method and Description |
---|---|
protected abstract CsvType |
createCsvObject() |
ComboBoxModel |
createFieldModel() |
protected Long |
doInBackground() |
protected Long |
executeImport() |
File |
getCsvFile() |
protected abstract int |
getDefinedFieldCount() |
Map<Integer,List<Integer>> |
getFieldMapping() |
protected abstract String |
getFieldTitle(int index) |
protected String |
getValue(org.apache.commons.csv.CSVRecord record,
int field) |
boolean |
isMultipleSelectionAllowed(int field) |
protected abstract void |
readRecord(org.apache.commons.csv.CSVRecord record,
CsvType dest) |
protected abstract boolean |
saveCsvObject(CsvType container,
long lineNr) |
void |
setupReader(org.apache.commons.csv.CSVFormat format) |
void |
setupReader(org.apache.commons.csv.CSVFormat format,
Charset charset) |
void |
setupReader(org.apache.commons.csv.CSVFormat format,
Charset charset,
boolean ignoreFirstLine) |
addListener, cancelled, checkCancelled, createCallback, done, executeAndWait, executeAndWait, failed, finished, getDescription, getId, getMessage, getParentWindow, getTaskDialog, getTitle, isCancelException, isPending, isStarted, process, propertyChange, removeListener, setDescription, setMessage, setParentWindow, setProgress, setProgress, setProgress, setProgress, setTaskDialog, setTitle, succeeded
addPropertyChangeListener, cancel, execute, firePropertyChange, get, get, getProgress, getPropertyChangeSupport, getState, isCancelled, isDone, publish, removePropertyChangeListener, run, setProgress
protected CsvImportTask(File csvFile)
protected abstract CsvType createCsvObject()
public ComboBoxModel createFieldModel()
protected Long doInBackground() throws Exception
doInBackground
in class ImmoToolTask<Long,Void>
Exception
protected Long executeImport() throws IOException
IOException
protected abstract int getDefinedFieldCount()
public File getCsvFile()
protected abstract String getFieldTitle(int index)
protected String getValue(org.apache.commons.csv.CSVRecord record, int field)
public boolean isMultipleSelectionAllowed(int field)
protected abstract void readRecord(org.apache.commons.csv.CSVRecord record, CsvType dest)
protected abstract boolean saveCsvObject(CsvType container, long lineNr)
public final void setupReader(org.apache.commons.csv.CSVFormat format)
public final void setupReader(org.apache.commons.csv.CSVFormat format, Charset charset)
public void setupReader(org.apache.commons.csv.CSVFormat format, Charset charset, boolean ignoreFirstLine)
Copyright © 2015 OpenEstate. All rights reserved.