query.setParameterList("uuids",missingTermCandidateUuids);\r
List<?> persistedUuids = query.list();\r
\r
+ \r
+ //fully load and initialize vocabularies if required\r
+ if (vocabularyResponse != null){\r
+ String hql2 = " SELECT voc " +\r
+ " FROM TermVocabulary voc left join fetch voc.terms terms left join fetch terms.representations representations " +\r
+ " left join fetch voc.representations vocReps " +\r
+ " WHERE terms.uuid IN (:termUuids) OR ( voc.uuid IN (:vocUuids) AND voc.terms is empty ) " +\r
+// " WHERE voc.uuid IN (:vocUuids) AND voc.terms is empty " +\r
+ " ORDER BY voc.uuid ";\r
+ query = getSession().createQuery(hql2);\r
+ query.setParameterList("termUuids",missingTermCandidateUuids);\r
+ query.setParameterList("vocUuids",uuidsRequested.keySet());\r
+ List<TermVocabulary> o = query.list();\r
+ for (TermVocabulary<?> voc : o){\r
+ vocabularyResponse.put(voc.getUuid(), voc);\r
+ }\r
+ }\r
+ \r
//compute missing terms\r
if (missingTermCandidateUuids.size() == persistedUuids.size()){\r
missingTermCandidateUuids.clear();\r
}\r
}\r
}\r
- \r
- //fully load and initialize vocabularies if required\r
- if (vocabularyResponse != null){\r
- String hql2 = " SELECT voc " +\r
- " FROM TermVocabulary voc left join fetch voc.terms terms left join fetch terms.representations representations " +\r
- " left join fetch voc.representations vocReps " +\r
- " WHERE terms.uuid IN (:termUuids) OR ( voc.uuid IN (:vocUuids) AND voc.terms is empty ) " +\r
-// " WHERE voc.uuid IN (:vocUuids) AND voc.terms is empty " +\r
- " ORDER BY voc.uuid ";\r
- query = getSession().createQuery(hql2);\r
- query.setParameterList("termUuids",missingTermCandidateUuids);\r
- query.setParameterList("vocUuids",uuidsRequested.keySet());\r
- List<TermVocabulary> o = query.list();\r
- for (TermVocabulary<?> voc : o){\r
- vocabularyResponse.put(voc.getUuid(), voc);\r
- }\r
- }\r
+\r
\r
return;\r
}\r