package cn.net.communion.dbdatasync.dbhelper;
|
|
import cn.net.communion.dbdatasync.dbhelper.impl.MySql;
|
import cn.net.communion.dbdatasync.dbhelper.impl.PostgreSql;
|
import cn.net.communion.dbdatasync.dbhelper.impl.SqlServer;
|
|
public class Factory {
|
public static DbHelper create(String dbType) {
|
switch (dbType.toLowerCase()) {
|
case "mysql":
|
return new MySql();
|
case "postgresql":
|
return new PostgreSql();
|
default:
|
throw new IllegalArgumentException("Unsupported database type: " + dbType);
|
}
|
}
|
}
|