Mercurial > hg > LGServices
comparison src/main/java/de/mpiwg/web/fullTextSearch/SortFullTextSearchFileByLastChanged.java @ 69:dd2fcc5f5deb
new: saved table in full text search page: new layout and sorting by time
author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
---|---|
date | Wed, 10 Aug 2016 13:00:19 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
68:7e161f2e6660 | 69:dd2fcc5f5deb |
---|---|
1 package de.mpiwg.web.fullTextSearch; | |
2 | |
3 import java.util.Comparator; | |
4 | |
5 import de.mpiwg.gazetteer.bo.LGFullTextSearchFile; | |
6 | |
7 | |
8 public class SortFullTextSearchFileByLastChanged implements Comparator<LGFullTextSearchFile>{ | |
9 | |
10 public int compare(LGFullTextSearchFile o1, LGFullTextSearchFile o2) { | |
11 | |
12 if(o1.getLastChangeDate() == null || o2.getLastChangeDate() == null){ | |
13 return o1.getId().compareTo(o2.getId()); | |
14 } | |
15 return o1.getLastChangeDate().compareTo(o2.getLastChangeDate()); | |
16 } | |
17 } |