From: Roland Häder Date: Sun, 25 Mar 2018 13:38:04 +0000 (+0200) Subject: Continued: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c3b159f0e6d330bb8b7fe934a132a4d77433b30a;p=jcontacts-business-core.git Continued: - need to sort by employee's number, then contact data, then email address and then the rest from narrower to wide data Signed-off-by: Roland Häder --- diff --git a/src/org/mxchange/jcontactsbusiness/model/employee/BusinessEmployee.java b/src/org/mxchange/jcontactsbusiness/model/employee/BusinessEmployee.java index 4d4da0a..aaed986 100644 --- a/src/org/mxchange/jcontactsbusiness/model/employee/BusinessEmployee.java +++ b/src/org/mxchange/jcontactsbusiness/model/employee/BusinessEmployee.java @@ -213,22 +213,22 @@ public class BusinessEmployee implements Employable { // Init comparisons final int[] comparators = { - // First check company data (BasicData) - this.getEmployeeBasicData().compareTo(employable.getEmployeeBasicData()), - // ... next headquarters - Headquarters.compare(this.getEmployeeHeadquarter(), employable.getEmployeeHeadquarter()), - // ... branch office - BranchOffices.compare(this.getEmployeeBranchOffice(), employable.getEmployeeBranchOffice()), - // ... department - Departments.compare(this.getEmployeeDepartment(), employable.getEmployeeDepartment()), - // ... job position - JobPositions.compare(this.getEmployeeJobPosition(), employable.getEmployeeJobPosition()), - // ... employee's number + // First employee's number StringUtils.compareIgnoreCase(this.getEmployeeNumber(), employable.getEmployeeNumber()), + // ... finally contact data + Contacts.compare(this.getEmployeePersonalData(), employable.getEmployeePersonalData()), // ... employee's email address StringUtils.compareIgnoreCase(this.getEmployeeEmailAddress(), employable.getEmployeeEmailAddress()), - // ... finally contact data - Contacts.compare(this.getEmployeePersonalData(), employable.getEmployeePersonalData()) + // ... company data (BasicData) + this.getEmployeeBasicData().compareTo(employable.getEmployeeBasicData()), + // ... job position + JobPositions.compare(this.getEmployeeJobPosition(), employable.getEmployeeJobPosition()), + // ... department + Departments.compare(this.getEmployeeDepartment(), employable.getEmployeeDepartment()), + // ... branch office + BranchOffices.compare(this.getEmployeeBranchOffice(), employable.getEmployeeBranchOffice()), + // ... next headquarters + Headquarters.compare(this.getEmployeeHeadquarter(), employable.getEmployeeHeadquarter()), }; // Check all values