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