Query query = session.createQuery("select term from DefinedTermBase term join fetch term.representations representation where representation.label = :label");
query.setParameter("label", queryString);
@SuppressWarnings({ "unchecked", "rawtypes" })
- List<DefinedTermBase> result = query.list();
+ List<DefinedTermBase> result = deduplicateResult(query.list());
return result;
}
crit.setMaxResults(pagesize);
int firstItem = (page - 1) * pagesize + 1;
crit.setFirstResult(firstItem);
- List<DefinedTermBase> results = crit.list();
+ @SuppressWarnings("unchecked")
+ List<DefinedTermBase> results = deduplicateResult(crit.list());
return results;
}
addPageSizeAndNumber(criteria, pageSize, pageNumber);
@SuppressWarnings("unchecked")
- List<T> result = criteria.list();
+ List<T> result = deduplicateResult(criteria.list());
return result;
}
addPageSizeAndNumber(criteria, pageSize, pageNumber);
@SuppressWarnings("unchecked")
- List<T> result = criteria.list();
+ List<T> result = deduplicateResult(criteria.list());
return result;
}
addPageSizeAndNumber(criteria, pageSize, pageNumber);
@SuppressWarnings("unchecked")
- List<T> result = criteria.list();
+ List<T> result = deduplicateResult(criteria.list());
return result;
}
addPageSizeAndNumber(criteria, pageSize, pageNumber);
@SuppressWarnings("unchecked")
- List<NamedArea> result = criteria.list();
+ List<NamedArea> result = deduplicateResult(criteria.list());
return result;
} else {
AuditQuery query = makeAuditQuery(NamedArea.class, auditEvent);
addOrder(criteria,orderHints);
addPageSizeAndNumber(criteria, pageSize, pageNumber);
- result = criteria.list();
+ result = deduplicateResult(criteria.list());
} else {
AuditQuery query = getAuditReader().createQuery().forEntitiesAtRevision(NamedArea.class,
if (type != null) {
query.add(AuditEntity.relatedId("type").eq(type.getId()));
}
- result = query.getResultList();
+ result = deduplicateResult(query.getResultList());
}
defaultBeanInitializer.initializeAll(result, propertyPaths);
addPageSizeAndNumber(query, pageSize, pageNumber);
@SuppressWarnings("unchecked")
- List<T> result = query.list();
+ List<T> result = deduplicateResult(query.list());
return result;
} else {
AuditQuery query = makeAuditQuery(DefinedTermBase.class, auditEvent);
addPageSizeAndNumber(query, pageSize, pageNumber);
@SuppressWarnings("unchecked")
- List<T> result = query.getResultList();
+ List<T> result = deduplicateResult(query.getResultList());
return result;
}
}
addPageSizeAndNumber(query, pageSize, pageNumber);
@SuppressWarnings("unchecked")
- List<T> results = query.list();
+ List<T> results = deduplicateResult(query.list());
defaultBeanInitializer.initializeAll(results, propertyPaths);
return results;
} else {
query.add(AuditEntity.relatedId("partOf").eq(t.getId()));
addPageSizeAndNumber(query, pageSize, pageNumber);
- result.addAll(query.getResultList());
+ result.addAll(deduplicateResult(query.getResultList()));
}
defaultBeanInitializer.initializeAll(result, propertyPaths);
return result;
query.setParameter("termType", termType);
@SuppressWarnings("unchecked")
- List<T> result = query.list();
+ List<T> result = deduplicateResult(query.list());
defaultBeanInitializer.initializeAll(result, propertyPaths);
return result;
Query query = getSession().createQuery("FROM " + clazz.getSimpleName());
@SuppressWarnings("unchecked")
- List<TERM> result = query.list();
+ List<TERM> result = deduplicateResult(query.list());
defaultBeanInitializer.initializeAll(result, propertyPaths);
query.setParameter("parentUuid", parentTerm.getUuid());
@SuppressWarnings("unchecked")
- List<Object[]> result = query.list();
+ List<Object[]> result = deduplicateResult(query.list());
List<TermDto> list = TermDto.termDtoListFrom(result);
return list;
query.setParameter("parentUuid", parentTerm.getUuid());
@SuppressWarnings("unchecked")
- List<Object[]> result = query.list();
+ List<Object[]> result = deduplicateResult(query.list());
List<TermDto> list = TermDto.termDtoListFrom(result);
return list;
}
@SuppressWarnings("unchecked")
- List<Object[]> result = query.list();
+ List<Object[]> result = deduplicateResult(query.list());
List<TermDto> list = TermDto.termDtoListFrom(result);
return list;
query.setParameter("termType", termType);
@SuppressWarnings("unchecked")
- List<Object[]> result = query.list();
+ List<Object[]> result = deduplicateResult(query.list());
List<TermDto> list = TermDto.termDtoListFrom(result);
return list;
}
@SuppressWarnings("unchecked")
- List<Object[]> result = query.list();
+ List<Object[]> result = deduplicateResult(query.list());
List<TermDto> list = TermDto.termDtoListFrom(result);
return list;
query.setParameterList("supportedCategories", supportedCategories);
@SuppressWarnings("unchecked")
- List<Object[]> result = query.list();
+ List<Object[]> result = deduplicateResult(query.list());
list = TermDto.termDtoListFrom(result);
return list;
query.setParameterList("uuidList", uuidList);
@SuppressWarnings("unchecked")
- List<Object[]> result = query.list();
+ List<Object[]> result = deduplicateResult(query.list());
list = TermDto.termDtoListFrom(result);
return list;
query.setParameterList("uuidList", uuidList);
@SuppressWarnings("unchecked")
- List<Object[]> result = query.list();
+ List<Object[]> result = deduplicateResult(query.list());
list = FeatureDto.termDtoListFrom(result);
return list;
@SuppressWarnings("unchecked")
- List<Object[]> result = query.list();
+ List<Object[]> result = deduplicateResult(query.list());
List<TermDto> list = FeatureDto.termDtoListFrom(result);
return list;