Example usage for org.apache.commons.beanutils DynaBean get

List of usage examples for org.apache.commons.beanutils DynaBean get

Introduction

In this page you can find the example usage for org.apache.commons.beanutils DynaBean get.

Prototype

public Object get(String name);

Source Link

Document

Return the value of a simple property with the specified name.

Usage

From source file:us.mn.state.health.lims.patient.saving.Accessioner.java

/**
 * Assume all the fields on the dynaForm have the right names (see code) and
 * @throws IllegalAccessException//from www  . ja va2s. c  om
 * @throws InvocationTargetException
 * @throws NoSuchMethodException
 */
protected void populatePatientData()
        throws IllegalAccessException, InvocationTargetException, NoSuchMethodException {
    DynaBean dynaForm = projectFormMapper.getDynaBean();
    Timestamp lastupdated1 = patientInDB.getLastupdated();
    PropertyUtils.copyProperties(patientInDB, dynaForm);
    patientInDB.setLastupdated(lastupdated1);
    Person person = patientInDB.getPerson();
    PropertyUtils.copyProperties(person, dynaForm);

    patientInDB.setNationalId(convertEmptyToNull((String) dynaForm.get("subjectNumber")));
    patientInDB.setExternalId(convertEmptyToNull((String) dynaForm.get("siteSubjectNumber")));
    populatePatientBirthDate((String) dynaForm.get("birthDateForDisplay"));

    projectData = (ProjectData) dynaForm.get("ProjectData");
    if (projectData != null) {
        person.setHomePhone(convertEmptyToNull(projectData.getPhoneNumber()));
        person.setFax(convertEmptyToNull(projectData.getFaxNumber()));
        person.setEmail(convertEmptyToNull(projectData.getEmail()));
        person.setStreetAddress(convertEmptyToNull(projectData.getAddress()));
    }
}

From source file:us.mn.state.health.lims.patient.saving.PatientEntry.java

public PatientEntry(DynaBean dynaBean, String sysUserId, HttpServletRequest request)
        throws LIMSRuntimeException, IllegalAccessException, InvocationTargetException, NoSuchMethodException {
    super((String) dynaBean.get("labNo"), (String) dynaBean.get("subjectNumber"),
            (String) dynaBean.get("siteSubjectNumber"), sysUserId);

    this.projectFormMapper = getProjectFormMapper(dynaBean);
    this.projectFormMapper.setPatientForm(true);
    this.projectForm = projectFormMapper.getProjectForm();
    findStatusSet();/*from w w  w  .j a v  a  2 s  .c  o  m*/

    this.request = request;

    this.newPatientStatus = RecordStatus.InitialRegistration;
    this.newSampleStatus = RecordStatus.NotRegistered;
}

From source file:us.mn.state.health.lims.patient.saving.SampleEntry.java

public SampleEntry(DynaBean dynaBean, String sysUserId, HttpServletRequest request) throws Exception {
    super((String) dynaBean.get("labNo"), (String) dynaBean.get("subjectNumber"),
            (String) dynaBean.get("siteSubjectNumber"), sysUserId);

    this.projectFormMapper = getProjectFormMapper(dynaBean);
    this.projectFormMapper.setPatientForm(false);
    this.projectForm = projectFormMapper.getProjectForm();
    findStatusSet();//from   ww  w.  j  a v a2  s  .c o  m

    this.dynaBean = dynaBean;
    this.request = request;

    this.newPatientStatus = RecordStatus.NotRegistered;
    this.newSampleStatus = RecordStatus.InitialRegistration;
}