Revision d71868a2
Added by Andreas Müller about 3 years ago
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/persistence/dao/hibernate/taxon/TaxonNodeDaoHibernateImpl.java | ||
---|---|---|
683 | 683 |
boolean overwriteExisting, boolean includeSharedTaxa, boolean emptySecundumDetail) { |
684 | 684 |
String queryStr = forSubtreeAcceptedQueryStr(includeSharedTaxa, subTreeIndex, false, SelectMode.COUNT); |
685 | 685 |
if (!overwriteExisting){ |
686 |
queryStr += " AND t.sec IS NULL "; |
|
686 |
queryStr += " AND t.secSource.citation IS NULL ";
|
|
687 | 687 |
} |
688 | 688 |
return countResult(queryStr); |
689 | 689 |
} |
... | ... | |
698 | 698 |
boolean overwriteExisting, boolean includeSharedTaxa, boolean emptySecundumDetail) { |
699 | 699 |
String queryStr = forSubtreeSynonymQueryStr(includeSharedTaxa, subTreeIndex, false, SelectMode.COUNT); |
700 | 700 |
if (!overwriteExisting){ |
701 |
queryStr += " AND syn.sec IS NULL "; |
|
701 |
queryStr += " AND syn.secSource.citation IS NULL ";
|
|
702 | 702 |
} |
703 | 703 |
return countResult(queryStr); |
704 | 704 |
} |
... | ... | |
722 | 722 |
|
723 | 723 |
String queryStr = forSubtreeAcceptedQueryStr(includeSharedTaxa, subTreeIndex, false, SelectMode.ID); |
724 | 724 |
if (!overwriteExisting){ |
725 |
queryStr += " AND t.sec IS NULL "; |
|
725 |
queryStr += " AND t.secSource.citation IS NULL ";
|
|
726 | 726 |
} |
727 | 727 |
return setSecundum(newSec, emptyDetail, queryStr, monitor); |
728 | 728 |
|
... | ... | |
734 | 734 |
|
735 | 735 |
String queryStr = forSubtreeSynonymQueryStr(includeSharedTaxa, subTreeIndex, false, SelectMode.ID); |
736 | 736 |
if (!overwriteExisting){ |
737 |
queryStr += " AND syn.sec IS NULL "; |
|
737 |
queryStr += " AND syn.secSource.citation IS NULL ";
|
|
738 | 738 |
} |
739 | 739 |
return setSecundum(newSec, emptyDetail, queryStr, monitor); |
740 | 740 |
} |
... | ... | |
746 | 746 |
List<List<Integer>> partitionList = splitIdList(query.list(), DEFAULT_PARTITION_SIZE); |
747 | 747 |
for (List<Integer> taxonIdList : partitionList){ |
748 | 748 |
List<TaxonBase> taxonList = taxonDao.loadList(taxonIdList, null, null); |
749 |
for (TaxonBase taxonBase : taxonList){ |
|
749 |
for (TaxonBase<?> taxonBase : taxonList){
|
|
750 | 750 |
if (taxonBase != null){ |
751 | 751 |
taxonBase = taxonDao.load(taxonBase.getUuid()); |
752 | 752 |
taxonBase.setSec(newSec); |
Also available in: Unified diff
ref #9327 add sec source to TaxonBase (with few open issues)