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 阅读(4575)
评论(4) 编辑 收藏 所属分类:
Java