Search in sources :

Example 1 with FormLayoutBean

use of org.akaza.openclinica.bean.submit.FormLayoutBean in project OpenClinica by OpenClinica.

the class FormLayoutDAO method findAllByCRF.

public Collection findAllByCRF(int crfId) {
    this.setTypesExpected();
    HashMap variables = new HashMap();
    variables.put(new Integer(1), new Integer(crfId));
    String sql = digester.getQuery("findAllByCRF");
    ArrayList alist = this.select(sql, variables);
    ArrayList al = new ArrayList();
    Iterator it = alist.iterator();
    while (it.hasNext()) {
        FormLayoutBean eb = (FormLayoutBean) this.getEntityFromHashMap((HashMap) it.next());
        al.add(eb);
    }
    return al;
}
Also used : HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) Iterator(java.util.Iterator) FormLayoutBean(org.akaza.openclinica.bean.submit.FormLayoutBean)

Example 2 with FormLayoutBean

use of org.akaza.openclinica.bean.submit.FormLayoutBean in project OpenClinica by OpenClinica.

the class FormLayoutDAO method findByFullName.

public EntityBean findByFullName(String version, String crfName) {
    FormLayoutBean eb = new FormLayoutBean();
    this.setTypesExpected();
    HashMap variables = new HashMap();
    variables.put(new Integer(1), version);
    variables.put(new Integer(2), crfName);
    String sql = digester.getQuery("findByFullName");
    ArrayList alist = this.select(sql, variables);
    Iterator it = alist.iterator();
    if (it.hasNext()) {
        eb = (FormLayoutBean) this.getEntityFromHashMap((HashMap) it.next());
    }
    return eb;
}
Also used : HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) Iterator(java.util.Iterator) FormLayoutBean(org.akaza.openclinica.bean.submit.FormLayoutBean)

Example 3 with FormLayoutBean

use of org.akaza.openclinica.bean.submit.FormLayoutBean in project OpenClinica by OpenClinica.

the class FormLayoutDAO method findDefCRFVersionsByStudyEvent.

public ArrayList findDefCRFVersionsByStudyEvent(int studyEventDefinitionId) {
    this.setTypesExpected();
    HashMap variables = new HashMap();
    variables.put(new Integer(1), new Integer(studyEventDefinitionId));
    String sql = digester.getQuery("findDefCRFVersionsByStudyEvent");
    ArrayList alist = this.select(sql, variables);
    ArrayList al = new ArrayList();
    Iterator it = alist.iterator();
    while (it.hasNext()) {
        FormLayoutBean eb = (FormLayoutBean) this.getEntityFromHashMap((HashMap) it.next());
        al.add(eb);
    }
    return al;
}
Also used : HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) Iterator(java.util.Iterator) FormLayoutBean(org.akaza.openclinica.bean.submit.FormLayoutBean)

Example 4 with FormLayoutBean

use of org.akaza.openclinica.bean.submit.FormLayoutBean in project OpenClinica by OpenClinica.

the class FormLayoutDAO method findAll.

public Collection findAll() {
    this.setTypesExpected();
    ArrayList al = new ArrayList();
    ArrayList alist = this.select(digester.getQuery("findAll"));
    Iterator it = alist.iterator();
    while (it.hasNext()) {
        FormLayoutBean eb = (FormLayoutBean) this.getEntityFromHashMap((HashMap) it.next());
        al.add(eb);
    }
    return al;
}
Also used : HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) Iterator(java.util.Iterator) FormLayoutBean(org.akaza.openclinica.bean.submit.FormLayoutBean)

Example 5 with FormLayoutBean

use of org.akaza.openclinica.bean.submit.FormLayoutBean in project OpenClinica by OpenClinica.

the class FormLayoutDAO method update.

public EntityBean update(EntityBean eb) {
    // UPDATE CRF_VERSION SET CRF_ID=?,STATUS_ID=?,NAME=?,
    // DESCRIPTION=?,DATE_UPDATED=NOW(),UPDATE_ID=?,REVISION_NOTES =? WHERE
    // CRF_VERSION_ID=?
    FormLayoutBean ib = (FormLayoutBean) eb;
    HashMap variables = new HashMap();
    variables.put(new Integer(1), new Integer(ib.getCrfId()));
    variables.put(new Integer(2), new Integer(ib.getStatus().getId()));
    variables.put(new Integer(3), ib.getName());
    variables.put(new Integer(4), ib.getDescription());
    variables.put(new Integer(5), new Integer(ib.getUpdater().getId()));
    variables.put(new Integer(6), ib.getRevisionNotes());
    variables.put(new Integer(7), new Integer(ib.getId()));
    this.execute(digester.getQuery("update"), variables);
    return eb;
}
Also used : HashMap(java.util.HashMap) FormLayoutBean(org.akaza.openclinica.bean.submit.FormLayoutBean)

Aggregations

FormLayoutBean (org.akaza.openclinica.bean.submit.FormLayoutBean)17 ArrayList (java.util.ArrayList)14 HashMap (java.util.HashMap)13 Iterator (java.util.Iterator)9 EventDefinitionCRFBean (org.akaza.openclinica.bean.managestudy.EventDefinitionCRFBean)5 CRFBean (org.akaza.openclinica.bean.admin.CRFBean)4 DisplayEventDefinitionCRFBean (org.akaza.openclinica.bean.managestudy.DisplayEventDefinitionCRFBean)3 DisplayEventCRFBean (org.akaza.openclinica.bean.submit.DisplayEventCRFBean)3 EventCRFBean (org.akaza.openclinica.bean.submit.EventCRFBean)3 ElementRefBean (org.akaza.openclinica.bean.odmbeans.ElementRefBean)2 List (java.util.List)1 FormLayoutDAO (org.akaza.openclinica.dao.submit.FormLayoutDAO)1 RuleSetBean (org.akaza.openclinica.domain.rule.RuleSetBean)1