public AreaOfNeedsNotingVoCollection listbyCareContext(CareContextRefVo voCareContextRef) { DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer(); String query = "from AreaofNeedsNoting aon "; ArrayList markers= new ArrayList(); ArrayList values = new ArrayList(); String andStr = " "; if(voCareContextRef != null) { hql.append(andStr + " aon.clinicalContact.careContext.id = :cc"); markers.add("cc"); values.add(voCareContextRef.getID_CareContext()); } if (markers.size() > 0) query += " where "; query += hql.toString(); java.util.List cttList = factory.find(query,markers,values); AreaOfNeedsNotingVoCollection voAreaOfNeedsNotingColl = AreaOfNeedsNotingVoAssembler.createAreaOfNeedsNotingVoCollectionFromAreaofNeedsNoting(cttList); //if(voAreaOfNeedsNotingColl.size()>0) return voAreaOfNeedsNotingColl; //else //return null; }
private void populateParentNodes(AreaOfNeedsNotingVoCollection voAreaOfNeedsColl) { if(voAreaOfNeedsColl == null) return; for(int i=0; i<voAreaOfNeedsColl.size(); i++) { populateParentNode(voAreaOfNeedsColl.get(i)); } }
public AreaOfNeedsNotingVoCollection list(ClinicalContactShortVo voClinicalContact) { DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer(); String query = "from AreaofNeedsNoting aon "; ArrayList markers= new ArrayList(); ArrayList values = new ArrayList(); String andStr = " "; if(voClinicalContact != null) { hql.append(andStr + " aon.clinicalContact.id = :cc"); markers.add("cc"); values.add(voClinicalContact.getID_ClinicalContact()); andStr = " and "; } if (markers.size() > 0) query += " where "; query += hql.toString(); java.util.List cttList = factory.find(query,markers,values); AreaOfNeedsNotingVoCollection voAreaOfNeedsNotingColl = AreaOfNeedsNotingVoAssembler.createAreaOfNeedsNotingVoCollectionFromAreaofNeedsNoting(cttList); //if(voAreaOfNeedsNotingColl.size()>0) return voAreaOfNeedsNotingColl; //else //return null; }