public List<NamedArea> getUuidAndTitleCache(List<TermVocabulary> vocs, Integer limit,
String pattern);
- /**
- * Returns the parent term of the given term
- * @param childTerm the child term
- * @return the parent term
- */
- public TermDto getParentAsDto(TermDto childTerm);
-
/**
* Returns all terms that are included in the given parent term resp. a part of the given term.
* @param parentTerm the parent term
return result;
}
- @Override
- public TermDto getParentAsDto(TermDto childTerm) {
- String queryString = TermDto.getTermDtoSelect()
- + "where a.uuid = :childUuid";
-
- Query query = getSession().createQuery(queryString);
- query.setParameter("childUuid", childTerm.getUuid());
-
- @SuppressWarnings("unchecked")
- List<Object[]> result = query.list();
-
- List<TermDto> list = TermDto.termDtoListFrom(result);
- if(list.size()==1){
- return list.get(0);
- }
- return null;
- }
-
@Override
public Collection<TermDto> getIncludesAsDto(
TermDto parentTerm) {
List<UuidAndTitleCache<NamedArea>> getUuidAndTitleCache(List<TermVocabulary> vocs, Integer limit, String pattern,
Language lang);
- /**
- * Returns the parent term of the given term
- * @param childTerm the child term
- * @return the parent term
- */
- public TermDto getParentAsDto(TermDto childTerm);
-
/**
* Returns all terms that are included in the given parent term resp. a part of the given term.
* @param parentTerm the parent term
return result;
}
- @Override
- public TermDto getParentAsDto(TermDto childTerm) {
- return dao.getParentAsDto(childTerm);
- }
-
@Override
public Collection<TermDto> getIncludesAsDto(
TermDto parentTerm) {