return setSecundum(newSec, emptyDetail, queryStr, monitor);\r
}\r
\r
- @SuppressWarnings("unchecked")\r
private <T extends TaxonBase<?>> Set<T> setSecundum(Reference newSec, boolean emptyDetail, String queryStr, IProgressMonitor monitor) {\r
Set<T> result = new HashSet<>();\r
Query query = getSession().createQuery(queryStr);\r
+ @SuppressWarnings("unchecked")\r
List<List<Integer>> partitionList = splitIdList(query.list(), DEFAULT_SET_SUBTREE_PARTITION_SIZE);\r
for (List<Integer> taxonIdList : partitionList){\r
- List<TaxonBase> taxonList = taxonDao.loadList(taxonIdList, null, null);\r
- for (TaxonBase<?> taxonBase : taxonList){\r
+ @SuppressWarnings("unchecked")\r
+ List<T> taxonList = (List<T>)taxonDao.loadList(taxonIdList, null, null);\r
+ for (T taxonBase : taxonList){\r
if (taxonBase != null){\r
taxonBase = CdmBase.deproxy(taxonBase);\r
if (newSec == null && taxonBase.getSec() !=null\r
|| newSec != null && (taxonBase.getSec() == null || !newSec.equals(taxonBase.getSec()) )){\r
taxonBase.setSec(newSec);\r
- result.add((T)taxonBase);\r
+ result.add(taxonBase);\r
}\r
if (emptyDetail){\r
if (taxonBase.getSecMicroReference() != null){\r
taxonBase.setSecMicroReference(null);\r
- result.add((T)taxonBase);\r
+ result.add(taxonBase);\r
}\r
}\r
\r