private static DatabaseInterface mapTypeFromDriver(final String driverClass)
{
if (driverClass == null)
{
return new GenericDatabaseMeta();
}
final DatabaseInterface[] interfaces = DatabaseMeta.getDatabaseInterfaces();
for (int i = 0; i < interfaces.length; i++)
{
final DatabaseInterface dbi = interfaces[i];
final int[] accessTypeList = dbi.getAccessTypeList();
for (int j = 0; j < accessTypeList.length; j++)
{
final int al = accessTypeList[j];
if (al != DatabaseMeta.TYPE_ACCESS_ODBC)
{
dbi.setAccessType(al);
if (driverClass.equals(dbi.getDriverClass()))
{
return dbi;
}
}
}
}
return new GenericDatabaseMeta();
}