use of org.akaza.openclinica.bean.admin.CRFBean in project OpenClinica by OpenClinica.
the class CRFDAO method findByOid.
public CRFBean findByOid(String oid) {
CRFBean crf = new CRFBean();
this.unsetTypeExpected();
setTypesExpected();
HashMap variables = new HashMap();
variables.put(Integer.valueOf(1), oid);
String sql = digester.getQuery("findByOID");
ArrayList rows = this.select(sql, variables);
Iterator it = rows.iterator();
if (it.hasNext()) {
crf = (CRFBean) this.getEntityFromHashMap((HashMap) it.next());
return crf;
} else {
return null;
}
}
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;
}
Aggregations