Search in sources :

Example 1 with SectionDetails

use of org.akaza.openclinica.bean.odmbeans.SectionDetails in project OpenClinica by OpenClinica.

the class OdmExtractDAO method setSectionBean.

private FormDetailsBean setSectionBean(FormDetailsBean formDetail, Integer crfVId) {
    HashMap variables = new HashMap();
    variables.put(new Integer(1), new Integer(crfVId));
    ArrayList<SectionDetails> sectionBeans = new ArrayList<SectionDetails>();
    SectionDAO secdao = new SectionDAO(this.ds);
    ArrayList sections = secdao.findAllByCRFVersionId(crfVId);
    Iterator iter = sections.iterator();
    while (iter.hasNext()) {
        SectionDetails sectionDetails = new SectionDetails();
        SectionBean sectionBean = (SectionBean) iter.next();
        sectionDetails.setSectionId(sectionBean.getId());
        sectionDetails.setSectionLabel(sectionBean.getLabel());
        sectionDetails.setSectionTitle(sectionBean.getTitle());
        sectionDetails.setSectionSubtitle(sectionBean.getSubtitle());
        sectionDetails.setSectionInstructions(sectionBean.getInstructions());
        sectionDetails.setSectionPageNumber(sectionBean.getPageNumberLabel());
        sectionBeans.add(sectionDetails);
    }
    formDetail.setSectionDetails(sectionBeans);
    return formDetail;
}
Also used : SectionDetails(org.akaza.openclinica.bean.odmbeans.SectionDetails) SectionBean(org.akaza.openclinica.bean.submit.SectionBean) HashMap(java.util.HashMap) LinkedHashMap(java.util.LinkedHashMap) ArrayList(java.util.ArrayList) Iterator(java.util.Iterator) SectionDAO(org.akaza.openclinica.dao.submit.SectionDAO)

Aggregations

ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 Iterator (java.util.Iterator)1 LinkedHashMap (java.util.LinkedHashMap)1 SectionDetails (org.akaza.openclinica.bean.odmbeans.SectionDetails)1 SectionBean (org.akaza.openclinica.bean.submit.SectionBean)1 SectionDAO (org.akaza.openclinica.dao.submit.SectionDAO)1