public RepositoryEnumeration enumerateCategoryNames(
final RepositoryConnection connection)
throws RepositoryException {
// Cast the repository connection to a JDBC Connection.
final JDBCRepositoryConnection jdbcConnection
= (JDBCRepositoryConnection) connection;
// Resolve field name.
final String projectField =
resolveFieldName(jdbcConnection, PROJECT_COLUMN_NAMES);
final String categoryNameField =
resolveFieldName(jdbcConnection, CATEGORY_NAME_COLUMN_NAMES);
final String languageField =
resolveFieldName(jdbcConnection, LANGUAGE_COLUMN_NAMES);
// Resolve table name.
final String vmPolicyCategoryTable =
resolveTableName(jdbcConnection, VMPOLICY_CATEGORY);
// Get the java.sql.Connection out of the JDBC Connection.
final Connection sqlConnection = jdbcConnection.getConnection();
Statement stmt = null;
try {
stmt = sqlConnection.createStatement();