String destCatalog = prov.getDestSelectedDatabaseObject().getCatalogName();
for (int i = 0; i < sourceObjs.length; i++) {
if (false == sourceObjs[i] instanceof ITableInfo) {
continue;
}
ITableInfo sourceTI = (ITableInfo)sourceObjs[i];
sendTableCopyStarted(sourceTI, i+1);
try {
int destTableCount = DBUtil.getTableCount(destSession,
destCatalog,
destSchema,
sourceTI.getSimpleName(),
DialectFactory.DEST_TYPE);
if (destTableCount == -1) {
createTable(sourceTI);
}
if (destTableCount > 0) {
try {
String t = sourceTI.getSimpleName();
if (pref.appendRecordsToExisting(t)) {
/* Do nothing */
} else if (pref.deleteTableData(sourceTI.getSimpleName())) {
// Yes || Yes to all
DBUtil.deleteDataInExistingTable(destSession,
destCatalog,
destSchema,
sourceTI.getSimpleName());
} else {
continue; // skip this table, try the next.
}
} catch (UserCancelledOperationException e) {