import eu.etaxonomy.cdm.model.taxon.TaxonRelationshipType;
import eu.etaxonomy.cdm.model.term.DefinedTerm;
import eu.etaxonomy.cdm.model.term.DefinedTermBase;
-import eu.etaxonomy.cdm.model.term.TermBase;
import eu.etaxonomy.cdm.model.term.TermType;
import eu.etaxonomy.cdm.model.term.TermVocabulary;
import eu.etaxonomy.cdm.model.view.AuditEvent;
@SuppressWarnings({ "unchecked", "rawtypes" })
List<DefinedTermBase> result = deduplicateResult(query.list());
return result;
-
}
@Override
}
@SuppressWarnings("unchecked")
- List<NamedArea> result = query.getResultList();
+ List<NamedArea> result = deduplicateResult(query.getResultList());
return result;
}
}
* @param orginals
* @return
*/
- protected static <S extends TermBase> List<S> deduplicateResult(List<S> orginals) {
+ protected static <S extends CdmBase> List<S> deduplicateResult(List<S> orginals) {
List<S> result = new ArrayList<>();
Iterator<S> it = orginals.iterator();
S last = null;
}
@Override
- public Collection<TermDto> getKindOfsAsDto(
- TermDto parentTerm) {
+ public Collection<TermDto> getKindOfsAsDto(TermDto parentTerm) {
+
String queryString;
if (parentTerm.getTermType().equals(TermType.NamedArea)){
queryString = TermDto.getTermDtoSelectNamedArea();
query.setParameter("parentUuid", parentTerm.getUuid());
@SuppressWarnings("unchecked")
- List<Object[]> result = deduplicateResult(query.list());
+ List<Object[]> result = query.list();
List<TermDto> list = TermDto.termDtoListFrom(result);
return list;
}
@SuppressWarnings("unchecked")
- List<Object[]> result = deduplicateResult(query.list());
+ List<Object[]> result = query.list();
List<TermDto> list = TermDto.termDtoListFrom(result);
return list;
query.setParameter("termType", termType);
@SuppressWarnings("unchecked")
- List<Object[]> result = deduplicateResult(query.list());
+ List<Object[]> result = query.list();
List<TermDto> list = TermDto.termDtoListFrom(result);
return list;
}
@SuppressWarnings("unchecked")
- List<Object[]> result = deduplicateResult(query.list());
+ List<Object[]> result = query.list();
List<TermDto> list = TermDto.termDtoListFrom(result);
return list;
query.setParameterList("supportedCategories", supportedCategories);
@SuppressWarnings("unchecked")
- List<Object[]> result = deduplicateResult(query.list());
+ List<Object[]> result = query.list();
list = TermDto.termDtoListFrom(result);
return list;
query.setParameterList("uuidList", uuidList);
@SuppressWarnings("unchecked")
- List<Object[]> result = deduplicateResult(query.list());
+ List<Object[]> result = query.list();
list = TermDto.termDtoListFrom(result);
return list;
query.setParameterList("uuidList", uuidList);
@SuppressWarnings("unchecked")
- List<Object[]> result = deduplicateResult(query.list());
+ List<Object[]> result = query.list();
list = FeatureDto.termDtoListFrom(result);
return list;
@SuppressWarnings("unchecked")
- List<Object[]> result = deduplicateResult(query.list());
+ List<Object[]> result = query.list();
List<TermDto> list = FeatureDto.termDtoListFrom(result);
return list;
}
-
-}
+}
\ No newline at end of file
query.setParameterList("vocabularyUuids", vocabularyUuids);
@SuppressWarnings("unchecked")
- List<Object[]> result = DefinedTermDaoImpl.deduplicateResult(query.list());
+ List<Object[]> result = query.list();
List<TermDto> list = TermDto.termDtoListFrom(result);
return list;
query.setParameter("vocabularyUuid", vocabularyUuid);
@SuppressWarnings("unchecked")
- List<Object[]> result = DefinedTermDaoImpl.deduplicateResult(query.list());
+ List<Object[]> result = query.list();
List<TermDto> list = TermDto.termDtoListFrom(result);
return list;
query.setParameterList("vocabularyUuids", vocabularyUuids);
@SuppressWarnings("unchecked")
- List<Object[]> result = DefinedTermDaoImpl.deduplicateResult(query.list());
+ List<Object[]> result = query.list();
List<TermDto> list = TermDto.termDtoListFrom(result);
return list;
query.setParameter("vocabularyUuid", vocabularyUuid);
@SuppressWarnings("unchecked")
- List<Object[]> result = DefinedTermDaoImpl.deduplicateResult(query.list());
+ List<Object[]> result = query.list();
List<TermDto> list = TermDto.termDtoListFrom(result);
return list;
query.setParameter("vocabularyUuid", vocabularyUuid);
@SuppressWarnings("unchecked")
- List<Object[]> result = DefinedTermDaoImpl.deduplicateResult(query.list());
+ List<Object[]> result = query.list();
List<TermDto> list = null;
if (type.equals(TermType.Feature)|| type.isKindOf(TermType.Feature)){
list = FeatureDto.termDtoListFrom(result);
query.setParameter("feature", TermType.Feature);
@SuppressWarnings("unchecked")
- List<Object[]> result = DefinedTermDaoImpl.deduplicateResult(query.list());
+ List<Object[]> result = query.list();
List<TermVocabularyDto> dtos = TermVocabularyDto.termVocabularyDtoListFrom(result);
query.setParameter("pattern", pattern);
}
@SuppressWarnings("unchecked")
- List<Object[]> result = DefinedTermDaoImpl.deduplicateResult(query.list());
+ List<Object[]> result = query.list();
List<TermVocabularyDto> dtos = TermVocabularyDto.termVocabularyDtoListFrom(result);
return dtos;
query.setParameter("uuid", vocUuid);
@SuppressWarnings("unchecked")
- List<Object[]> result = DefinedTermDaoImpl.deduplicateResult(query.list());
+ List<Object[]> result = query.list();
if (result.size() == 1){
return TermVocabularyDto.termVocabularyDtoListFrom(result).get(0);
}
query.setParameterList("uuidList", vocUuids);
@SuppressWarnings("unchecked")
- List<Object[]> result = DefinedTermDaoImpl.deduplicateResult(query.list());
+ List<Object[]> result = query.list();
list = TermVocabularyDto.termVocabularyDtoListFrom(result);
return list;