use of org.akaza.openclinica.bean.managestudy.DisplayEventDefinitionCRFBean in project OpenClinica by OpenClinica.
the class SignStudySubjectServlet method populateUncompletedCRFsWithCRFAndVersions.
public static void populateUncompletedCRFsWithCRFAndVersions(DataSource ds, ArrayList uncompletedEventDefinitionCRFs) {
CRFDAO cdao = new CRFDAO(ds);
CRFVersionDAO cvdao = new CRFVersionDAO(ds);
int size = uncompletedEventDefinitionCRFs.size();
for (int i = 0; i < size; i++) {
DisplayEventDefinitionCRFBean dedcrf = (DisplayEventDefinitionCRFBean) uncompletedEventDefinitionCRFs.get(i);
CRFBean cb = (CRFBean) cdao.findByPK(dedcrf.getEdc().getCrfId());
dedcrf.getEdc().setCrf(cb);
ArrayList versions = (ArrayList) cvdao.findAllActiveByCRF(dedcrf.getEdc().getCrfId());
dedcrf.getEdc().setVersions(versions);
uncompletedEventDefinitionCRFs.set(i, dedcrf);
}
}
Aggregations