DefaultCategoryDescriptor descriptor = null;
// at first we have to check if the category name is valid
// Cast the repository connection to a JDBC Connection.
final JDBCRepositoryConnection jdbcConnection
= (JDBCRepositoryConnection) connection;
// Resolve field names.
final String categoryNameField =
resolveFieldName(jdbcConnection, CATEGORY_NAME_COLUMN_NAMES);
final String projectField =
resolveFieldName(jdbcConnection, PROJECT_COLUMN_NAMES);
final String categoryIDField =
resolveFieldName(jdbcConnection, CATEGORY_ID_COLUMN_NAMES);
final String languageIDField =
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;
String categoryId = null;
try {
stmt = sqlConnection.createStatement();