懂hibernate3的哥们请进
public int rowCount(){
//获得连接工厂中当前的会话
List list=this.getHibernateTemplate().getSessionFactory().getCurrentSession()
//创建标准查询
.createCriteria(Addrlist.class)
.setProjection(Projections.projectionList()
.add(Projections.rowCount())).list();
int result=Integer.parseInt(list.get(0).toString());
return result;
}
Projections错误是无此类型
import org.springframework.orm.hibernate3.support.HibernateDaoSupport;加这个包
希望帮我指出那句错了,谢谢哥们