private void getSearchCriteria() { ClinicalTeamSearchCriteriaVo voClinicalTeamSearchCriteria = new ClinicalTeamSearchCriteriaVo(); voClinicalTeamSearchCriteria.setTeamName(form.txtSearchTeamName().getValue()); voClinicalTeamSearchCriteria.setTeamType(form.cmbSearchTeamType().getValue()); Boolean boolActive = form.chkSearchActiveTeams() == null || form.chkSearchActiveTeams().getValue() == false ? null : new Boolean(form.chkSearchActiveTeams().getValue()); voClinicalTeamSearchCriteria.setActive(boolActive); form.getLocalContext().setTeamSearchCriteria(voClinicalTeamSearchCriteria); }
private void clearSearchCriteria() { ClinicalTeamSearchCriteriaVo voSearchCriteria = new ClinicalTeamSearchCriteriaVo(); voSearchCriteria.setActive(new Boolean(true)); form.getLocalContext().setTeamSearchCriteria(voSearchCriteria); }
public ClinicalTeamVoCollection listClinicalTeams(ClinicalTeamSearchCriteriaVo voFilter) { DomainFactory factory = getDomainFactory(); ArrayList markers = new ArrayList(); ArrayList values = new ArrayList(); StringBuffer condStr = new StringBuffer(); String andStr = " "; String sHQL = " from ClinicalTeam c "; if (voFilter.getActive() != null) { condStr.append(andStr + " c.isActive = :Active"); markers.add("Active"); values.add(voFilter.getActive()); andStr = " and "; } if (voFilter.getTeamName() != null) { condStr.append(andStr + " c.teamName = :TeamName"); markers.add("TeamName"); values.add(voFilter.getTeamName()); andStr = " and "; } if (voFilter.getTeamType() != null) { condStr.append(andStr + " c.teamType = :TeamType"); markers.add("TeamType"); values.add(getDomLookup(voFilter.getTeamType())); andStr = " and "; } if (andStr.equals(" and ")) sHQL += " where "; sHQL += condStr.toString(); List lstClinicalTeams = factory.find(sHQL, markers, values); return ClinicalTeamVoAssembler.createClinicalTeamVoCollectionFromClinicalTeam(lstClinicalTeams); }