Mercurial > hg > LGServices
view src/main/java/de/mpiwg/web/topicList/fullTextSearch/SortContentByBookId.java @ 60:90d5e86c157d
new: auto refresh page when there's new version saved from Ext-Interface
author | Zoe Hong <zhong@mpiwg-berlin.mpg.de> |
---|---|
date | Wed, 25 May 2016 11:11:32 +0200 |
parents | |
children |
line wrap: on
line source
package de.mpiwg.web.fullTextSearch; import java.util.Comparator; import de.mpiwg.gazetteer.db.DBContents; public class SortContentByBookId implements Comparator<DBContents>{ public int compare(DBContents o1, DBContents o2) { if(o1.getSection() == null || o2.getSection() == null){ return o1.getId().compareTo(o2.getId()); } return o1.getSection().getBook().getId().compareTo(o2.getSection().getBook().getId()); } }