@Test(expected = RedirectorNoConnectionToDataSourceException.class) public void testGetByIdExceptionHappens() throws Exception { setupExceptionOnGetOne(new RedirectorNoConnectionToDataSourceException(new Exception())); testee.getById(ANY_SERVICE, ANY_ID); }
@Override public T getById(String serviceName, String id) { try { return getByPath(pathHelper.getPathByService(serviceName, id), getCache(serviceName)); } catch (DataSourceConnectorException e) { throw new RedirectorDataSourceException(e); } }
ListServiceDAO extends BaseListDAO<T> implements IListServiceDAO<T> { @Override public T getById(String serviceName, String id) { try { return getByPath(pathHelper.getPathByService(serviceName, id), getCache(serviceName)); } catch (DataSourceConnectorException e) { throw new RedirectorDataSourceException(e); } } }
ListServiceDAO extends BaseListDAO<T> implements IListServiceDAO<T> { @Override public T getById(String serviceName, String id) { try { return getByPath(pathHelper.getPathByService(serviceName, id), getCache(serviceName)); } catch (DataSourceConnectorException e) { throw new RedirectorDataSourceException(e); } } ListServiceDAO(Class<T> clazz,
                          Serializer marshalling,
                          IDataSourceConnector connector,
                          IPathHelper pathHelper,
                          boolean isCompressed,
                          boolean useCache); }
ListServiceDAO extends BaseListDAO<T> implements IListServiceDAO<T> { @Override public T getById(String serviceName, String id) { try { return getByPath(pathHelper.getPathByService(serviceName, id), getCache(serviceName)); } catch (DataSourceConnectorException e) { throw new RedirectorDataSourceException(e); } } ListServiceDAO(Class<T> clazz,
                          Serializer marshalling,
                          IDataSourceConnector connector,
                          IPathHelper pathHelper,
                          boolean isCompressed,
                          boolean useCache); @Override List<T> getAll(String serviceName); @Override Map<String, T> getAllInMap(String serviceName); @Override T getById(String serviceName, String id); @Override void saveById(T data, String serviceName, String id); @Override void deleteById(String serviceName, String id); @Override void addCacheListener(String serviceName, ICacheListener listener); }
ListServiceDAO extends BaseListDAO<T> implements IListServiceDAO<T> { @Override public T getById(String serviceName, String id) { try { return getByPath(pathHelper.getPathByService(serviceName, id), getCache(serviceName)); } catch (DataSourceConnectorException e) { throw new RedirectorDataSourceException(e); } } ListServiceDAO(Class<T> clazz,
                          Serializer marshalling,
                          IDataSourceConnector connector,
                          IPathHelper pathHelper,
                          boolean isCompressed,
                          boolean useCache); @Override List<T> getAll(String serviceName); @Override Map<String, T> getAllInMap(String serviceName); @Override T getById(String serviceName, String id); @Override void saveById(T data, String serviceName, String id); @Override void deleteById(String serviceName, String id); @Override void addCacheListener(String serviceName, ICacheListener listener);  }