Mercurial > hg > LGServices
annotate src/main/java/de/mpiwg/web/fullTextSearch/SortFullTextSearchFileByLastChanged.java @ 105:16a0796e3871 default tip
remove "console.log" from general.js
author | Calvin Yeh <cyeh@mpipw-berlin.mpg.com> |
---|---|
date | Fri, 29 Sep 2017 16:18:02 +0200 |
parents | dd2fcc5f5deb |
children |
rev | line source |
---|---|
69
dd2fcc5f5deb
new: saved table in full text search page: new layout and sorting by time
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
1 package de.mpiwg.web.fullTextSearch; |
dd2fcc5f5deb
new: saved table in full text search page: new layout and sorting by time
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
2 |
dd2fcc5f5deb
new: saved table in full text search page: new layout and sorting by time
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
3 import java.util.Comparator; |
dd2fcc5f5deb
new: saved table in full text search page: new layout and sorting by time
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
4 |
dd2fcc5f5deb
new: saved table in full text search page: new layout and sorting by time
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
5 import de.mpiwg.gazetteer.bo.LGFullTextSearchFile; |
dd2fcc5f5deb
new: saved table in full text search page: new layout and sorting by time
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
6 |
dd2fcc5f5deb
new: saved table in full text search page: new layout and sorting by time
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
7 |
dd2fcc5f5deb
new: saved table in full text search page: new layout and sorting by time
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
8 public class SortFullTextSearchFileByLastChanged implements Comparator<LGFullTextSearchFile>{ |
dd2fcc5f5deb
new: saved table in full text search page: new layout and sorting by time
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
9 |
dd2fcc5f5deb
new: saved table in full text search page: new layout and sorting by time
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
10 public int compare(LGFullTextSearchFile o1, LGFullTextSearchFile o2) { |
dd2fcc5f5deb
new: saved table in full text search page: new layout and sorting by time
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
11 |
dd2fcc5f5deb
new: saved table in full text search page: new layout and sorting by time
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
12 if(o1.getLastChangeDate() == null || o2.getLastChangeDate() == null){ |
dd2fcc5f5deb
new: saved table in full text search page: new layout and sorting by time
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
13 return o1.getId().compareTo(o2.getId()); |
dd2fcc5f5deb
new: saved table in full text search page: new layout and sorting by time
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
14 } |
dd2fcc5f5deb
new: saved table in full text search page: new layout and sorting by time
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
15 return o1.getLastChangeDate().compareTo(o2.getLastChangeDate()); |
dd2fcc5f5deb
new: saved table in full text search page: new layout and sorting by time
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
16 } |
dd2fcc5f5deb
new: saved table in full text search page: new layout and sorting by time
Zoe Hong <zhong@mpiwg-berlin.mpg.de>
parents:
diff
changeset
|
17 } |