@SuppressWarnings("unchecked") public ims.clinical.vo.SurgicalOperationDetailsVo getOperationDetails(ims.core.admin.vo.CareContextRefVo careContext) { String hqlQuery = "from SurgicalOperationDetails as s1_1 where (s1_1.careContext.id =:careContextID)"; List<Object> domObj = getDomainFactory().find(hqlQuery,new String[]{"careContextID"} , new Object[]{careContext.getID_CareContext()}); if (domObj == null || domObj.size() == 0) return null; return SurgicalOperationDetailsVoAssembler.create((SurgicalOperationDetails) domObj.get(0)); }
public ims.clinical.vo.SurgicalOperationDetailsVo save(ims.clinical.vo.SurgicalOperationDetailsVo record) throws ims.domain.exceptions.DomainInterfaceException, ims.domain.exceptions.StaleObjectException, ims.domain.exceptions.ForeignKeyViolationException { if (record == null) throw new DomainInterfaceException("SurgicalOperationDetailsVo must be not null "); if (!record.isValidated()) throw new DomainInterfaceException("SurgicalOperationDetailsVo must be validates"); SurgicalOperationDetails recDO = SurgicalOperationDetailsVoAssembler.extractSurgicalOperationDetails(getDomainFactory(), record); getDomainFactory().save(recDO); return SurgicalOperationDetailsVoAssembler.create(recDO); }