@Test @Rollback(false) public void retrieveServicesSharedCIS() throws Exception{ List<Service> returnedList=serReg.retrieveServicesSharedByCIS("CISid"); }
@Override public List<Service> retrieveServicesSharedByCIS(String CISID) throws ServiceRetrieveException { List<Service> returnedServiceList = new ArrayList<Service>(); Session session = null; try { session = sessionFactory.openSession(); ServiceSharedInCISDAO filterServiceSharedCISDAO = new ServiceSharedInCISDAO(); filterServiceSharedCISDAO.setCISId(CISID); List<ServiceSharedInCISDAO> serviceSharedInCISDAOList = session .createCriteria(ServiceSharedInCISDAO.class) .add(Example.create(filterServiceSharedCISDAO)).list(); for (ServiceSharedInCISDAO serviceSharedInCISDAO : serviceSharedInCISDAOList) { returnedServiceList.add(((RegistryEntry) session.get( RegistryEntry.class, serviceSharedInCISDAO.getServiceResourceIdentifier())) .createServiceFromRegistryEntry()); } } catch (Exception e) { throw new ServiceRetrieveException(e); } finally { if (session != null) { session.close(); } } return returnedServiceList; }
ServiceRegistry implements IServiceRegistry { @Override public List<Service> retrieveServicesSharedByCIS(String CISID) throws ServiceRetrieveException { List<Service> returnedServiceList = new ArrayList<Service>(); Session session = null; try { session = sessionFactory.openSession(); ServiceSharedInCISDAO filterServiceSharedCISDAO = new ServiceSharedInCISDAO(); filterServiceSharedCISDAO.setCISId(CISID); List<ServiceSharedInCISDAO> serviceSharedInCISDAOList = session .createCriteria(ServiceSharedInCISDAO.class) .add(Example.create(filterServiceSharedCISDAO)).list(); for (ServiceSharedInCISDAO serviceSharedInCISDAO : serviceSharedInCISDAOList) { returnedServiceList.add(((RegistryEntry) session.get( RegistryEntry.class, serviceSharedInCISDAO.getServiceResourceIdentifier())) .createServiceFromRegistryEntry()); } } catch (Exception e) { throw new ServiceRetrieveException(e); } finally { if (session != null) { session.close(); } } return returnedServiceList; } }
ServiceRegistry implements IServiceRegistry { @Override public List<Service> retrieveServicesSharedByCIS(String CISID) throws ServiceRetrieveException { List<Service> returnedServiceList = new ArrayList<Service>(); Session session = null; try { session = sessionFactory.openSession(); ServiceSharedInCISDAO filterServiceSharedCISDAO = new ServiceSharedInCISDAO(); filterServiceSharedCISDAO.setCISId(CISID); List<ServiceSharedInCISDAO> serviceSharedInCISDAOList = session .createCriteria(ServiceSharedInCISDAO.class) .add(Example.create(filterServiceSharedCISDAO)).list(); for (ServiceSharedInCISDAO serviceSharedInCISDAO : serviceSharedInCISDAOList) { returnedServiceList.add(((RegistryEntry) session.get( RegistryEntry.class, serviceSharedInCISDAO.getServiceResourceIdentifier())) .createServiceFromRegistryEntry()); } } catch (Exception e) { throw new ServiceRetrieveException(e); } finally { if (session != null) { session.close(); } } return returnedServiceList; } ServiceRegistry(); }
ServiceRegistry implements IServiceRegistry { @Override public List<Service> retrieveServicesSharedByCIS(String CISID) throws ServiceRetrieveException { List<Service> returnedServiceList = new ArrayList<Service>(); Session session = null; try { session = sessionFactory.openSession(); ServiceSharedInCISDAO filterServiceSharedCISDAO = new ServiceSharedInCISDAO(); filterServiceSharedCISDAO.setCISId(CISID); List<ServiceSharedInCISDAO> serviceSharedInCISDAOList = session .createCriteria(ServiceSharedInCISDAO.class) .add(Example.create(filterServiceSharedCISDAO)).list(); for (ServiceSharedInCISDAO serviceSharedInCISDAO : serviceSharedInCISDAOList) { returnedServiceList.add(((RegistryEntry) session.get( RegistryEntry.class, serviceSharedInCISDAO.getServiceResourceIdentifier())) .createServiceFromRegistryEntry()); } } catch (Exception e) { throw new ServiceRetrieveException(e); } finally { if (session != null) { session.close(); } } return returnedServiceList; } ServiceRegistry(); @Override void registerServiceList(List<Service> servicesList); @Override void unregisterServiceList(List<Service> servicesList); @Override List<Service> retrieveServicesInCSSNode(String CSSID); @Override List<Service> retrieveServicesInCSS(String CSSID); @Override List<Service> retrieveServicesSharedByCIS(String CISID); @Override List<Service> findServices(Service filter); @Override List<Service> findServices(Service filter, String cisId); @Override void notifyServiceIsSharedInCIS(
			ServiceResourceIdentifier serviceIdentifier, String CISID); @Override void removeServiceSharingInCIS(
			ServiceResourceIdentifier serviceIdentifier, String CISID); @Override Service retrieveService(ServiceResourceIdentifier serviceIdentifier); @Override boolean changeStatusOfService(
			ServiceResourceIdentifier serviceIdentifier,
			ServiceStatus serviceStatus); SessionFactory getSessionFactory(); void setSessionFactory(SessionFactory sessionFactory); @Override boolean deleteServiceCSS(String CSSId); @Override boolean clearServiceSharedCIS(String CISId); @Override boolean updateRegisteredService(Service service); @Override List<String> retrieveCISSharedService(ServiceResourceIdentifier serviceIdentifier); }
