]> git.mxchange.org Git - jcontacts-business-core.git/blobdiff - src/org/mxchange/jcontactsbusiness/jobposition/EmployeePosition.java
updated own name and resources
[jcontacts-business-core.git] / src / org / mxchange / jcontactsbusiness / jobposition / EmployeePosition.java
index 71e6e87112f0001b306d3e26756e5abdac2b8bb5..cf3a7e58230db76def428abb4f3b2385d16a4d15 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2016 Roland Haeder
+ * Copyright (C) 2016 Roland Häder
  *
  * This program is free software: you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -28,11 +28,12 @@ import javax.persistence.Index;
 import javax.persistence.Table;
 import javax.persistence.Temporal;
 import javax.persistence.TemporalType;
+import javax.persistence.Transient;
 
 /**
  * A POJO for job positions
  * <p>
- * @author Roland Haeder<roland@mxchange.org>
+ * @author Roland Häder<roland@mxchange.org>
  */
 @Entity (name = "company_job_positions")
 @Table (
@@ -51,6 +52,7 @@ public class EmployeePosition implements JobPosition {
        /**
         * Serial number
         */
+       @Transient
        private static final long serialVersionUID = 18_427_587_187_609L;
 
        /**
@@ -95,25 +97,15 @@ public class EmployeePosition implements JobPosition {
 
                final JobPosition other = (JobPosition) object;
 
-               if (!Objects.equals(this.getJobPositionName(), other.getJobPositionName())) {
+               if (!Objects.equals(this.getJobPositionId(), other.getJobPositionId())) {
                        return false;
-               } else if (!Objects.equals(this.getJobPositionId(), other.getJobPositionId())) {
+               } else if (!Objects.equals(this.getJobPositionName(), other.getJobPositionName())) {
                        return false;
                }
 
                return true;
        }
 
-       @Override
-       public int hashCode () {
-               int hash = 7;
-
-               hash = 37 * hash + Objects.hashCode(this.getJobPositionId());
-               hash = 37 * hash + Objects.hashCode(this.getJobPositionName());
-
-               return hash;
-       }
-
        @Override
        @SuppressWarnings ("ReturnOfDateField")
        public Calendar getJobPositionCreated () {
@@ -158,4 +150,14 @@ public class EmployeePosition implements JobPosition {
                this.jobPositionUpdated = jobPositionUpdated;
        }
 
+       @Override
+       public int hashCode () {
+               int hash = 7;
+
+               hash = 37 * hash + Objects.hashCode(this.getJobPositionId());
+               hash = 37 * hash + Objects.hashCode(this.getJobPositionName());
+
+               return hash;
+       }
+
 }