1.Collections.sort排序
List<DateObj> list = mongoDAO.findByQuery(query,DateObj.class); Collections.sort(list, new Comparator<DateObj>() { @Override public int compare(DateObjo1, DateObjo2) { if(o1.getEntryTime()-o2.getEntryTime()==0) return 0; return o1.getEntryTime()-o2.getEntryTime()>0?-1:1; } }); //EntryTime自动为long