// Set Driver specific properties (if any)
return driver;
}
else if (provider.equalsIgnoreCase("sqlserver"))
{
DBDatabaseDriverMSSQL driver = new DBDatabaseDriverMSSQL();
// Set Driver specific properties (if any)
driver.setDatabaseName(config.getSchemaName());
return driver;
}
else if (provider.equalsIgnoreCase("hsqldb"))
{
DBDatabaseDriverHSql driver = new DBDatabaseDriverHSql();
// Set Driver specific properties (if any)
return driver;
}
else if (provider.equalsIgnoreCase("postgresql"))
{
DBDatabaseDriverPostgreSQL driver = new DBDatabaseDriverPostgreSQL();
// Set Driver specific properties (if any)
driver.setDatabaseName(config.getSchemaName());
// Create the reverse function that is needed by this sample
driver.createReverseFunction(conn);
return driver;
}
else if (provider.equalsIgnoreCase("h2"))
{
DBDatabaseDriverH2 driver = new DBDatabaseDriverH2();
// Set Driver specific properties (if any)
driver.setDatabaseName(config.getSchemaName());
return driver;
}
else if (provider.equalsIgnoreCase("derby"))
{
DBDatabaseDriverDerby driver = new DBDatabaseDriverDerby();
// Set Driver specific properties (if any)
driver.setDatabaseName(config.getSchemaName());
return driver;
}
else
{ // Unknown Provider
throw new RuntimeException("Unknown Database Provider " + provider);