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;}