hql可以的。String ids[]=new String[]{"1","2","3"};String hql= " from com,you.YourPOJO where id in (?)"; Query query = session.createQuery(hql);
query .setParameters(ids);相关方法: Query setParameters(Object[] objectArray, Type[] typeArray) throws HibernateException;
  Query setParameterList(String string, Collection collection, Type type) throws HibernateException;
  Query setParameterList(String string, Collection collection) throws HibernateException;
  Query setParameterList(String string, Object[] objectArray, Type type) throws HibernateException;
  Query setParameterList(String string, Object[] objectArray) throws HibernateException;