public SOAPVo getSOAPsVo(ClinicalNotesRefVo clinnoteRefVo) { if(clinnoteRefVo != null) { DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer(" from SoapNote soapnote where "); String andStr = " "; ArrayList<String> markers = new ArrayList<String>(); ArrayList<Serializable> values = new ArrayList<Serializable>(); hql.append(andStr + " soapnote.clinicalNote.id = :clinicNoteId"); markers.add("clinicNoteId"); values.add(clinnoteRefVo.getID_ClinicalNotes()); andStr = " and "; List listSoap = factory.find(hql.toString(), markers,values); if(listSoap != null && listSoap.size() > 0) { SOAPVoCollection voColl = SOAPVoAssembler.createSOAPVoCollectionFromSoapNote(listSoap); if(voColl != null && voColl.size() > 0) return voColl.get(0); } } return null; }