/*
* 分頁(yè)顯示收件箱的數量
*/
public List getList(final User user, final int offset, final int rows)
throws Exception {
HibernateCallback callBack = new HibernateCallback() {
public Object doInHibernate(Session session)
throws HibernateException, SQLException {
Query query = session
.createQuery("from Inbox s where s.touserid=:touserid order by s.status,s.createtime desc");
query.setFirstResult(offset);
query.setMaxResults(rows);
query.setLong("touserid", user.getId().longValue());
return query.list();
}
};
return this.getHibernateTemplate().executeFind(callBack);
}
本站僅提供存儲服務(wù),所有內容均由用戶(hù)發(fā)布,如發(fā)現有害或侵權內容,請
點(diǎn)擊舉報。