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;
}
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;
}
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;
}
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;
}
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;
}
Aggregations