]> git.mxchange.org Git - jcontacts-business-core.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Sun, 26 Apr 2020 20:24:42 +0000 (22:24 +0200)
committerRoland Häder <roland@mxchange.org>
Sun, 26 Apr 2020 20:33:59 +0000 (22:33 +0200)
- cannot take these enitity references into comparison as this would result in
  an endless loop

Signed-off-by: Roland Häder <roland@mxchange.org>
src/org/mxchange/jcontactsbusiness/model/basicdata/BusinessBasicData.java
src/org/mxchange/jcontactsbusiness/model/branchoffice/BusinessBranchOffice.java
src/org/mxchange/jcontactsbusiness/model/headquarter/BusinessHeadquarter.java

index d7a4c5388a4e30cc395b695824649e69222b9092..f5a9f9d1c057e2ebe3152d69894f545285c75d53 100644 (file)
@@ -265,16 +265,10 @@ public class BusinessBasicData implements BasicData {
                        return false;
                } else if (!Objects.equals(this.getCompanyComments(), other.getCompanyComments())) {
                        return false;
-               } else if (!Objects.equals(this.getCompanyContactEmployee(), other.getCompanyContactEmployee())) {
-                       return false;
                } else if (!Objects.equals(this.getCompanyEmailAddress(), other.getCompanyEmailAddress())) {
                        return false;
                } else if (!Objects.equals(this.getCompanyFaxNumber(), other.getCompanyFaxNumber())) {
                        return false;
-               } else if (!Objects.equals(this.getCompanyFounder(), other.getCompanyFounder())) {
-                       return false;
-               } else if (!Objects.equals(this.getCompanyHeadquarterData(), other.getCompanyHeadquarterData())) {
-                       return false;
                } else if (!Objects.equals(this.getCompanyLandLineNumber(), other.getCompanyLandLineNumber())) {
                        return false;
                } else if (!Objects.equals(this.getCompanyLogo(), other.getCompanyLogo())) {
@@ -488,11 +482,8 @@ public class BusinessBasicData implements BasicData {
 
                hash = 37 * hash + Objects.hashCode(this.getBasicDataId());
                hash = 37 * hash + Objects.hashCode(this.getCompanyComments());
-               hash = 37 * hash + Objects.hashCode(this.getCompanyContactEmployee());
                hash = 37 * hash + Objects.hashCode(this.getCompanyEmailAddress());
                hash = 37 * hash + Objects.hashCode(this.getCompanyFaxNumber());
-               hash = 37 * hash + Objects.hashCode(this.getCompanyFounder());
-               hash = 37 * hash + Objects.hashCode(this.getCompanyHeadquarterData());
                hash = 37 * hash + Objects.hashCode(this.getCompanyLandLineNumber());
                hash = 37 * hash + Objects.hashCode(this.getCompanyLogo());
                hash = 37 * hash + Objects.hashCode(this.getCompanyName());
index 32ee4c9f8a615e01f360859c1d510241d4cee964..5d8f272831c32457a739fbccdce081c85814e9d6 100644 (file)
@@ -56,6 +56,7 @@ import org.mxchange.jphone.model.phonenumbers.landline.DialableLandLineNumber;
 import org.mxchange.jphone.model.phonenumbers.landline.LandLineNumber;
 import org.mxchange.jusercore.model.user.LoginUser;
 import org.mxchange.jusercore.model.user.User;
+import org.mxchange.jusercore.model.user.Users;
 
 /**
  * A POJO for company branch offices
@@ -327,6 +328,8 @@ public class BusinessBranchOffice implements BranchOffice {
                        this.getBranchCompany().compareTo(branchOffice.getBranchCompany()),
                        // ... branch office number
                        SafeNumberUtils.compare(this.getBranchNumber(), branchOffice.getBranchNumber()),
+                       // ... owner employee
+                       Employees.compare(this.getBranchOwnerEmployee(), branchOffice.getBranchOwnerEmployee()),
                        // ... contact person
                        Employees.compare(this.getBranchContactEmployee(), branchOffice.getBranchContactEmployee()),
                        // ... then country
@@ -346,7 +349,9 @@ public class BusinessBranchOffice implements BranchOffice {
                        // ... store ...
                        SafeNumberUtils.compare(this.getBranchStore(), branchOffice.getBranchStore()),
                        // ... suite number ...
-                       SafeNumberUtils.compare(this.getBranchSuiteNumber(), branchOffice.getBranchSuiteNumber())
+                       SafeNumberUtils.compare(this.getBranchSuiteNumber(), branchOffice.getBranchSuiteNumber()),
+                       // ... owning user
+                       Users.compare(this.getBranchUserOwner(), branchOffice.getBranchUserOwner())
                };
 
                // Check all values
@@ -371,8 +376,6 @@ public class BusinessBranchOffice implements BranchOffice {
                        return false;
                } else if (!Objects.equals(this.getBranchCompany(), branchOffice.getBranchCompany())) {
                        return false;
-               } else if (!Objects.equals(this.getBranchContactEmployee(), branchOffice.getBranchContactEmployee())) {
-                       return false;
                } else if (!Objects.equals(this.getBranchCountry(), branchOffice.getBranchCountry())) {
                        return false;
                } else if (!Objects.equals(this.getBranchEmailAddress(), branchOffice.getBranchEmailAddress())) {
@@ -389,10 +392,6 @@ public class BusinessBranchOffice implements BranchOffice {
                        return false;
                } else if (!Objects.equals(this.getBranchNumber(), branchOffice.getBranchNumber())) {
                        return false;
-               } else if (!Objects.equals(this.getBranchOpeningTimes(), branchOffice.getBranchOpeningTimes())) {
-                       return false;
-               } else if (!Objects.equals(this.getBranchOwnerEmployee(), branchOffice.getBranchOwnerEmployee())) {
-                       return false;
                } else if (!Objects.equals(this.getBranchStore(), branchOffice.getBranchStore())) {
                        return false;
                } else if (!Objects.equals(this.getBranchStreet(), branchOffice.getBranchStreet())) {
@@ -630,7 +629,6 @@ public class BusinessBranchOffice implements BranchOffice {
 
                hash = 53 * hash + Objects.hashCode(this.getBranchCity());
                hash = 53 * hash + Objects.hashCode(this.getBranchCompany());
-               hash = 53 * hash + Objects.hashCode(this.getBranchContactEmployee());
                hash = 53 * hash + Objects.hashCode(this.getBranchCountry());
                hash = 53 * hash + Objects.hashCode(this.getBranchEmailAddress());
                hash = 53 * hash + Objects.hashCode(this.getBranchFaxNumber());
@@ -640,8 +638,6 @@ public class BusinessBranchOffice implements BranchOffice {
                hash = 53 * hash + Objects.hashCode(this.getBranchLandLineNumber());
                hash = 53 * hash + Objects.hashCode(this.getBranchLastHouseNumber());
                hash = 53 * hash + Objects.hashCode(this.getBranchNumber());
-               hash = 53 * hash + Objects.hashCode(this.getBranchOpeningTimes());
-               hash = 53 * hash + Objects.hashCode(this.getBranchOwnerEmployee());
                hash = 53 * hash + Objects.hashCode(this.getBranchStore());
                hash = 53 * hash + Objects.hashCode(this.getBranchStreet());
                hash = 53 * hash + Objects.hashCode(this.getBranchSuiteNumber());
index 3628640b6cdb07d1baddfed1a41f8341f1ce3278..c12496f731f0d9e1d76004e1b9df0a9ad124b00f 100644 (file)
@@ -362,8 +362,6 @@ public class BusinessHeadquarter implements Headquarter {
                        return false;
                } else if (!Objects.equals(this.getHeadquarterLastHouseNumber(), headquarter.getHeadquarterLastHouseNumber())) {
                        return false;
-               } else if (!Objects.equals(this.getHeadquarterOpeningTimes(), headquarter.getHeadquarterOpeningTimes())) {
-                       return false;
                } else if (!Objects.equals(this.getHeadquarterStore(), headquarter.getHeadquarterStore())) {
                        return false;
                } else if (!Objects.equals(this.getHeadquarterStreet(), headquarter.getHeadquarterStreet())) {
@@ -590,7 +588,6 @@ public class BusinessHeadquarter implements Headquarter {
                hash = 47 * hash + Objects.hashCode(this.getHeadquarterId());
                hash = 47 * hash + Objects.hashCode(this.getHeadquarterLandLineNumber());
                hash = 47 * hash + Objects.hashCode(this.getHeadquarterLastHouseNumber());
-               hash = 47 * hash + Objects.hashCode(this.getHeadquarterOpeningTimes());
                hash = 47 * hash + Objects.hashCode(this.getHeadquarterStore());
                hash = 47 * hash + Objects.hashCode(this.getHeadquarterStreet());
                hash = 47 * hash + Objects.hashCode(this.getHeadquarterSuiteNumber());