日期:2014-05-20 浏览次数:20935 次
public String GetJustcrawledConfList() throws UnsupportedEncodingException{
int totalRow = tconferenceService.getRowstemp(TConference.class, "id", ......);
pager = pagerService.getPager(currentPage, pagerMethod, totalRow);
this.setCurrentPage(String.valueOf(pager.getCurrentPage()));
this.setTotalRows(String.valueOf(totalRow));
System.out.println("String.valueOf(totalRow)=="+String.valueOf(totalRow));
availableItems = tconferenceService.queryItemstemp(TConference.class, "id", ..... pager.getPageSize(), pager.getStartRow()); return SUCCESS;
}
public List<T> queryEntityItemstemp(Class<T> entityClass, ID id, ArrayList<String> fieldnameList, ArrayList<String> valueList, int pageSize, int startRow){
final int pageSize1 = pageSize;
final int startRow1 = startRow;
final String entityname = entityClass.getName();
String hql="select a.conferenceid, a.conferencename,count(b.id) as count from meetings.ssh.model.TConference as a,meetings.ssh.model.TConferencedocument as b where a.ifcrawl=1 and a.ifanalysis =0 and b.conferenceid = a.conferenceid group by a.conferenceid,a.conferencename order by count(b.id) desc";
final String hql1 = hql;
return this.getHibernateTemplate().executeFind(new HibernateCallback() {
public List doInHibernate(Session session)
throws HibernateException, SQLException {
Query query = session.createQuery(hql1);
if (startRow1 >= 0 && pageSize1 >= 0) {
query.setFirstResult(startRow1);
query.setMaxResults(pageSize1);
}
return query.list();
}
});
}
<s:iterator value="availableItems" status="meeting">
<td align="left"><a href="${conferenceurl}" target="_blank"><s:property value="conferencename" /></a>[<s:property value="conferenceid" />]</td>