public PatientMotorChartVo getPatientMotorChart(PatientMotorChartRefVo chartVo) { if(chartVo == null || chartVo.getID_PatientMotorChart() == null) throw new DomainRuntimeException("Motor Chart Filter not provided for get call. "); DomainFactory factory = getDomainFactory(); return PatientMotorChartVoAssembler.create((PatientMotorChart)factory.getDomainObject(chartVo)); }
public PatientMotorChartVo savePatientMotorChart(PatientMotorChartVo chartVo) throws StaleObjectException { // Ensure the value object has been validated if (!chartVo.isValidated()) throw new DomainRuntimeException("ChartVo has not been validated"); DomainFactory factory = getDomainFactory(); PatientMotorChart doChart = PatientMotorChartVoAssembler.extractPatientMotorChart(factory, chartVo); factory.save(doChart); return PatientMotorChartVoAssembler.create(doChart); }