Skip to content

Instantly share code, notes, and snippets.

@superalsrk
Created April 5, 2013 03:06
Show Gist options
  • Save superalsrk/5316296 to your computer and use it in GitHub Desktop.
Save superalsrk/5316296 to your computer and use it in GitHub Desktop.
List<Orders> res = hibernateTemplate.executeFind(new HibernateCallback<List<Orders>>() {
public List<Orders> doInHibernate(Session session) throws HibernateException, SQLException {
return session.createQuery(sql.toString()).setInteger(0, status)
.setFirstResult(pageNum)
.setMaxResults(pageSize)
.list();
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment