Search in sources :

Example 56 with CRFBean

use of org.akaza.openclinica.bean.admin.CRFBean in project OpenClinica by OpenClinica.

the class CRFDAO method findByName.

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

Example 57 with CRFBean

use of org.akaza.openclinica.bean.admin.CRFBean in project OpenClinica by OpenClinica.

the class CRFDAO method findAllActiveByDefinitions.

public Collection findAllActiveByDefinitions(int studyId) {
    this.setTypesExpected();
    HashMap variables = new HashMap();
    variables.put(Integer.valueOf(1), Integer.valueOf(studyId));
    variables.put(Integer.valueOf(2), Integer.valueOf(studyId));
    ArrayList alist = this.select(digester.getQuery("findAllActiveByDefinitions"), variables);
    ArrayList al = new ArrayList();
    Iterator it = alist.iterator();
    while (it.hasNext()) {
        CRFBean eb = (CRFBean) this.getEntityFromHashMap((HashMap) it.next());
        al.add(eb);
    }
    return al;
}
Also used : HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) Iterator(java.util.Iterator) CRFBean(org.akaza.openclinica.bean.admin.CRFBean)

Example 58 with CRFBean

use of org.akaza.openclinica.bean.admin.CRFBean in project OpenClinica by OpenClinica.

the class CRFDAO method findAllByStudy.

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

Example 59 with CRFBean

use of org.akaza.openclinica.bean.admin.CRFBean in project OpenClinica by OpenClinica.

the class CRFDAO method findAllByStatus.

public Collection findAllByStatus(Status status) {
    this.setTypesExpected();
    HashMap variables = new HashMap();
    variables.put(Integer.valueOf(1), Integer.valueOf(status.getId()));
    ArrayList alist = this.select(digester.getQuery("findAllByStatus"), variables);
    ArrayList al = new ArrayList();
    Iterator it = alist.iterator();
    while (it.hasNext()) {
        CRFBean eb = (CRFBean) this.getEntityFromHashMap((HashMap) it.next());
        al.add(eb);
    }
    return al;
}
Also used : HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) Iterator(java.util.Iterator) CRFBean(org.akaza.openclinica.bean.admin.CRFBean)

Example 60 with CRFBean

use of org.akaza.openclinica.bean.admin.CRFBean in project OpenClinica by OpenClinica.

the class CRFDAO method findByVersionId.

public CRFBean findByVersionId(int crfVersionId) {
    CRFBean answer = new CRFBean();
    this.unsetTypeExpected();
    this.setTypesExpected();
    HashMap variables = new HashMap();
    variables.put(Integer.valueOf(1), Integer.valueOf(crfVersionId));
    String sql = digester.getQuery("findByVersionId");
    ArrayList rows = select(sql, variables);
    if (rows.size() > 0) {
        HashMap row = (HashMap) rows.get(0);
        answer = (CRFBean) getEntityFromHashMap(row);
    }
    return answer;
}
Also used : HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) CRFBean(org.akaza.openclinica.bean.admin.CRFBean)

Aggregations

CRFBean (org.akaza.openclinica.bean.admin.CRFBean)138 ArrayList (java.util.ArrayList)95 EventDefinitionCRFBean (org.akaza.openclinica.bean.managestudy.EventDefinitionCRFBean)78 CRFDAO (org.akaza.openclinica.dao.admin.CRFDAO)78 EventCRFBean (org.akaza.openclinica.bean.submit.EventCRFBean)70 CRFVersionBean (org.akaza.openclinica.bean.submit.CRFVersionBean)67 CRFVersionDAO (org.akaza.openclinica.dao.submit.CRFVersionDAO)63 StudyEventDefinitionBean (org.akaza.openclinica.bean.managestudy.StudyEventDefinitionBean)56 EventDefinitionCRFDAO (org.akaza.openclinica.dao.managestudy.EventDefinitionCRFDAO)44 HashMap (java.util.HashMap)43 EventCRFDAO (org.akaza.openclinica.dao.submit.EventCRFDAO)43 FormProcessor (org.akaza.openclinica.control.form.FormProcessor)40 StudyEventDefinitionDAO (org.akaza.openclinica.dao.managestudy.StudyEventDefinitionDAO)37 StudyEventDAO (org.akaza.openclinica.dao.managestudy.StudyEventDAO)29 StudyBean (org.akaza.openclinica.bean.managestudy.StudyBean)27 Iterator (java.util.Iterator)26 StudyEventBean (org.akaza.openclinica.bean.managestudy.StudyEventBean)26 DisplayEventCRFBean (org.akaza.openclinica.bean.submit.DisplayEventCRFBean)22 ItemBean (org.akaza.openclinica.bean.submit.ItemBean)21 ItemDataDAO (org.akaza.openclinica.dao.submit.ItemDataDAO)20