use of org.dbflute.logic.replaceschema.loaddata.DfLoadedFile in project dbflute-core by dbflute.
the class DfLoadDataProcess method createFinalInfo.
// ===================================================================================
// Final Info
// ==========
protected DfLoadDataFinalInfo createFinalInfo(RuntimeException loadEx) {
final DfLoadDataFinalInfo finalInfo = new DfLoadDataFinalInfo();
final List<DfLoadedFile> loadedFileList = _loadedDataInfo.getLoadedFileList();
final int loadedFileCount = loadedFileList.size();
final String title = "{Load Data}";
final String resultMessage = title + ": loaded-files=" + loadedFileCount;
final boolean failure;
final List<String> detailMessageList = new ArrayList<String>();
if (_success) {
failure = false;
if (loadedFileCount > 0) {
// has the last line separator
setupDetailMessage(detailMessageList);
} else {
detailMessageList.add("- (no data file)");
}
} else {
// it is the precondition that LoadData stops at the first failure
failure = true;
if (loadedFileCount > 0) {
// has the last line separator
setupDetailMessage(detailMessageList);
}
detailMessageList.add("x (failed: Look at the exception message)");
}
finalInfo.setResultMessage(resultMessage);
for (String detailMessage : detailMessageList) {
finalInfo.addDetailMessage(detailMessage);
}
finalInfo.setFailure(failure);
finalInfo.setLoadEx(loadEx);
return finalInfo;
}
Aggregations