use of org.akaza.openclinica.bean.submit.FormLayoutBean in project OpenClinica by OpenClinica.
the class FormLayoutDAO method findAllByCRF.
public Collection findAllByCRF(int crfId) {
this.setTypesExpected();
HashMap variables = new HashMap();
variables.put(new Integer(1), new Integer(crfId));
String sql = digester.getQuery("findAllByCRF");
ArrayList alist = this.select(sql, variables);
ArrayList al = new ArrayList();
Iterator it = alist.iterator();
while (it.hasNext()) {
FormLayoutBean eb = (FormLayoutBean) this.getEntityFromHashMap((HashMap) it.next());
al.add(eb);
}
return al;
}
use of org.akaza.openclinica.bean.submit.FormLayoutBean in project OpenClinica by OpenClinica.
the class FormLayoutDAO method findByFullName.
public EntityBean findByFullName(String version, String crfName) {
FormLayoutBean eb = new FormLayoutBean();
this.setTypesExpected();
HashMap variables = new HashMap();
variables.put(new Integer(1), version);
variables.put(new Integer(2), crfName);
String sql = digester.getQuery("findByFullName");
ArrayList alist = this.select(sql, variables);
Iterator it = alist.iterator();
if (it.hasNext()) {
eb = (FormLayoutBean) this.getEntityFromHashMap((HashMap) it.next());
}
return eb;
}
use of org.akaza.openclinica.bean.submit.FormLayoutBean in project OpenClinica by OpenClinica.
the class FormLayoutDAO method findDefCRFVersionsByStudyEvent.
public ArrayList findDefCRFVersionsByStudyEvent(int studyEventDefinitionId) {
this.setTypesExpected();
HashMap variables = new HashMap();
variables.put(new Integer(1), new Integer(studyEventDefinitionId));
String sql = digester.getQuery("findDefCRFVersionsByStudyEvent");
ArrayList alist = this.select(sql, variables);
ArrayList al = new ArrayList();
Iterator it = alist.iterator();
while (it.hasNext()) {
FormLayoutBean eb = (FormLayoutBean) this.getEntityFromHashMap((HashMap) it.next());
al.add(eb);
}
return al;
}
use of org.akaza.openclinica.bean.submit.FormLayoutBean in project OpenClinica by OpenClinica.
the class FormLayoutDAO method findAll.
public Collection findAll() {
this.setTypesExpected();
ArrayList al = new ArrayList();
ArrayList alist = this.select(digester.getQuery("findAll"));
Iterator it = alist.iterator();
while (it.hasNext()) {
FormLayoutBean eb = (FormLayoutBean) this.getEntityFromHashMap((HashMap) it.next());
al.add(eb);
}
return al;
}
use of org.akaza.openclinica.bean.submit.FormLayoutBean in project OpenClinica by OpenClinica.
the class FormLayoutDAO method update.
public EntityBean update(EntityBean eb) {
// UPDATE CRF_VERSION SET CRF_ID=?,STATUS_ID=?,NAME=?,
// DESCRIPTION=?,DATE_UPDATED=NOW(),UPDATE_ID=?,REVISION_NOTES =? WHERE
// CRF_VERSION_ID=?
FormLayoutBean ib = (FormLayoutBean) eb;
HashMap variables = new HashMap();
variables.put(new Integer(1), new Integer(ib.getCrfId()));
variables.put(new Integer(2), new Integer(ib.getStatus().getId()));
variables.put(new Integer(3), ib.getName());
variables.put(new Integer(4), ib.getDescription());
variables.put(new Integer(5), new Integer(ib.getUpdater().getId()));
variables.put(new Integer(6), ib.getRevisionNotes());
variables.put(new Integer(7), new Integer(ib.getId()));
this.execute(digester.getQuery("update"), variables);
return eb;
}
Aggregations