public ims.clinical.vo.RACPPlanAdviceVo getPlanAdviceForClinicalContact(CareContextRefVo refVoCareContext) { if (refVoCareContext == null) throw new CodingRuntimeException("Cannot get RACPPlanAdviceRefVo for null ClinicalContactRefVo"); DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer(" from RACPPlanAdvice rpa where "); ArrayList markers = new ArrayList(); ArrayList values = new ArrayList(); hql.append(" rpa.careContext.id = :ccId"); markers.add("ccId"); values.add(refVoCareContext.getID_CareContext()); List listRACPPlanAdvice = factory.find(hql.toString(), markers,values); if(listRACPPlanAdvice != null && listRACPPlanAdvice.size() > 0) { RACPPlanAdviceVoCollection voColl = RACPPlanAdviceVoAssembler.createRACPPlanAdviceVoCollectionFromRACPPlanAdvice(listRACPPlanAdvice); if(voColl != null && voColl.size() > 0) return voColl.get(0); } return null; }