Class CsvExportTask<CsvType>
- java.lang.Object
-
- javax.swing.SwingWorker<T,V>
-
- com.openindex.openestate.tool.ImmoToolTask<Long,Void>
-
- com.openindex.openestate.tool.utils.CsvExportTask<CsvType>
-
- Type Parameters:
CsvType
- Klasse des CSV-Quellobjektes
- All Implemented Interfaces:
PropertyChangeListener
,Runnable
,Future<Long>
,RunnableFuture<Long>
,EventListener
- Direct Known Subclasses:
AgencyEstateExportCsvTask
,ContactsEntryExportCsvTask
public abstract class CsvExportTask<CsvType> extends ImmoToolTask<Long,Void>
AllgemeinerImmoToolTask
zum Export von CSV-Tabellen.- Author:
- Andreas Rudolph
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.openindex.openestate.tool.ImmoToolTask
ImmoToolTask.Adapter, ImmoToolTask.Callback, ImmoToolTask.Listener
-
Nested classes/interfaces inherited from class javax.swing.SwingWorker
SwingWorker.StateValue
-
-
Constructor Summary
Constructors Constructor Description CsvExportTask(File csvFile, Charset csvCharset, AbstractDbDriver dbDriver)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected Long
doInBackground()
protected Long
executeExport()
File
getCsvFile()
protected AbstractDbDriver
getDbDriver()
protected abstract String
getFieldTitle(int index)
protected String[]
getHeadlineValues()
protected abstract CsvType[]
loadCsvObjects()
protected abstract String[]
loadEmptyContainer()
protected void
writeValue(int field, String value, String[] values)
protected abstract void
writeValues(CsvType src, String[] dest)
-
Methods inherited from class com.openindex.openestate.tool.ImmoToolTask
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
-
Methods inherited from class javax.swing.SwingWorker
addPropertyChangeListener, cancel, execute, firePropertyChange, get, get, getProgress, getPropertyChangeSupport, getState, isCancelled, isDone, publish, removePropertyChangeListener, run, setProgress
-
-
-
-
Constructor Detail
-
CsvExportTask
public CsvExportTask(File csvFile, Charset csvCharset, AbstractDbDriver dbDriver)
-
-
Method Detail
-
doInBackground
protected Long doInBackground() throws Exception
- Specified by:
doInBackground
in classImmoToolTask<Long,Void>
- Throws:
Exception
-
executeExport
protected Long executeExport() throws IOException, SQLException
- Throws:
IOException
SQLException
-
getCsvFile
public File getCsvFile()
-
getDbDriver
protected AbstractDbDriver getDbDriver()
-
getFieldTitle
protected abstract String getFieldTitle(int index)
-
getHeadlineValues
protected String[] getHeadlineValues()
-
loadCsvObjects
protected abstract CsvType[] loadCsvObjects() throws SQLException
- Throws:
SQLException
-
loadEmptyContainer
protected abstract String[] loadEmptyContainer()
-
-