Search in sources :

Example 46 with EventDefinitionCRFBean

use of org.akaza.openclinica.bean.managestudy.EventDefinitionCRFBean in project OpenClinica by OpenClinica.

the class EventDefinitionCRFDAO method findAll.

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

Example 47 with EventDefinitionCRFBean

use of org.akaza.openclinica.bean.managestudy.EventDefinitionCRFBean in project OpenClinica by OpenClinica.

the class EventDefinitionCRFDAO method findForStudyByStudyEventIdAndCRFVersionId.

/**
 * Find the EventDefinitionCRFBean of a study. So this
 * EventDefinitionCRFBean has no parent.
 *
 * @param studyEventId
 *            The requested study event id.
 * @param crfVersionId
 *            The requested CRF version id.
 * @return The event definition crf which defines the study event and crf
 *         version.
 */
public EventDefinitionCRFBean findForStudyByStudyEventIdAndCRFVersionId(int studyEventId, int crfVersionId) {
    EventDefinitionCRFBean answer = new EventDefinitionCRFBean();
    this.setTypesExpected();
    HashMap variables = new HashMap();
    variables.put(new Integer(1), new Integer(studyEventId));
    variables.put(new Integer(2), new Integer(crfVersionId));
    String sql = digester.getQuery("findForStudyByStudyEventIdAndCRFVersionId");
    ArrayList alist = this.select(sql, variables);
    Iterator it = alist.iterator();
    while (it.hasNext()) {
        answer = (EventDefinitionCRFBean) this.getEntityFromHashMap((HashMap) it.next());
    }
    return answer;
}
Also used : HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) Iterator(java.util.Iterator) EventDefinitionCRFBean(org.akaza.openclinica.bean.managestudy.EventDefinitionCRFBean)

Example 48 with EventDefinitionCRFBean

use of org.akaza.openclinica.bean.managestudy.EventDefinitionCRFBean in project OpenClinica by OpenClinica.

the class EventDefinitionCRFDAO method findByStudyEventDefinitionIdAndCRFId.

/**
 * @param studyEventDefinitionId
 *            The study event definition of the desired event definition
 *            crf.
 * @param crfId
 *            The CRF of the desired event definition crf.
 * @return The event definition crf for the specified study event definition
 *         and CRF.
 */
public EventDefinitionCRFBean findByStudyEventDefinitionIdAndCRFId(int studyEventDefinitionId, int crfId) {
    EventDefinitionCRFBean answer = new EventDefinitionCRFBean();
    this.setTypesExpected();
    HashMap variables = new HashMap();
    variables.put(new Integer(1), new Integer(studyEventDefinitionId));
    variables.put(new Integer(2), new Integer(crfId));
    String sql = digester.getQuery("findByStudyEventDefinitionIdAndCRFId");
    ArrayList alist = this.select(sql, variables);
    Iterator it = alist.iterator();
    while (it.hasNext()) {
        answer = (EventDefinitionCRFBean) this.getEntityFromHashMap((HashMap) it.next());
    }
    return answer;
}
Also used : HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) Iterator(java.util.Iterator) EventDefinitionCRFBean(org.akaza.openclinica.bean.managestudy.EventDefinitionCRFBean)

Example 49 with EventDefinitionCRFBean

use of org.akaza.openclinica.bean.managestudy.EventDefinitionCRFBean in project OpenClinica by OpenClinica.

the class EventDefinitionCRFDAO method findAllByDefinitionAndSiteIdAndParentStudyId.

/**
 * Find all EventDefinitionCRFBean for the site
 *
 * @param definitionId
 * @param siteId
 * @param parentStudyId
 * @return
 */
