(no commit message)
authorAndreas Müller <a.mueller@bgbm.org>
Thu, 26 Jun 2008 09:33:48 +0000 (09:33 +0000)
committerAndreas Müller <a.mueller@bgbm.org>
Thu, 26 Jun 2008 09:33:48 +0000 (09:33 +0000)
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/name/HomotypicalGroup.java

index 8c5c32b5ba347fba16aa0e85d8da65ad30ab8334..fee70fe52d37c0e526e37b5c8d54029ae7522dfe 100644 (file)
@@ -81,6 +81,20 @@ public class HomotypicalGroup extends AnnotatableEntity {
                typifiedNames.remove(typifiedName);     
        }
 
+       /**
+        * Meges the typified Names of the homotypicalGroupToMerge into this homotypical group 
+        * @param homotypicalGroup
+        */
+       public void merge(HomotypicalGroup homotypicalGroupToMerge){
+               if (homotypicalGroupToMerge != null){
+                       Set<TaxonNameBase> typifiedNames = new HashSet<TaxonNameBase>();
+                       typifiedNames.addAll(homotypicalGroupToMerge.getTypifiedNames());
+                       for (TaxonNameBase typifiedName: typifiedNames){
+                               this.addTypifiedName(typifiedName);
+                       }
+               }
+       }
+       
        
        @OneToMany
        @Cascade({CascadeType.SAVE_UPDATE})