-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #330 from phoenixctms/file_departments
File departments
- Loading branch information
Showing
72 changed files
with
11,830 additions
and
9,867 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
core/src/main/java/org/phoenixctms/ctsms/compare/DepartmentVOComparator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package org.phoenixctms.ctsms.compare; | ||
|
||
import java.util.Comparator; | ||
|
||
import org.phoenixctms.ctsms.vo.DepartmentVO; | ||
|
||
public class DepartmentVOComparator extends AlphanumComparatorBase implements Comparator<DepartmentVO> { | ||
|
||
@Override | ||
public int compare(DepartmentVO a, DepartmentVO b) { | ||
if (a != null && b != null) { | ||
int nameComparison = comp(a.getName(), b.getName()); | ||
if (nameComparison != 0) { | ||
return nameComparison; | ||
} else { | ||
if (a.getId() > b.getId()) { | ||
return 1; | ||
} else if (a.getId() < b.getId()) { | ||
return -1; | ||
} else { | ||
return 0; | ||
} | ||
} | ||
} else if (a == null && b != null) { | ||
return -1; | ||
} else if (a != null && b == null) { | ||
return 1; | ||
} else { | ||
return 0; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.