final ResultSet result = statement.executeQuery(query);
if (result.next()) {
final String version = result.getString(1);
final Date date = result.getDate (2);
final String engine = metadata.getDatabaseProductName();
final CitationImpl c = new CitationImpl(Citations.EPSG);
c.getAlternateTitles().add(Vocabulary.formatInternational(
VocabularyKeys.DATA_BASE_$3, "EPSG", version, engine));
c.setEdition(new SimpleInternationalString(version));
c.setEditionDate(date);
authority = (Citation) c.unmodifiable();
hints.put(Hints.VERSION, new Version(version)); // For getImplementationHints()
} else {
authority = Citations.EPSG;
}
result.close();