/** * @param node */ private void addProviderSystem(TreeNode node) { Object value = node.getValue(); if (value instanceof LocationServiceVo) { LocSvcProviderSysVoCollection voLocSvcProviderSys = null; if (node.getNodes().size() > 0) { node.getNodes().clear(); // get list of locserviceproviders for this locationservice voLocSvcProviderSys = domain.listLocationServiceProvider(((LocationServiceVo) value).getID_LocationService()); if (voLocSvcProviderSys != null) { for (int i = 0; i < voLocSvcProviderSys.size(); i++) { TreeNode providerNode = node.getNodes().add(voLocSvcProviderSys, getProviderSystemName(voLocSvcProviderSys.get(i))); providerNode.setExpandedImage(form.getImages().OCRR.Provider); providerNode.setCollapsedImage(form.getImages().OCRR.Provider); } } } } }
private ProviderSystemVoCollection returnProviderSystem(LocSvcProviderSysVoCollection voLocSvcProviderSys) { if(voLocSvcProviderSys == null || voLocSvcProviderSys.size()== 0) return null; else { ProviderSystemVoCollection temcoll = new ProviderSystemVoCollection(); for(int i = 0; i<voLocSvcProviderSys.size();i++ ) { temcoll.add(voLocSvcProviderSys.get(i).getProviderSystem()); } if(temcoll.size() > 0) return temcoll; else return null; } }
private Boolean CheckifProviderExists(ims.ocrr.vo.LocSvcProviderSysVo voLoSvcProviderSys) { LocSvcProviderSysVoCollection voLocSvcProviderSystem = null; voLocSvcProviderSystem = listLocationServiceProvider(voLoSvcProviderSys.getLocationService().getID_LocationService()); if (voLocSvcProviderSystem.size() < 1) return true; for(int i = 0;i < voLocSvcProviderSystem.size();i++) { if(voLocSvcProviderSystem.get(i).getProviderSystem().equals(voLoSvcProviderSys.getProviderSystem())) { return true; } } return false; }
private void populateServiceProviders(TreeNode node, LocationServiceVo voLocService) { String out = ""; TreeNode childNode = null; if ((node != null) && (voLocService != null) && (voLocService.getID_LocationServiceIsNotNull())) { node.getNodes().clear(); LocSvcProviderSysVoCollection voLocSvcProviderSys = null; // get list of locserviceproviders for this location voLocSvcProviderSys = domain.listLocationServiceProvider(voLocService.getID_LocationService()); form.getGlobalContext().OCRR.setProviderSystemColl(returnProviderSystem(voLocSvcProviderSys)); out += formatServiceHeaderVo(voLocService); if ((voLocSvcProviderSys != null) && (voLocSvcProviderSys.size() > 0)) { for (int i = 0; i < voLocSvcProviderSys.size(); i++) { // html output out += formatProviderVo(voLocSvcProviderSys.get(i).getProviderSystem()); out += makeNewLine(new Integer(1)); // add node childNode = node.getNodes().add(voLocSvcProviderSys.get(i), voLocSvcProviderSys.get(i).getProviderSystemIsNotNull() ? voLocSvcProviderSys.get(i).getProviderSystem().getSystemNameIsNotNull() ? voLocSvcProviderSys.get(i).getProviderSystem().getSystemName() : "" : ""); childNode.setCollapsedImage(form.getImages().OCRR.Provider); childNode.setExpandedImage(form.getImages().OCRR.Provider); } node.setExpanded(true); } else out += makeTextile("<CENTER>*No provider system*</CENTER>", "SlateBlue", "tahoma", "14"); } form.htmProviderView().setHTML(new TextileString(out).toString()); }
public ims.ocrr.vo.LocSvcProviderSysVoCollection listLocationServiceProvider(Integer locationServiceId) { if(locationServiceId == null) return null; DomainFactory factory = getDomainFactory(); String hql = new String(" from LocSvcProviderSys lsp where lsp.locationService.id = :locId"); List list = factory.find(hql, "locId", locationServiceId); return LocSvcProviderSysVoAssembler.createLocSvcProviderSysVoCollectionFromLocSvcProviderSys(list).sort(); }
public ims.ocrr.vo.LocSvcProviderSysVoCollection listProviderSystemById(ProviderSystemRefVo voRef) { if(voRef == null) return null; DomainFactory factory = getDomainFactory(); String hql = new String(" from LocSvcProviderSys as l1_1 where l1_1.providerSystem.id = :id"); List list = factory.find(hql, "id", voRef.getID_ProviderSystem()); if (list.size() != 0) return LocSvcProviderSysVoAssembler.createLocSvcProviderSysVoCollectionFromLocSvcProviderSys(list).sort(); else return null; }
private void cmbProviderValueChanged() { if (form.lyrInvestigations().tabGeneralDet().cmbProvider().getValue() == null) return; LocSvcProviderSysVoCollection coll = domain.listProviderSystem(form.lyrInvestigations().tabGeneralDet().cmbProvider().getValue()); for (int i = 0; i < coll.size(); i++) { if (coll.get(i).getLocationServiceIsNotNull() && coll.get(i).getLocationService().getServiceIsNotNull()) form.lyrInvestigations().tabGeneralDet().cmbProviderService().newRow(coll.get(i), coll.get(i).getLocationService().getService().getServiceName()); } }
public LocSvcProviderSysVoCollection listProviderSystem(LocationRefVo voLocation) { DomainFactory factory = getDomainFactory(); if (voLocation == null) throw new DomainRuntimeException("Location parameter cannot be null"); java.util.List lsps = factory.find("from LocSvcProviderSys lsps where lsps.locationService.location.id = :locationId", new String[]{"locationId"}, new Object[]{voLocation.getID_Location()}); if (lsps != null) return LocSvcProviderSysVoAssembler.createLocSvcProviderSysVoCollectionFromLocSvcProviderSys(lsps); return null; }