]> git.mxchange.org Git - jcustomer-core.git/blobdiff - src/org/mxchange/jshopcore/model/category/ProductCategory.java
Cleanup:
[jcustomer-core.git] / src / org / mxchange / jshopcore / model / category / ProductCategory.java
index 0e9442760b86d061a7bbf82fff269de0c2fab17d..cc632786b728f9ffafcf5224f88bd59015e5a076 100644 (file)
@@ -16,7 +16,6 @@
  */
 package org.mxchange.jshopcore.model.category;
 
-import java.util.Objects;
 import javax.persistence.Basic;
 import javax.persistence.CascadeType;
 import javax.persistence.Column;
@@ -35,7 +34,7 @@ import javax.persistence.Table;
  */
 @Entity (name = "category")
 @Table (name = "category")
-public class ProductCategory implements Category, Comparable<Category> {
+public class ProductCategory implements Category {
 
        /**
         * Serial number
@@ -84,26 +83,6 @@ public class ProductCategory implements Category, Comparable<Category> {
        public ProductCategory () {
        }
 
-       @Override
-       public int compareTo (final Category category) {
-               // category should not be null
-               if (null == category) {
-                       throw new NullPointerException("category is null"); //NOI18N
-               }
-
-               // Is the categoryId the same?
-               if (Objects.equals(this.getCategoryId(), category.getCategoryId())) {
-                       // Same categoryId, means same category
-                       return 0;
-               } else if (this.getCategoryId() > category.getCategoryId()) {
-                       // This categoryId is larger than compared to
-                       return -1;
-               }
-
-               // The other categoryId is larger
-               return 1;
-       }
-
        @Override
        public void copyAll (final Category category) {
                // Copy all data