Search in sources :

Example 51 with StudyEventBean

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

the class StudyEventDAO method findByStudySubjectIdAndDefinitionIdAndOrdinal.

// YW 08-21-2007
public EntityBean findByStudySubjectIdAndDefinitionIdAndOrdinal(int ssbid, int sedid, int ord) {
    this.setTypesExpected();
    HashMap variables = new HashMap();
    variables.put(Integer.valueOf(1), Integer.valueOf(ssbid));
    variables.put(Integer.valueOf(2), Integer.valueOf(sedid));
    variables.put(Integer.valueOf(3), Integer.valueOf(ord));
    String sql = digester.getQuery("findByStudySubjectIdAndDefinitionIdAndOrdinal");
    ArrayList alist = this.select(sql, variables);
    Iterator it = alist.iterator();
    StudyEventBean eb = new StudyEventBean();
    if (it.hasNext()) {
        eb = (StudyEventBean) this.getEntityFromHashMap((HashMap) it.next());
    }
    return eb;
}
Also used : HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) Iterator(java.util.Iterator) StudyEventBean(org.akaza.openclinica.bean.managestudy.StudyEventBean)

Example 52 with StudyEventBean

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

the class StudyEventDAO method findAllBySubjectAndStudy.

/**
 * @deprecated
 * @param subjectId
 * @param studyId
 */
@Deprecated
public ArrayList findAllBySubjectAndStudy(int subjectId, int studyId) {
    ArrayList answer = new ArrayList();
    this.setTypesExpected();
    HashMap variables = new HashMap();
    variables.put(Integer.valueOf(1), Integer.valueOf(subjectId));
    variables.put(Integer.valueOf(2), Integer.valueOf(studyId));
    variables.put(Integer.valueOf(3), Integer.valueOf(studyId));
    ArrayList alist = this.select(digester.getQuery("findAllBySubjectAndStudy"), variables);
    Iterator it = alist.iterator();
    while (it.hasNext()) {
        StudyEventBean seb = (StudyEventBean) this.getEntityFromHashMap((HashMap) it.next());
        answer.add(seb);
    }
    return answer;
}
Also used : HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) Iterator(java.util.Iterator) StudyEventBean(org.akaza.openclinica.bean.managestudy.StudyEventBean)

Example 53 with StudyEventBean

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

the class StudyEventDAO method findAllByStudy.

@Override
public ArrayList findAllByStudy(StudyBean study) {
    ArrayList answer = new ArrayList();
    this.setTypesExpected();
    HashMap variables = new HashMap();
    variables.put(Integer.valueOf(1), Integer.valueOf(study.getId()));
    ArrayList alist = this.select(digester.getQuery("findAllByStudy"), variables);
    Iterator it = alist.iterator();
    while (it.hasNext()) {
        StudyEventBean seb = (StudyEventBean) this.getEntityFromHashMap((HashMap) it.next());
        answer.add(seb);
    }
    return answer;
}
Also used : HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) Iterator(java.util.Iterator) StudyEventBean(org.akaza.openclinica.bean.managestudy.StudyEventBean)

Example 54 with StudyEventBean

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

the class StudyEventDAO method getNextScheduledEvent.

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

Example 55 with StudyEventBean

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

the class StudyEventDAO method findAllByDefinitionAndSubject.

public ArrayList findAllByDefinitionAndSubject(StudyEventDefinitionBean definition, StudySubjectBean subject) {
    ArrayList answer = new ArrayList();
    setTypesExpected();
    HashMap variables = new HashMap();
    variables.put(Integer.valueOf(1), Integer.valueOf(definition.getId()));
    variables.put(Integer.valueOf(2), Integer.valueOf(subject.getId()));
    String sql = digester.getQuery("findAllByDefinitionAndSubject");
    ArrayList alist = this.select(sql, variables);
    Iterator it = alist.iterator();
    while (it.hasNext()) {
        StudyEventBean studyEvent = (StudyEventBean) this.getEntityFromHashMap((HashMap) it.next());
        answer.add(studyEvent);
    }
    return answer;
}
Also used : HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) Iterator(java.util.Iterator) StudyEventBean(org.akaza.openclinica.bean.managestudy.StudyEventBean)

Aggregations

StudyEventBean (org.akaza.openclinica.bean.managestudy.StudyEventBean)162 ArrayList (java.util.ArrayList)103 StudyEventDAO (org.akaza.openclinica.dao.managestudy.StudyEventDAO)91 EventCRFBean (org.akaza.openclinica.bean.submit.EventCRFBean)90 EventCRFDAO (org.akaza.openclinica.dao.submit.EventCRFDAO)74 StudySubjectBean (org.akaza.openclinica.bean.managestudy.StudySubjectBean)71 StudyEventDefinitionBean (org.akaza.openclinica.bean.managestudy.StudyEventDefinitionBean)62 StudySubjectDAO (org.akaza.openclinica.dao.managestudy.StudySubjectDAO)62 StudyEventDefinitionDAO (org.akaza.openclinica.dao.managestudy.StudyEventDefinitionDAO)60 StudyBean (org.akaza.openclinica.bean.managestudy.StudyBean)58 Date (java.util.Date)52 HashMap (java.util.HashMap)50 StudyDAO (org.akaza.openclinica.dao.managestudy.StudyDAO)47 EventDefinitionCRFDAO (org.akaza.openclinica.dao.managestudy.EventDefinitionCRFDAO)43 ItemDataBean (org.akaza.openclinica.bean.submit.ItemDataBean)37 ItemDataDAO (org.akaza.openclinica.dao.submit.ItemDataDAO)37 EventDefinitionCRFBean (org.akaza.openclinica.bean.managestudy.EventDefinitionCRFBean)36 CRFVersionBean (org.akaza.openclinica.bean.submit.CRFVersionBean)34 CRFVersionDAO (org.akaza.openclinica.dao.submit.CRFVersionDAO)34 CRFDAO (org.akaza.openclinica.dao.admin.CRFDAO)31