hql.append(" AND t.site.id=:site");
if(fbean!=null)
hql.append(" AND t.forum.id=:forum");
hql.append(" AND (t.type=:elite OR t.type=:top_elite)");
Session ssn = getSession();
Query q = ssn.createQuery(hql.toString());
q.setInteger("status", TopicBean.STATUS_NORMAL);
q.setInteger("elite", TopicBean.INFO_TYPE_ELITE);
q.setInteger("top_elite", TopicBean.INFO_TYPE_TOP_ELITE);
if(site!=null)
q.setInteger("site", site.getId());