public SurgicalOperationNotesVo getSurgicalOperation(CareContextRefVo careContextRefVo) { if(careContextRefVo == null) throw new CodingRuntimeException("careContextRefVo Filter not provided for list call. "); if(careContextRefVo != null) { DomainFactory factory = getDomainFactory(); List list = factory.find("from SurgicalOperationNotes as s1_1 where (s1_1.careContext.id = :careContextId)" , new String[] {"careContextId"}, new Object[] {careContextRefVo.getID_CareContext()}); if(list != null && list.size() > 0) { SurgicalOperationNotesVoCollection voColl = SurgicalOperationNotesVoAssembler.createSurgicalOperationNotesVoCollectionFromSurgicalOperationNotes(list); if(voColl != null && voColl.size() > 0) return voColl.get(0); } } return null; }