@Test public void testRead() throws Exception { WebResourceMetaInfo sourceDocumentReferenceMetaInfoFromRead = webResourceMetaInfoDao.read(""); assertNull(sourceDocumentReferenceMetaInfoFromRead); final WebResourceMetaInfo sourceDocumentReferenceMetaInfo = new WebResourceMetaInfo("a", new ImageMetaInfo(10, 10, "", "", "", null, null, null), null, null, null); webResourceMetaInfoDao.createOrModify(Lists.newArrayList(sourceDocumentReferenceMetaInfo), WriteConcern.ACKNOWLEDGED); sourceDocumentReferenceMetaInfoFromRead = webResourceMetaInfoDao.read(sourceDocumentReferenceMetaInfo.getId()); assertEquals(sourceDocumentReferenceMetaInfo.getImageMetaInfo().getHeight(), sourceDocumentReferenceMetaInfoFromRead.getImageMetaInfo().getHeight()); webResourceMetaInfoDao.delete(sourceDocumentReferenceMetaInfo.getId()); }
@Override public WebResourceMetaInfo read(String id) { return datastore.get(WebResourceMetaInfo.class, id); }
WebResourceMetaInfoDaoImpl implements WebResourceMetaInfoDao { @Override public WebResourceMetaInfo read(String id) { return datastore.get(WebResourceMetaInfo.class, id); } }
WebResourceMetaInfoDaoImpl implements WebResourceMetaInfoDao { @Override public WebResourceMetaInfo read(String id) { return datastore.get(WebResourceMetaInfo.class, id); } WebResourceMetaInfoDaoImpl(DB mongoDB,Morphia morphia,Datastore datastore); }
WebResourceMetaInfoDaoImpl implements WebResourceMetaInfoDao { @Override public WebResourceMetaInfo read(String id) { return datastore.get(WebResourceMetaInfo.class, id); } WebResourceMetaInfoDaoImpl(DB mongoDB,Morphia morphia,Datastore datastore); @Override boolean create(WebResourceMetaInfo webResourceMetaInfo, WriteConcern writeConcern); @Override int createOrModify(Collection<WebResourceMetaInfo> webResourceMetaInfos, WriteConcern writeConcern); @Override WebResourceMetaInfo read(String id); @Override List<WebResourceMetaInfo> read(List<String> ids); @Override boolean update(WebResourceMetaInfo webResourceMetaInfo, WriteConcern writeConcern); @Override WriteResult delete(String id); }
WebResourceMetaInfoDaoImpl implements WebResourceMetaInfoDao { @Override public WebResourceMetaInfo read(String id) { return datastore.get(WebResourceMetaInfo.class, id); } WebResourceMetaInfoDaoImpl(DB mongoDB,Morphia morphia,Datastore datastore); @Override boolean create(WebResourceMetaInfo webResourceMetaInfo, WriteConcern writeConcern); @Override int createOrModify(Collection<WebResourceMetaInfo> webResourceMetaInfos, WriteConcern writeConcern); @Override WebResourceMetaInfo read(String id); @Override List<WebResourceMetaInfo> read(List<String> ids); @Override boolean update(WebResourceMetaInfo webResourceMetaInfo, WriteConcern writeConcern); @Override WriteResult delete(String id);  }