DataConvertor

/*
* 转换表数据
*/
public void convertTables() throws Exception {
DBtoDB dbToDb = null;
DataFilter filter = null;
if (this.originDB.getDbType().equalsIgnoreCase("oracle")
&& this.targetDB.getDbType().equalsIgnoreCase("hsql")) {
dbToDb = new OraToHsql();
System.out.println("getFilter");
filter = new DataFilter(Constant.dbScriptFile, users, originDB);
System.out.println("getFilter end");
if (null == filter.getSqls() | filter.getSqls().size() < 1) {
throw new Exception("");
}
} else if (this.originDB.getDbType().equalsIgnoreCase("hsql")
&& this.targetDB.getDbType().equalsIgnoreCase("oracle")) {
dbToDb = new HsqlToOra();
}
if (null != dbToDb) {
for (int i = 0; i < users.size(); i++) {
DBUser user = users.get(i);
dbToDb.convertAllTable(originDB, user, targetDB, user, filter);
}
}
}

你可能感兴趣的:(oracle)