public void saveProcedurePerformedByHCP(ProceduresPerformedByHCPVo procedure) throws StaleObjectException, DomainRuntimeException { DomainFactory factory=getDomainFactory(); if (!procedure.isValidated()) { throw new DomainRuntimeException("This Procedure has not be validated."); } if (procedure!=null) { factory.save(ProceduresPerformedByHCPVoAssembler.extractProceduresPerformedByHCP(factory, procedure)); } }
public ProceduresPerformedByHCPVoCollection listProceduresPerformedByHCP(HcpLiteVo hcp, ServiceLiteVo service) { DomainFactory factory=getDomainFactory(); IMSCriteria imsc=new IMSCriteria(ProceduresPerformedByHCP.class, factory); if (hcp!=null && hcp.getID_HcpIsNotNull()) imsc.equal("performingHCP.id", hcp.getID_Hcp()); if (service!=null && service.getID_ServiceIsNotNull()) imsc.equal("service.id", service.getID_Service()); List procedures=imsc.find(); if (procedures.size()>0) return ProceduresPerformedByHCPVoAssembler.createProceduresPerformedByHCPVoCollectionFromProceduresPerformedByHCP(procedures); return null; }
public void removeProcedure(ProceduresPerformedByHCPVo procedure) throws ForeignKeyViolationException { DomainFactory factory=getDomainFactory(); if (procedure!=null) factory.delete(ProceduresPerformedByHCPVoAssembler.extractProceduresPerformedByHCP(factory, procedure)); }