public List getMaintainList(String persId, String status) { String[] aStat = status.split(","); String param = "?"; for(int i=1; i<aStat.length; i++) { param += ",?"; } String hql = "select m.mtnId, m.devName, m.positionName from Maintain m, Planning p " + "where m.planId = p.planId and p.beginDate<sysdate and p.endDate>sysdate" + " and m.persIds like ? and m.status in ( " + param + ") "; String pPersId = "%;" + persId + ";%"; Object[] oParam = new Object[aStat.length+1]; oParam[0] = pPersId; for(int i=1; i<oParam.length; i++) { oParam[i] = new Long(aStat[i-1]); } List list = findListByHql(hql, oParam); return list; }