String titleCache = label != null ? label : (abbrev != null ? abbrev : description );\r
String idInVocStr = idInVocabulary == null ? "NULL" : "'" + idInVocabulary + "'";\r
String sqlInsertTerm = " INSERT INTO DefinedTermBase (DTYPE, id, uuid, created, termtype, idInVocabulary, protectedtitlecache, titleCache, orderindex, defaultcolor, vocabulary_id)" +\r
- "VALUES ('" + dtype + "', " + id + ", '" + uuidTerm + "', '" + created + "', " + termType.ordinal() + ", " + idInVocStr + ", " + protectedTitleCache + ", '" + titleCache + "', " + orderIndex + ", " + defaultColor + ", " + vocId + ")"; \r
+ "VALUES ('" + dtype + "', " + id + ", '" + uuidTerm + "', '" + created + "', " + termType.getKey() + ", " + idInVocStr + ", " + protectedTitleCache + ", '" + titleCache + "', " + orderIndex + ", " + defaultColor + ", " + vocId + ")"; \r
datasource.executeUpdate(sqlInsertTerm);\r
\r
updateFeatureTerms(termId, datasource, monitor);\r
private void updateRanks(Integer termId, ICdmDataSource datasource, IProgressMonitor monitor) throws SQLException {\r
if (dtype.equals(Rank.class.getSimpleName())){\r
String sqlUpdate = "UPDATE DefinedTermBase SET " + \r
- " termType = " + rankClass.ordinal() + \r
+ " termType = " + rankClass.getKey() + \r
" WHERE id = " + termId;\r
datasource.executeUpdate(sqlUpdate);\r
}\r