Project

General

Profile

Revision 56b642e9

ID56b642e96bc09d047be8e96c1c1d0ee80925b468
Parent 24b61cf8
Child 99366401

Added by Patrick Plitzner 7 months ago

Fix clone() method of SpecimenOrObservationBase

View differences:

cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/occurrence/SpecimenOrObservationBase.java
626 626
        //life stage
627 627
        result.setLifeStage(this.lifeStage);
628 628

  
629
        result.descriptions = new HashSet<>();
629 630
        //Descriptions
630 631
        for(DescriptionBase<S> description : this.descriptions) {
631
            result.addDescription(description);
632
            result.addDescription((SpecimenDescription)description.clone());
632 633
        }
633 634

  
635
        result.determinations = new HashSet<>();
634 636
        //DeterminationEvent FIXME should clone() the determination
635 637
        // as the relationship is OneToMany
636 638
        for(DeterminationEvent determination : this.determinations) {
637
            result.addDetermination(determination);
639
            result.addDetermination(determination.clone());
638 640
        }
639 641

  
642
        result.derivationEvents = new HashSet<>();
640 643
        //DerivationEvent
641 644
        for(DerivationEvent derivationEvent : this.derivationEvents) {
642 645
            result.addDerivationEvent(derivationEvent);

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)