Do u have any suggestion or reconmendation on how to implement pagination with SQLJ. I need to know in SQLJ if the following methods are available:
setFirstResult(startRecord); << does not seem to be available
setMaxResults(endRecord); << seems to be available in SQLJ
I usually do pagination with Hibernate as show below:
private List getAllFeeds(final String queryName, final int startRecord, final int endRecord) {
return getHibernateTemplate().executeFind(new HibernateCallback(){
public Object doInHibernate(Session session) throws HibernateException, SQLException {
Query query = session.getNamedQuery(queryName);
query.setFirstResult(startRecord);
query.setMaxResults(endRecord);
List list = query.list();
return list;
}
});
}
Quote:
|
Originally Posted by sathyaram_s
Can you share how you do pagination ? This will determine if it is static or dynamic ..
Cheers
Sathyaram
|