public CancerImagingEventLiteVoCollection listHotlistImagingEventsLite(String name, Specialty specialty) throws DomainInterfaceException { if(name == null) throw new DomainRuntimeException("Invalid Search criteria. Cancer Imagaing Event name filter must be supplied."); if(specialty == null) throw new DomainRuntimeException("Invalid Search criteria. Specialty must be supplied."); DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer("select distinct cieItem from CancerImagingHotlist as cie left join cie.hotListItem as cieItem left join cieItem.cancerImagingEvent as cieEvent left join cieEvent.keywords as kw "); ArrayList names = new ArrayList(); ArrayList values = new ArrayList(); hql.append(" where cieEvent.isActive = :isActive"); names.add("isActive"); values.add(Boolean.TRUE); hql.append(" and cie.specialty = :spec"); names.add("spec"); values.add(getDomLookup(specialty)); List hits = Keywords.searchByKeywords(factory, name, hql.toString(), names, values); List ret = new ArrayList(); for (int i = 0; i < hits.size(); i++) { ret.add(((CancerImagingHotlistItem)hits.get(i)).getCancerImagingEvent()); } return CancerImagingEventLiteVoAssembler.createCancerImagingEventLiteVoCollectionFromCancerImagingEvent(ret); }
public CancerImagingEventLiteVoCollection listImagingEventsLite(String name) throws DomainInterfaceException { DomainFactory factory = getDomainFactory(); StringBuffer hql = new StringBuffer(" from CancerImagingEvent cie join cie.keywords as kw "); ArrayList names = new ArrayList(); ArrayList values = new ArrayList(); hql.append(" where cie.isActive = :isActive"); names.add("isActive"); values.add(Boolean.TRUE); return CancerImagingEventLiteVoAssembler.createCancerImagingEventLiteVoCollectionFromCancerImagingEvent(Keywords.searchByKeywords(factory, name, hql.toString(), names, values)); }