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>
AllgemeinerImmoToolTaskzum 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 LongdoInBackground()protected LongexecuteExport()FilegetCsvFile()protected AbstractDbDrivergetDbDriver()protected abstract StringgetFieldTitle(int index)protected String[]getHeadlineValues()protected abstract CsvType[]loadCsvObjects()protected abstract String[]loadEmptyContainer()protected voidwriteValue(int field, String value, String[] values)protected abstract voidwriteValues(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:
doInBackgroundin classImmoToolTask<Long,Void>- Throws:
Exception
-
executeExport
protected Long executeExport() throws IOException, SQLException
- Throws:
IOExceptionSQLException
-
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()
-
-