首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

HQL 传接List或者数组类型

2012-08-31 
HQL 传递List或者数组类型public ListInteger findUserIdByEmail(String[] emails) {ListInteger resu

HQL 传递List或者数组类型

public List<Integer> findUserIdByEmail(String[] emails) {List<Integer> results = new ArrayList<Integer>();String hql = "select userid from BnsProfile where email in (:addressarray) and emailstatus=" + Constants.USER_EMAIL_VERIFIED;Iterator iter = this.getSession().createQuery(hql).setParameterList("addressarray",emails).iterate();while(iter.hasNext()){Object obj = (Object)iter.next();results.add((Integer)obj);}return results;}

热点排行