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