public ClinicCodeVoCollection listClinicsCodes(ClinicRefVoCollection voRefCollClinics) { if (voRefCollClinics == null) return null; if (voRefCollClinics.size() <= 0) return null; DomainFactory factory = getDomainFactory(); StringBuffer hqlStart = new StringBuffer(); String hql; hqlStart.append("from Clinic v where c.id in ( "); for (int i = 0; i < voRefCollClinics.size(); i++) { if (i == 0 || i == voRefCollClinics.size()) hqlStart.append(voRefCollClinics.get(i).getID_Clinic()); else hqlStart.append("," + voRefCollClinics.get(i).getID_Clinic()); } hql = hqlStart.toString() + " )"; List lst = factory.find(hql); return ClinicCodeVoAssembler.createClinicCodeVoCollectionFromClinic(lst); }