From c3b159f0e6d330bb8b7fe934a132a4d77433b30a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sun, 25 Mar 2018 15:38:04 +0200 Subject: [PATCH] Continued: - need to sort by employee's number, then contact data, then email address and then the rest from narrower to wide data MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../model/employee/BusinessEmployee.java | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) 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 -- 2.39.5