@Test public void testCreate() throws DuplicateResourceException { UUID id = UUID.randomUUID(); final DBSavedImage newImage = createAndVerify(id, "my Image"); final Collection<DBSavedImage> list = savedImageRepository.list(); Assert.assertEquals("Must be exactly one template", 1, list.size()); final DBSavedImage fromList = list.iterator().next(); Assert.assertNotNull(fromList); assertEquals(newImage, fromList); }
@Override public Collection<DBSavedImage> list() { return nqs.getList(SQL_SELECT, this::convertRow); }
SavedImageRepositoryImpl extends AbstractHubRepositoryImpl implements SavedImageRepository, ServiceLifecycle { @Override public Collection<DBSavedImage> list() { return nqs.getList(SQL_SELECT, this::convertRow); } }
SavedImageRepositoryImpl extends AbstractHubRepositoryImpl implements SavedImageRepository, ServiceLifecycle { @Override public Collection<DBSavedImage> list() { return nqs.getList(SQL_SELECT, this::convertRow); } SavedImageRepositoryImpl();   SavedImageRepositoryImpl(DataSource dataSource); }
SavedImageRepositoryImpl extends AbstractHubRepositoryImpl implements SavedImageRepository, ServiceLifecycle { @Override public Collection<DBSavedImage> list() { return nqs.getList(SQL_SELECT, this::convertRow); } SavedImageRepositoryImpl();   SavedImageRepositoryImpl(DataSource dataSource); @Override void init(Context context); @Override void pause(); @Override void resume(); @Override void shutDown(); @Override DBSavedImage get(UUID savedImageId); @Override Collection<DBSavedImage> findByAppTemplateId(UUID appTemplateId); @Override void add(DBSavedImage savedImage); @Override Collection<DBSavedImage> list(); @Override void updateImageState(UUID savedImageId, DBSavedImage.DBSavedImageState state); }
SavedImageRepositoryImpl extends AbstractHubRepositoryImpl implements SavedImageRepository, ServiceLifecycle { @Override public Collection<DBSavedImage> list() { return nqs.getList(SQL_SELECT, this::convertRow); } SavedImageRepositoryImpl();   SavedImageRepositoryImpl(DataSource dataSource); @Override void init(Context context); @Override void pause(); @Override void resume(); @Override void shutDown(); @Override DBSavedImage get(UUID savedImageId); @Override Collection<DBSavedImage> findByAppTemplateId(UUID appTemplateId); @Override void add(DBSavedImage savedImage); @Override Collection<DBSavedImage> list(); @Override void updateImageState(UUID savedImageId, DBSavedImage.DBSavedImageState state);  }