@Test public void testGetById() throws Exception { String id = "id"; String resultSerialized = "testModel"; setupCacheReturnOne(resultSerialized); setupDeserialize(resultSerialized, new TestModel(id)); TestModel result = testee.getById(id); Assert.assertEquals(id, result.getId()); }
@Override public T getById(String id) { try { return getByPath(pathHelper.getPath(id), getCache()); } catch (DataSourceConnectorException e) { throw new RedirectorDataSourceException(e); } }
ListDAO extends BaseListDAO<T> implements IListDAO<T> { @Override public T getById(String id) { try { return getByPath(pathHelper.getPath(id), getCache()); } catch (DataSourceConnectorException e) { throw new RedirectorDataSourceException(e); } } }
ListDAO extends BaseListDAO<T> implements IListDAO<T> { @Override public T getById(String id) { try { return getByPath(pathHelper.getPath(id), getCache()); } catch (DataSourceConnectorException e) { throw new RedirectorDataSourceException(e); } } ListDAO(Class<T> clazz,
                   Serializer marshalling,
                   IDataSourceConnector connector,
                   IPathHelper pathHelper,
                   boolean isCompressed,
                   boolean useCache); }
ListDAO extends BaseListDAO<T> implements IListDAO<T> { @Override public T getById(String id) { try { return getByPath(pathHelper.getPath(id), getCache()); } catch (DataSourceConnectorException e) { throw new RedirectorDataSourceException(e); } } ListDAO(Class<T> clazz,
                   Serializer marshalling,
                   IDataSourceConnector connector,
                   IPathHelper pathHelper,
                   boolean isCompressed,
                   boolean useCache); @Override List<T> getAll(); @Override List<String> getAllIDs(); @Override T getById(String id); @Override void saveById(T data, String id); @Override void deleteById(String id); @Override void addCacheListener(ICacheListener listener); }
ListDAO extends BaseListDAO<T> implements IListDAO<T> { @Override public T getById(String id) { try { return getByPath(pathHelper.getPath(id), getCache()); } catch (DataSourceConnectorException e) { throw new RedirectorDataSourceException(e); } } ListDAO(Class<T> clazz,
                   Serializer marshalling,
                   IDataSourceConnector connector,
                   IPathHelper pathHelper,
                   boolean isCompressed,
                   boolean useCache); @Override List<T> getAll(); @Override List<String> getAllIDs(); @Override T getById(String id); @Override void saveById(T data, String id); @Override void deleteById(String id); @Override void addCacheListener(ICacheListener listener);  }