/** * list By ClinicalContact */ public GaitShortVoCollection listByCareContext(CareContextLiteVo voCareContext) { DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer(); String query = "from Gait ga "; ArrayList markers= new ArrayList(); ArrayList values = new ArrayList(); String andStr = " "; if(voCareContext.getEpisodeOfCareIsNotNull()) { hql.append(andStr + " ga.clinicalContact.careContext.id = :cc"); markers.add("cc"); values.add(voCareContext.getID_CareContext()); andStr = " and "; } if (markers.size() > 0) query += " where "; query += hql.toString(); java.util.List gaitList = factory.find(query,markers,values); GaitShortVoCollection voGaitParColl = GaitShortVoAssembler.createGaitShortVoCollectionFromGait(gaitList); if(voGaitParColl.size()>0) return voGaitParColl; else return null; }