final int databaseMinorVersion = metaData.getDatabaseMinorVersion();
if ( databaseMajorVersion > 10 || ( databaseMajorVersion == 10 && databaseMinorVersion >= 7 ) ) {
return new DerbyTenSevenDialect();
}
else if ( databaseMajorVersion == 10 && databaseMinorVersion == 6 ) {
return new DerbyTenSixDialect();
}
else if ( databaseMajorVersion == 10 && databaseMinorVersion == 5 ) {
return new DerbyTenFiveDialect();
}
else {