public ServiceQuestionShortVoCollection listServiceQuestionsByServiceIds(Integer[] serviceIds) { if(serviceIds == null || serviceIds.length == 0) return null; StringBuffer hqlStart = new StringBuffer(); String hql; hqlStart.append("select distinct serQuest from ServiceQuestion serQuest where serQuest.service.id in ( "); for (int i = 0; i < serviceIds.length; i++) hqlStart.append(serviceIds[i].toString() + ","); if (hqlStart.toString().endsWith(",")) hql = hqlStart.toString().substring(0, hqlStart.length() - 1); else hql = hqlStart.toString(); hql += " ) order by systemInformation.creationDateTime"; List list = getDomainFactory().find(hql); return ServiceQuestionShortVoAssembler.createServiceQuestionShortVoCollectionFromServiceQuestion(list); }
public ServiceQuestionShortVoCollection listInformationMessagesForService(Integer serviceId) { if(serviceId == null) throw new CodingRuntimeException("serviceId is null in method listInformationMessagesForService"); String hql = "select distinct serQuest from ServiceQuestion serQuest where serQuest.service.id = :idService and serQuest.questionInformation.isQuestion = :isQuestion"; List list = getDomainFactory().find(hql, new String[]{"idService","isQuestion"}, new Object[]{ serviceId, Boolean.FALSE}); if(list != null && list.size() > 0) return ServiceQuestionShortVoAssembler.createServiceQuestionShortVoCollectionFromServiceQuestion(list); return null; }
/** * listServiceQuestions */ public ims.ocrr.vo.ServiceQuestionShortVoCollection listServiceQuestions(ims.core.clinical.vo.ServiceRefVo service) { if(service == null) throw new CodingRuntimeException("service parameter is null - listServiceQuestions"); List list = getDomainFactory().find("from ServiceQuestion ser where ser.service.id = :idService order by systemInformation.creationDateTime", new String[]{"idService"}, new Object[]{service.getID_Service()}); return ServiceQuestionShortVoAssembler.createServiceQuestionShortVoCollectionFromServiceQuestion(list); }