public PatientInvasiveDeviceVo savePatientInvasiveDevice(PatientInvasiveDeviceVo record) throws StaleObjectException { if(record == null) throw new DomainRuntimeException("Invalid record"); if(!record.isValidated()) throw new CodingRuntimeException("Record not validated"); DomainFactory factory = getDomainFactory(); ims.clinical.domain.objects.PatientInvasiveDevice domainRecord = PatientInvasiveDeviceVoAssembler.extractPatientInvasiveDevice(factory, record); factory.save(domainRecord); return PatientInvasiveDeviceVoAssembler.create(domainRecord); }
public PatientInvasiveDeviceVo getPatientInvasiveDevice(PatientInvasiveDeviceRefVo id) { if(id == null || id.getID_PatientInvasiveDevice() == null) throw new DomainRuntimeException("Invalid record"); DomainFactory factory = getDomainFactory(); PatientInvasiveDevice domainRecord = (PatientInvasiveDevice)factory.getDomainObject(PatientInvasiveDevice.class, id.getID_PatientInvasiveDevice().intValue()); return PatientInvasiveDeviceVoAssembler.create(domainRecord); }