public Collection findAllByDefinitionAndSiteIdAndParentStudyId(int definitionId, int siteId, int parentStudyId) {
    this.setTypesExpected();
    HashMap variables = new HashMap();
    variables.put(new Integer(1), new Integer(definitionId));
    variables.put(new Integer(2), new Integer(siteId));
    variables.put(new Integer(3), new Integer(parentStudyId));
    variables.put(new Integer(4), new Integer(definitionId));
    variables.put(new Integer(5), new Integer(siteId));
    String sql = digester.getQuery("findAllByDefinitionAndSiteIdAndParentStudyId");
    ArrayList alist = this.select(sql, variables);
    ArrayList al = new ArrayList();
    Iterator it = alist.iterator();
    while (it.hasNext()) {
        EventDefinitionCRFBean eb = (EventDefinitionCRFBean) this.getEntityFromHashMap((HashMap) it.next());
        al.add(eb);
    }
    return al;
}
Also used : HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) Iterator(java.util.Iterator) EventDefinitionCRFBean(org.akaza.openclinica.bean.managestudy.EventDefinitionCRFBean)

Example 50 with EventDefinitionCRFBean

use of org.akaza.openclinica.bean.managestudy.EventDefinitionCRFBean in project OpenClinica by OpenClinica.

the class EventDefinitionCRFDAO method findByStudyEventDefinitionIdAndCRFIdAndSiteIdAndParentStudyId.

public EventDefinitionCRFBean findByStudyEventDefinitionIdAndCRFIdAndSiteIdAndParentStudyId(int studyEventDefinitionId, int crfId, int siteId, int parentStudyId) {
    EventDefinitionCRFBean answer = new EventDefinitionCRFBean();
    this.setTypesExpected();
    HashMap variables = new HashMap();
    variables.put(new Integer(1), new Integer(studyEventDefinitionId));
    variables.put(new Integer(2), new Integer(crfId));
    variables.put(new Integer(3), new Integer(siteId));
    variables.put(new Integer(4), new Integer(parentStudyId));
    variables.put(new Integer(5), new Integer(siteId));
    String sql = digester.getQuery("findByStudyEventDefinitionIdAndCRFIdAndSiteIdAndParentStudyId");
    ArrayList alist = this.select(sql, variables);
    Iterator it = alist.iterator();
    while (it.hasNext()) {
        answer = (EventDefinitionCRFBean) this.getEntityFromHashMap((HashMap) it.next());
    }
    return answer;
}
Also used : HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) Iterator(java.util.Iterator) EventDefinitionCRFBean(org.akaza.openclinica.bean.managestudy.EventDefinitionCRFBean)

Aggregations

EventDefinitionCRFBean (org.akaza.openclinica.bean.managestudy.EventDefinitionCRFBean)146 ArrayList (java.util.ArrayList)112 EventCRFBean (org.akaza.openclinica.bean.submit.EventCRFBean)67 EventDefinitionCRFDAO (org.akaza.openclinica.dao.managestudy.EventDefinitionCRFDAO)65 HashMap (java.util.HashMap)57 CRFBean (org.akaza.openclinica.bean.admin.CRFBean)50 StudyEventDefinitionBean (org.akaza.openclinica.bean.managestudy.StudyEventDefinitionBean)50 CRFVersionBean (org.akaza.openclinica.bean.submit.CRFVersionBean)49 CRFVersionDAO (org.akaza.openclinica.dao.submit.CRFVersionDAO)48 CRFDAO (org.akaza.openclinica.dao.admin.CRFDAO)43 EventCRFDAO (org.akaza.openclinica.dao.submit.EventCRFDAO)42 StudyEventDefinitionDAO (org.akaza.openclinica.dao.managestudy.StudyEventDefinitionDAO)38 Iterator (java.util.Iterator)36 StudyBean (org.akaza.openclinica.bean.managestudy.StudyBean)35 StudyEventDAO (org.akaza.openclinica.dao.managestudy.StudyEventDAO)35 StudyEventBean (org.akaza.openclinica.bean.managestudy.StudyEventBean)32 FormProcessor (org.akaza.openclinica.control.form.FormProcessor)30 ItemDataDAO (org.akaza.openclinica.dao.submit.ItemDataDAO)28 DisplayEventCRFBean (org.akaza.openclinica.bean.submit.DisplayEventCRFBean)26 StudyDAO (org.akaza.openclinica.dao.managestudy.StudyDAO)26