]> git.mxchange.org Git - jcontacts-business-core.git/blobdiff - src/org/mxchange/jcontactsbusiness/headquarters/CompanyHeadQuartersData.java
updated own name and resources
[jcontacts-business-core.git] / src / org / mxchange / jcontactsbusiness / headquarters / CompanyHeadQuartersData.java
index 70b61f01c26da60eb0d757e326658a7f991f94dd..0349a232a07df31fab7900bf7c1f66561f8bd2b3 100644 (file)
@@ -43,7 +43,7 @@ import org.mxchange.jusercore.model.user.User;
 /**
  * A POJO for company headquarts data
  * <p>
- * @author Roland Haeder<roland@mxchange.org>
+ * @author Roland Hรคder<roland@mxchange.org>
  */
 @Entity (name = "company_headquarters")
 @Table (name = "company_headquarters")
@@ -150,7 +150,9 @@ public class CompanyHeadQuartersData implements HeadQuartersData {
 
                final HeadQuartersData other = (HeadQuartersData) object;
 
-               if (!Objects.equals(this.getHeadquartersCity(), other.getHeadquartersCity())) {
+               if (!Objects.equals(this.getHeadquartersId(), other.getHeadquartersId())) {
+                       return false;
+               } else if (!Objects.equals(this.getHeadquartersCity(), other.getHeadquartersCity())) {
                        return false;
                } else if (!Objects.equals(this.getHeadquartersCountry(), other.getHeadquartersCountry())) {
                        return false;
@@ -169,19 +171,6 @@ public class CompanyHeadQuartersData implements HeadQuartersData {
                return true;
        }
 
-       @Override
-       public int hashCode () {
-               int hash = 7;
-               hash = 47 * hash + Objects.hashCode(this.getHeadquartersCity());
-               hash = 47 * hash + Objects.hashCode(this.getHeadquartersCountry());
-               hash = 47 * hash + Objects.hashCode(this.getHeadquartersHouseNumber());
-               hash = 47 * hash + Objects.hashCode(this.getHeadquartersStore());
-               hash = 47 * hash + Objects.hashCode(this.getHeadquartersStreet());
-               hash = 47 * hash + Objects.hashCode(this.getHeadquartersSuiteNumber());
-               hash = 47 * hash + Objects.hashCode(this.getHeadquartersZipCode());
-               return hash;
-       }
-
        @Override
        public String getHeadquartersCity () {
                return this.headquartersCity;
@@ -304,4 +293,20 @@ public class CompanyHeadQuartersData implements HeadQuartersData {
                this.headquartersZipCode = headquartersZipCode;
        }
 
+       @Override
+       public int hashCode () {
+               int hash = 7;
+
+               hash = 47 * hash + Objects.hashCode(this.getHeadquartersId());
+               hash = 47 * hash + Objects.hashCode(this.getHeadquartersCity());
+               hash = 47 * hash + Objects.hashCode(this.getHeadquartersCountry());
+               hash = 47 * hash + Objects.hashCode(this.getHeadquartersHouseNumber());
+               hash = 47 * hash + Objects.hashCode(this.getHeadquartersStore());
+               hash = 47 * hash + Objects.hashCode(this.getHeadquartersStreet());
+               hash = 47 * hash + Objects.hashCode(this.getHeadquartersSuiteNumber());
+               hash = 47 * hash + Objects.hashCode(this.getHeadquartersZipCode());
+
+               return hash;
+       }
+
 }