uuids.add(presenceTermVocabUuid);\r
\r
\r
- for(TermVocabulary vocab : vocabularyService.findByTermType(TermType.PresenceAbsenceTerm)) {\r
+ for(TermVocabulary vocab : vocabularyService.findByTermType(TermType.PresenceAbsenceTerm, null)) {\r
if(!uuids.contains(vocab.getUuid())) {\r
uuids.add(vocab.getUuid());\r
}\r
* Return a List of vocabularies that belong to the term type supplied
*
* @param termType The term type corresponding to the vocabularies of interest
+ * @param propertyPaths
* @return a List of vocabularies
*/
- public <T extends DefinedTermBase> List<TermVocabulary<T>> findByTermType(TermType termType);
+ public <T extends DefinedTermBase> List<TermVocabulary<T>> findByTermType(TermType termType, List<String> propertyPaths);
/**
@Override
- public <T extends DefinedTermBase> List<TermVocabulary<T>> findByTermType(TermType termType) {
+ public <T extends DefinedTermBase> List<TermVocabulary<T>> findByTermType(TermType termType, List<String> propertyPaths) {
Criteria criteria = getSession().createCriteria(type);
criteria.add(Restrictions.eq("termType", termType));
//this.addOrder(criteria, orderHints);
List<TermVocabulary<T>> result = criteria.list();
- defaultBeanInitializer.initializeAll(result, null);
+ defaultBeanInitializer.initializeAll(result, propertyPaths);
return result;
}
* @param termType The term type for which the list of vocabularies is desired
* @return a list of vocabularies
*/
- public <T extends DefinedTermBase> List<TermVocabulary<T>> findByTermType(TermType termType);
+ public <T extends DefinedTermBase> List<TermVocabulary<T>> findByTermType(TermType termType, List<String> propertyPaths);
}
}
@Override
- public <T extends DefinedTermBase> List<TermVocabulary<T>> findByTermType(TermType termType) {
- return dao.findByTermType(termType);
+ public <T extends DefinedTermBase> List<TermVocabulary<T>> findByTermType(TermType termType, List<String> propertyPaths) {
+ return dao.findByTermType(termType, propertyPaths);
}
/**
* (non-Javadoc)
@Test
// @Ignore //FIXME assertSame does not work yet
public void testGetRankVocabulary() {
- List<TermVocabulary<Rank>> rankVocabularyList = vocabularyService.findByTermType(TermType.Rank);
+ List<TermVocabulary<Rank>> rankVocabularyList = vocabularyService.findByTermType(TermType.Rank, null);
assertTrue(rankVocabularyList.size() == 1);
OrderedTermVocabulary<Rank> rankVocabulary = (OrderedTermVocabulary<Rank>)rankVocabularyList.get(0);
assertNotNull(rankVocabulary);
// @Ignore //not yet correctly implemented
public void testGetTypeDesignationVocabulary() {
List<TermVocabulary<SpecimenTypeDesignationStatus>> typeDesignationVocabularyList =
- vocabularyService.findByTermType(TermType.SpecimenTypeDesignationStatus);
+ vocabularyService.findByTermType(TermType.SpecimenTypeDesignationStatus, null);
assertTrue(typeDesignationVocabularyList.size() == 1);
OrderedTermVocabulary<SpecimenTypeDesignationStatus> typeDesignationVocabulary = (OrderedTermVocabulary<SpecimenTypeDesignationStatus>)typeDesignationVocabularyList.get(0);