if (dataSourceType == null) {
throw new RuntimeException("DatabaseType can't be null.");
}
switch (dataSourceType) {
case MYSQL:
return new MySqlEnvironment(dataSourceName, dataSourceFrom);
case ORACLE:
return new OracleEnvironment(dataSourceName, dataSourceFrom);
case SQLSERVER:
return new SqlServerEnvironment(dataSourceName, dataSourceFrom);
case DERBYDB: