} else if ("upper_case".equals(storedIdentifierCase)) {
return UPPER_CASE;
} else if ("mixed_case".equals(storedIdentifierCase)) {
return MIXED_CASE;
} else if (!"auto".equals(storedIdentifierCase)) {
throw new JTesterException("Unknown value " + storedIdentifierCase + " for property "
+ PROPKEY_STORED_IDENTIFIER_CASE
+ ". It should be one of lower_case, upper_case, mixed_case or auto.");
}
Connection connection = null;
try {
connection = getSQLHandler().getDataSource().getConnection();
DatabaseMetaData databaseMetaData = connection.getMetaData();
if (databaseMetaData.storesUpperCaseIdentifiers()) {
return UPPER_CASE;
} else if (databaseMetaData.storesLowerCaseIdentifiers()) {
return LOWER_CASE;
} else {
return MIXED_CASE;
}
} catch (SQLException e) {
throw new JTesterException("Unable to determine stored identifier case.", e);
} finally {
closeQuietly(connection, null, null);
}
}