// 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