fix #5680: get method needs to be named like the attribute
authorKatja Luther <k.luther@bgbm.org>
Mon, 7 Nov 2016 14:33:52 +0000 (15:33 +0100)
committerKatja Luther <k.luther@bgbm.org>
Tue, 8 Nov 2016 08:28:41 +0000 (09:28 +0100)
cdmlib-model/src/main/java/eu/etaxonomy/cdm/model/description/TaxonInteraction.java

index 329736f2a103b3e1d4dc6871800c0683330eccd1..12b94ca5bdb8b5e266a47c84a3d7970c948b0d81 100644 (file)
@@ -29,7 +29,6 @@ import javax.xml.bind.annotation.XmlType;
 import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
 
 import org.apache.log4j.Logger;
-import org.hibernate.Hibernate;
 import org.hibernate.annotations.Cascade;
 import org.hibernate.annotations.CascadeType;
 import org.hibernate.envers.Audited;
@@ -135,7 +134,7 @@ public class TaxonInteraction extends DescriptionElementBase implements IMultiLa
         * <i>this</i> taxon interaction. The different {@link LanguageString language strings}
         * contained in the multilanguage text should all have the same meaning.
         */
-       public Map<Language,LanguageString> getDescriptions(){
+       public Map<Language,LanguageString> getDescription(){
                return this.description;
        }
 
@@ -146,8 +145,7 @@ public class TaxonInteraction extends DescriptionElementBase implements IMultiLa
         * @see                         #getDescriptions()
         */
        public String getDescription(Language language){
-          Hibernate.initialize(description);
-               LanguageString languageString = description.get(language);
+           LanguageString languageString = description.get(language);
                if (languageString == null){
                        return null;
                }else{
@@ -249,9 +247,9 @@ public class TaxonInteraction extends DescriptionElementBase implements IMultiLa
 
                        //description
                        result.description = new HashMap<Language, LanguageString>();
-                       for (Language language : getDescriptions().keySet()){
+                       for (Language language : getDescription().keySet()){
                                //TODO clone needed? See also IndividualsAssociation
-                               LanguageString newLanguageString = (LanguageString)getDescriptions().get(language).clone();
+                               LanguageString newLanguageString = (LanguageString)getDescription().get(language).clone();
                                result.description.put(language, newLanguageString);
                        }