Query query = em.createQuery("SELECT t FROM TblPatientE t where t.id IN :ids", TblPatientE.class);
query.setParameter("ids", idlist);
List<TblPatientE> list = query.getResultList();
List<ResponsePatient> patientList = new ArrayList<ResponsePatient>();
for(TblPatientE patient : list) {
patientList.add(new ResponsePatient(patient));
}
ResponseData responseData = new ResponseData();
responseData.setMax(list.size());
responseData.setSuccess(true);
responseData.setData(list);