commit 5f727043639ae132096a910c7ed09e997dca9673
Author: Patrick Plitzner <p.plitzner@bgbm.org>
Date:   Thu May 3 13:53:10 2018 +0200

    ref #6526 Use type designation comparator from cdmlib

diff --git a/eu.etaxonomy.taxeditor.cdmlib/META-INF/MANIFEST.MF b/eu.etaxonomy.taxeditor.cdmlib/META-INF/MANIFEST.MF
index 8f3631ba3..9f4f6986e 100644
--- a/eu.etaxonomy.taxeditor.cdmlib/META-INF/MANIFEST.MF
+++ b/eu.etaxonomy.taxeditor.cdmlib/META-INF/MANIFEST.MF
@@ -26,6 +26,7 @@ Export-Package: com.google.api,
  eu.etaxonomy.cdm.api.service.lsid,
  eu.etaxonomy.cdm.api.service.lsid.impl,
  eu.etaxonomy.cdm.api.service.molecular,
+ eu.etaxonomy.cdm.api.service.name,
  eu.etaxonomy.cdm.api.service.pager,
  eu.etaxonomy.cdm.api.service.pager.impl,
  eu.etaxonomy.cdm.api.service.search,
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/AbstractUtility.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/AbstractUtility.java
index 5ed6a9e50..bd5461b44 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/AbstractUtility.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/model/AbstractUtility.java
@@ -18,7 +18,6 @@ import java.text.SimpleDateFormat;
 import java.util.ArrayList;
 import java.util.Calendar;
 import java.util.Collection;
-import java.util.Comparator;
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
@@ -61,13 +60,11 @@ import eu.etaxonomy.cdm.api.application.CdmApplicationState;
 import eu.etaxonomy.cdm.api.service.IProgressMonitorService;
 import eu.etaxonomy.cdm.api.service.UpdateResult;
 import eu.etaxonomy.cdm.common.monitor.IRemotingProgressMonitor;
-import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
 import eu.etaxonomy.cdm.io.common.ExportDataWrapper;
 import eu.etaxonomy.cdm.io.common.ExportResult;
 import eu.etaxonomy.cdm.io.common.ExportResultType;
 import eu.etaxonomy.cdm.io.common.ExportType;
 import eu.etaxonomy.cdm.model.common.IEnumTerm;
-import eu.etaxonomy.cdm.model.name.TypeDesignationBase;
 import eu.etaxonomy.taxeditor.event.EventUtility;
 import eu.etaxonomy.taxeditor.operation.AbstractPostOperation;
 import eu.etaxonomy.taxeditor.operation.IFeedbackGenerator;
@@ -766,25 +763,4 @@ public abstract class AbstractUtility {
         return Status.OK_STATUS;
         }
 
-    public static Comparator<TypeDesignationBase> getTypeDesignationComparator(){
-        return new Comparator<TypeDesignationBase>() {
-            @Override
-            public int compare(TypeDesignationBase o1, TypeDesignationBase o2) {
-                if(o1==null){
-                    return 1;
-                }
-                if(o2==null){
-                    return -1;
-                }
-                if(o1.getTypeStatus()==null){
-                    return 1;
-                }
-                if(o2.getTypeStatus()==null){
-                    return-1;
-                }
-                return HibernateProxyHelper.deproxy(o2, TypeDesignationBase.class).getTypeStatus().compareTo(HibernateProxyHelper.deproxy(o1, TypeDesignationBase.class).getTypeStatus());
-            }
-        };
-    }
-
 }
diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/TypeDesignationSection.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/TypeDesignationSection.java
index 10b45a078..939a7e9a9 100644
--- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/TypeDesignationSection.java
+++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/name/TypeDesignationSection.java
@@ -14,6 +14,7 @@ import java.util.Comparator;
 
 import eu.etaxonomy.cdm.api.conversation.ConversationHolder;
 import eu.etaxonomy.cdm.api.service.INameService;
+import eu.etaxonomy.cdm.api.service.name.TypeDesignationComparator;
 import eu.etaxonomy.cdm.hibernate.HibernateProxyHelper;
 import eu.etaxonomy.cdm.model.name.NameTypeDesignation;
 import eu.etaxonomy.cdm.model.name.Rank;
@@ -21,7 +22,6 @@ import eu.etaxonomy.cdm.model.name.SpecimenTypeDesignation;
 import eu.etaxonomy.cdm.model.name.TaxonName;
 import eu.etaxonomy.cdm.model.name.TypeDesignationBase;
 import eu.etaxonomy.cdm.model.taxon.TaxonBase;
-import eu.etaxonomy.taxeditor.model.AbstractUtility;
 import eu.etaxonomy.taxeditor.preference.IPreferenceKeys;
 import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
 import eu.etaxonomy.taxeditor.store.CdmStore;
@@ -80,7 +80,7 @@ public class TypeDesignationSection extends AbstractEntityCollectionSection<Taxo
 
 	@Override
 	public Comparator<TypeDesignationBase> getComparator() {
-        return AbstractUtility.getTypeDesignationComparator();
+        return new TypeDesignationComparator();
 	}
 
 	/** {@inheritDoc} */
