public
List find(
final
String hsql,
final
int
firstRow,
final
int
maxRow)
throws
Exception {
return
getHibernateTemplate().executeFind(
new
HibernateCallback() {
public
Object doInHibernate(Session s)
throws
HibernateException, SQLException {
Query query
=
s.createQuery(hsql);
query.setFirstResult(firstRow);
query.setMaxResults(maxRow);
List list
=
query.list();
return
list;
}
});
}
posted on 2006-08-28 14:53
Derek.Guo 閱讀(4579)
評論(4) 編輯 收藏 所屬分類:
Java