Project

General

Profile

« Previous | Next » 

Revision 28e59cee

Added by Katja Luther almost 6 years ago

fix creation of hybrids after deleting cascading in relationships

View differences:

eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/e4/TaxonEditorInputE4.java
66 66
    private TaxonNode taxonNode;
67 67

  
68 68
    private Map<TaxonBase, TaxonBaseDeletionConfigurator> toDelete = new HashMap<>();
69
    private Set<TaxonBase> toSaveNew = new HashSet<>();
69
    private Set<Synonym> toSaveNewSynonym = new HashSet<>();
70
    private Set<Taxon> toSaveNewConcept = new HashSet<>();
71

  
70 72

  
71 73
    private Set<AbstractPostTaxonOperation> operations = new HashSet<>();
72 74

  
......
299 301
        this.operations.add(operation);
300 302
    }
301 303

  
302
    public void addToSaveNew(TaxonBase toSaveNew) {
303
        this.toSaveNew.add(toSaveNew);
304
    public void addToSaveNewSynonym(Synonym toSaveNew) {
305
        this.toSaveNewSynonym.add(toSaveNew);
306
    }
307
    public void addToSaveNewConcept(Taxon toSaveNew) {
308
        this.toSaveNewConcept.add(toSaveNew);
304 309
    }
305 310

  
306 311
    @Override
......
322 327
        }
323 328
        operations.clear();
324 329

  
325
        CdmStore.getService(ITaxonService.class).save(toSaveNew);
330
        for (Synonym syn: toSaveNewSynonym){
331
            CdmStore.getService(ITaxonService.class).createSynonym(taxonNode.getTaxon().getUuid(),syn);
332
        }
333
//        for (Taxon taxon: toSaveNewConcept){
334
//            CdmStore.getService(ITaxonService.class).createConcept(taxonNode.getTaxon().getUuid(),taxon);
335
//        }
326 336

  
327 337
        CdmStore.getService(ITaxonNodeService.class).merge(taxonNode, true);
328 338

  

Also available in: Unified diff