ServiceRegistry implements IServiceRegistry { @Override public List<Service> retrieveServicesSharedByCIS(String CISID) throws ServiceRetrieveException { List<Service> returnedServiceList = new ArrayList<Service>(); Session session = null; try { session = sessionFactory.openSession(); ServiceSharedInCISDAO filterServiceSharedCISDAO = new ServiceSharedInCISDAO(); filterServiceSharedCISDAO.setCISId(CISID); List<ServiceSharedInCISDAO> serviceSharedInCISDAOList = session .createCriteria(ServiceSharedInCISDAO.class) .add(Example.create(filterServiceSharedCISDAO)).list(); for (ServiceSharedInCISDAO serviceSharedInCISDAO : serviceSharedInCISDAOList) { returnedServiceList.add(((RegistryEntry) session.get( RegistryEntry.class, serviceSharedInCISDAO.getServiceResourceIdentifier())) .createServiceFromRegistryEntry()); } } catch (Exception e) { throw new ServiceRetrieveException(e); } finally { if (session != null) { session.close(); } } return returnedServiceList; } ServiceRegistry(); @Override void registerServiceList(List<Service> servicesList); @Override void unregisterServiceList(List<Service> servicesList); @Override List<Service> retrieveServicesInCSSNode(String CSSID); @Override List<Service> retrieveServicesInCSS(String CSSID); @Override List<Service> retrieveServicesSharedByCIS(String CISID); @Override List<Service> findServices(Service filter); @Override List<Service> findServices(Service filter, String cisId); @Override void notifyServiceIsSharedInCIS(
			ServiceResourceIdentifier serviceIdentifier, String CISID); @Override void removeServiceSharingInCIS(
			ServiceResourceIdentifier serviceIdentifier, String CISID); @Override Service retrieveService(ServiceResourceIdentifier serviceIdentifier); @Override boolean changeStatusOfService(
			ServiceResourceIdentifier serviceIdentifier,
			ServiceStatus serviceStatus); SessionFactory getSessionFactory(); void setSessionFactory(SessionFactory sessionFactory); @Override boolean deleteServiceCSS(String CSSId); @Override boolean clearServiceSharedCIS(String CISId); @Override boolean updateRegisteredService(Service service); @Override List<String> retrieveCISSharedService(ServiceResourceIdentifier serviceIdentifier);  }