use of com.cubrid.common.ui.cubrid.table.dialog.imp.event.ImportDataBeginOneTableEvent in project cubrid-manager by CUBRID.
the class AbsImportRunnable method run.
public void run() {
handleEvent(new ImportDataBeginOneTableEvent(tableName));
try {
performCreateTable(tableName);
} catch (Exception e) {
writeErrorLog("Create table failed:" + e.getMessage());
LOGGER.error("", e);
}
DataType.setNULLValuesForImport(importConfig.getNullValueList().toArray(new String[importConfig.getNullValueList().size()]));
try {
initConnection();
doRun();
} catch (final Exception e) {
handleEvent(new ImportDataTableFailedEvent(tableName));
LOGGER.error("", e);
Display.getDefault().syncExec(new Runnable() {
public void run() {
String msg = Messages.errorOpenFile + StringUtil.NEWLINE + tableConfig.getFilePath() + StringUtil.NEWLINE + StringUtil.NEWLINE + e.getMessage();
CommonUITool.openErrorBox(msg);
}
});
} finally {
finish();
}
handleEvent(new ImportDataFinishOneTableEvent(tableName));
if (progressManager != null) {
progressManager.taskFinished(this);
}
}
Aggregations