Project

General

Profile

Revision 09cef664

ID09cef664007e9adfeaeef099be9a4ebbcc04f620
Parent 7631d065
Child 96df0770

Added by Katja Luther almost 3 years ago

save updated taxa/synonyms in setPublishedFlag

View differences:

cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/TaxonNodeServiceImpl.java
785 785
        if (config.isIncludeAcceptedTaxa()){
786 786
            monitor.subTask("Update Accepted Taxa");
787 787
            Set<TaxonBase> updatedTaxa = dao.setSecundumForSubtreeAcceptedTaxa(subTreeIndex, config.getNewSecundum(), config.isOverwriteExistingAccepted(), config.isIncludeSharedTaxa(), config.isEmptySecundumDetail());
788
//            taxonService.saveOrUpdate(updatedTaxa);
789

  
788
            taxonService.saveOrUpdate(updatedTaxa);
790 789
            result.addUpdatedObjects(updatedTaxa);
791 790
        }
792 791
        if (config.isIncludeSynonyms()){
793
            monitor.subTask("Update Synonyms");
794
            Set<TaxonBase> updatedSynonyms = dao.setSecundumForSubtreeSynonyms(subTreeIndex, config.getNewSecundum(), config.isOverwriteExistingSynonyms(), config.isIncludeSharedTaxa() , config.isEmptySecundumDetail());
795
//            taxonService.saveOrUpdate(updatedSynonyms);
796

  
797
            result.addUpdatedObjects(updatedSynonyms);
792
           monitor.subTask("Update Synonyms");
793
           Set<TaxonBase> updatedSynonyms = dao.setSecundumForSubtreeSynonyms(subTreeIndex, config.getNewSecundum(), config.isOverwriteExistingSynonyms(), config.isIncludeSharedTaxa() , config.isEmptySecundumDetail());
794
           taxonService.saveOrUpdate(updatedSynonyms);
795
           result.addUpdatedObjects(updatedSynonyms);
798 796
        }
799 797

  
800 798
        monitor.done();
......
832 830
        //Reference ref = config.getNewSecundum();
833 831
        if (includeAcceptedTaxa){
834 832
            monitor.subTask("Update Accepted Taxa");
835
            Set<Taxon> updatedTaxa = dao.setPublishForSubtreeAcceptedTaxa(subTreeIndex, publish, includeSharedTaxa);
833
            Set<TaxonBase> updatedTaxa = dao.setPublishForSubtreeAcceptedTaxa(subTreeIndex, publish, includeSharedTaxa);
834
            taxonService.saveOrUpdate(updatedTaxa);
836 835
            result.addUpdatedObjects(updatedTaxa);
837 836
        }
838 837
        if (includeSynonyms){
839 838
            monitor.subTask("Update Synonyms");
840
            Set<Synonym> updatedSynonyms = dao.setPublishForSubtreeSynonyms(subTreeIndex, publish, includeSharedTaxa);
839
            Set<TaxonBase> updatedSynonyms = dao.setPublishForSubtreeSynonyms(subTreeIndex, publish, includeSharedTaxa);
840
            taxonService.saveOrUpdate(updatedSynonyms);
841 841
            result.addUpdatedObjects(updatedSynonyms);
842 842
        }
843 843
        monitor.done();

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)