public DrugToxicologyItemVo saveItem(DrugToxicologyItemVo drugToxicologyItemToSave) throws ims.domain.exceptions.StaleObjectException { if (drugToxicologyItemToSave == null) throw new CodingRuntimeException("Cannot save null DrugToxicologyItem "); if (!drugToxicologyItemToSave.isValidated()) throw new DomainRuntimeException("DrugToxicologyItem Not Validated."); DomainFactory factory = getDomainFactory(); DrugToxicologyItem domainDrugToxicologyItem = DrugToxicologyItemVoAssembler.extractDrugToxicologyItem(factory, drugToxicologyItemToSave); factory.save(domainDrugToxicologyItem); return DrugToxicologyItemVoAssembler.create(domainDrugToxicologyItem); }
public DrugToxicologyItemVo getDrugToxicologyItem(DrugToxicologyItemRefVo drugToxicologyItemRef) { if (drugToxicologyItemRef == null || drugToxicologyItemRef.getID_DrugToxicologyItem() == null) { throw new CodingRuntimeException("Cannot get DrugToxicologyItem on null Id "); } DomainFactory factory = getDomainFactory(); DrugToxicologyItem domainDrugToxicologyItem = (DrugToxicologyItem) factory.getDomainObject(DrugToxicologyItem.class, drugToxicologyItemRef.getID_DrugToxicologyItem()); return DrugToxicologyItemVoAssembler.create(domainDrugToxicologyItem); }