public List findT_conf(final String name, final int offset, final int pagesize) {
return getHibernateTemplate().executeFind(new HibernateCallback(){
public Object doInHibernate(Session session) throws HibernateException, SQLException {
String hql=" from T_conf " + name;
hql+=" order by xlhid";
boolean divpage=false;
if(pagesize!=0)
{
divpage=true;
}
Query query=session.createQuery(hql);
if(divpage){
query.setFirstResult(offset).setMaxResults(pagesize);
}
return query.list();
}
});
}这个函数是在T_confDaoImpl.java文件中  name是where条件字句,后面2个参数是分页用,作用是取数据,select * from ..现在的问题是,数据表里有重复数据,我要用distinct不显示重复了的数据
自己觉得语句应该是select distinct t_jied,t_code from t_conf where name
但是上面函数Query query=session.createQuery(hql);并没看到有select,改也不知道怎么改,要自己重新写个函数,怎么写呢谢谢