public DischargeSupplementaryNotesVo getSupplementary(CareContextRefVo voCareContextRefVo) { if(voCareContextRefVo == null) throw new CodingRuntimeException("voCareContextRefVo Filter not provided for list call. "); if(voCareContextRefVo != null) { DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer(" from DischargeSupplementaryNotes ds where "); String andStr = " "; ArrayList<String> markers = new ArrayList<String>(); ArrayList<Serializable> values = new ArrayList<Serializable>(); hql.append(andStr + " ds.careContext.id = :careContextId"); markers.add("careContextId"); values.add(voCareContextRefVo.getID_CareContext()); andStr = " and "; List list = factory.find(hql.toString(), markers,values); if(list != null && list.size() > 0) { DischargeSupplementaryNotesVoCollection voColl = DischargeSupplementaryNotesVoAssembler.createDischargeSupplementaryNotesVoCollectionFromDischargeSupplementaryNotes(list); if(voColl != null && voColl.size() > 0) return voColl.get(0); } } return null; }