hibernate获取记录条数的方法(转)
hql获取记录条数
String sql = "select count(ca.CATALOGLID) as count from PLATFORM_CATALOG_INFO ca, PLATFORM_CHANNEL_INFO ch where ch.CHANNELID= '" + channelid + "' and ca.CHANNELID = ch.CHANNELID order by ca.CATALOGLID"; return session.createSQLQuery(sql).addScalar("count", Hibernate.INTEGER).uniqueResult();?