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; }
/** * save LocationServiceProvider * @throws StaleObjectException */ public ims.ocrr.vo.LocSvcProviderSysVo saveLocationServiceProvider(ims.ocrr.vo.LocSvcProviderSysVo voLoSvcProviderSys) throws ims.domain.exceptions.StaleObjectException, ims.domain.exceptions.UniqueKeyViolationException { if(voLoSvcProviderSys == null) throw new RuntimeException("Cannot save null value for LocSvcProviderSysVo"); if(voLoSvcProviderSys.getProviderSystem() == null) throw new RuntimeException("Cannot save null value for ProviderSystemVo"); if(voLoSvcProviderSys.isValidated() == false) throw new CodingRuntimeException("LocSvcProviderSysVo should be validated"); //wdev-11759 -- //per service must be only one provider if(voLoSvcProviderSys.getID_LocSvcProviderSys() == null) { if(CheckifProviderExists(voLoSvcProviderSys) == false) { throw new StaleObjectException(null); } } //---- DomainFactory factory = getDomainFactory(); //Save Location Provider System LocSvcProviderSys doLocSvcProviderSys = LocSvcProviderSysVoAssembler.extractLocSvcProviderSys(factory, voLoSvcProviderSys); factory.save(doLocSvcProviderSys); return LocSvcProviderSysVoAssembler.create(doLocSvcProviderSys); }
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; }