Fixes a problem where the title cache was empty for derived units created through...
authorn.hoffmann <n.hoffmann@localhost>
Thu, 5 May 2011 13:23:26 +0000 (13:23 +0000)
committern.hoffmann <n.hoffmann@localhost>
Thu, 5 May 2011 13:23:26 +0000 (13:23 +0000)
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/entitycreator/AgentCreator.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/entitycreator/OccurrenceCreator.java
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/bulkeditor/input/entitycreator/ReferenceCreator.java

index 0cfeff3f47f679c23504877f3d190f91ec5a72af..3281cc226ac32a6d5f57c68dc932176117f794cf 100644 (file)
@@ -50,14 +50,14 @@ public class AgentCreator implements IEntityCreator<AgentBase> {
        /** {@inheritDoc} */
        public AgentBase createEntity(Object key, String text) {
                TeamOrPersonBase teamOrPerson = null;
        /** {@inheritDoc} */
        public AgentBase createEntity(Object key, String text) {
                TeamOrPersonBase teamOrPerson = null;
-               if (Team.class.equals(((Class) key))) {
+               if (Team.class.equals((key))) {
                        teamOrPerson = Team.NewInstance();
                }
                        teamOrPerson = Team.NewInstance();
                }
-               if (Person.class.equals(((Class) key))) {
+               if (Person.class.equals((key))) {
                        teamOrPerson = Person.NewInstance();
                }               
                if (teamOrPerson != null) {
                        teamOrPerson = Person.NewInstance();
                }               
                if (teamOrPerson != null) {
-                       teamOrPerson.setTitleCache(text);
+                       teamOrPerson.setTitleCache(text, true);
                }
                return teamOrPerson;
        }
                }
                return teamOrPerson;
        }
index cba6a807eacc46306c9d01ae5931fbfdc5c0560f..f77a675bc0c71ebd83e36af3b87852c448fdd79c 100644 (file)
@@ -67,7 +67,7 @@ public class OccurrenceCreator implements
                }
 
                if (specimenOrObservation != null) {
                }
 
                if (specimenOrObservation != null) {
-                       specimenOrObservation.setTitleCache(text);
+                       specimenOrObservation.setTitleCache(text, true);
                }
                return specimenOrObservation;
        }
                }
                return specimenOrObservation;
        }
index 6d141bebecfe1409aeef50fe11758e6852c47fba..cee07a26469407b4bb0c9ea7760a3e2808baeeaf 100644 (file)
@@ -13,8 +13,6 @@ package eu.etaxonomy.taxeditor.bulkeditor.input.entitycreator;
 import java.util.HashMap;
 import java.util.Map;
 
 import java.util.HashMap;
 import java.util.Map;
 
-import org.apache.log4j.Logger;
-
 import eu.etaxonomy.cdm.model.reference.Reference;
 import eu.etaxonomy.cdm.model.reference.ReferenceFactory;
 import eu.etaxonomy.cdm.model.reference.ReferenceType;
 import eu.etaxonomy.cdm.model.reference.Reference;
 import eu.etaxonomy.cdm.model.reference.ReferenceFactory;
 import eu.etaxonomy.cdm.model.reference.ReferenceType;
@@ -98,7 +96,7 @@ public class ReferenceCreator implements IEntityCreator<Reference> {
                        BulkEditorUtil.warn(getClass(), "Reference type " + key + " not found. Creating reference with default type.");
                        reference = ReferenceFactory.newGeneric();
                }
                        BulkEditorUtil.warn(getClass(), "Reference type " + key + " not found. Creating reference with default type.");
                        reference = ReferenceFactory.newGeneric();
                }
-               reference.setTitleCache(text);
+               reference.setTitleCache(text, true);
                return reference;
        }
 
                return reference;
        }