implemented sorting Employees based on keyword counts for the Regular and Area columns in the Statistics panel.

This commit is contained in:
Tom Vahlman 2012-04-06 14:15:50 +02:00
parent d9750a59b8
commit 7c1a00aeec

@ -131,9 +131,7 @@ if(!supervisorName.toString().isEmpty()) {
@Override
protected List<Employee> load() {
org.springframework.data.domain.Sort sorter;
if (sortDirection.toString().isEmpty()) {
sorter = new org.springframework.data.domain.Sort(org.springframework.data.domain.Sort.Direction.ASC, "user.lastName");
} else if (sortDirection.toString().equals("ASC")) {
if (sortDirection.toString().isEmpty() || sortDirection.toString().equals("ASC")) {
sorter = new org.springframework.data.domain.Sort(org.springframework.data.domain.Sort.Direction.ASC, "user.lastName");
} else {
sorter = new org.springframework.data.domain.Sort(org.springframework.data.domain.Sort.Direction.DESC, "user.lastName");