/** * getClinicalNotesAdditional */ public ims.core.vo.ClinicalNotesAdditionalVo getClinicalNotesAdditional(Integer clinicalNotesId) { if(clinicalNotesId != null) { DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer(" from ClinicalNotesAdditional noteadd where "); String andStr = " "; ArrayList<String> markers = new ArrayList<String>(); ArrayList<Serializable> values = new ArrayList<Serializable>(); hql.append(andStr + " noteadd.clinialNotes.id = :clinicNoteId"); markers.add("clinicNoteId"); values.add(clinicalNotesId); andStr = " and "; List listAdditional = factory.find(hql.toString(), markers,values); if(listAdditional != null && listAdditional.size() > 0) { ClinicalNotesAdditionalVoCollection voColl = ClinicalNotesAdditionalVoAssembler.createClinicalNotesAdditionalVoCollectionFromClinicalNotesAdditional(listAdditional); if(voColl != null && voColl.size() > 0) return voColl.get(0); } } return null; }
public ClinicalNotesAdditionalVo getClinicalNotesAdditional(Integer clinicalNotesId) { if (clinicalNotesId == null) throw new RuntimeException("Cannot get ClinicalNotesAdditionalVo for null clinicalNotesId"); DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer(" from ClinicalNotesAdditional noteadd where "); String andStr = " "; ArrayList markers = new ArrayList(); ArrayList values = new ArrayList(); hql.append(andStr + " noteadd.clinialNotes.id = :clinicNoteId"); markers.add("clinicNoteId"); values.add(clinicalNotesId); andStr = " and "; List listAdditional = factory.find(hql.toString(), markers,values); if(listAdditional != null && listAdditional.size() > 0) { ClinicalNotesAdditionalVoCollection voColl = ClinicalNotesAdditionalVoAssembler.createClinicalNotesAdditionalVoCollectionFromClinicalNotesAdditional(listAdditional); if(voColl != null && voColl.size() > 0) return voColl.get(0); } return null; }