public static Long getCount(){
Session session = ItemInfoImpl.getSession();
Query query = session.createQuery("select count(*) from ItemInfo");
Long count = (Long)query.uniqueResult();
return count;
}
它的返回类型明明是Object.为什么可以转Long?
添加回答
举报
0/150
提交
取消