首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

hql中会合函数查询

2013-09-09 
hql中聚合函数查询public int find2(String hql){final String hql1 hql try{this.getHibernateTemplat

hql中聚合函数查询

public int find2(String hql){final String hql1 = hql; try{this.getHibernateTemplate().execute(new HibernateCallback(){//执行查询操作public Object doInHibernate(Session session)throws HibernateException, SQLException {list = session.createQuery(hql1).list();return list;}});int num=(Integer) list.get(0);return num;}catch(Exception e){e.printStackTrace();return  0;}}

热点排行