@Test public void testRead() throws Exception { SourceDocumentReferenceMetaInfo sourceDocumentReferenceMetaInfoFromRead = sourceDocumentReferenceMetaInfoDao.read(""); assertNull(sourceDocumentReferenceMetaInfoFromRead); final SourceDocumentReferenceMetaInfo sourceDocumentReferenceMetaInfo = new SourceDocumentReferenceMetaInfo("a", new ImageMetaInfo(10, 10, "", "", "", null, null, null), null, null, null); sourceDocumentReferenceMetaInfoDao.create(sourceDocumentReferenceMetaInfo, WriteConcern.NONE); sourceDocumentReferenceMetaInfoFromRead = sourceDocumentReferenceMetaInfoDao.read(sourceDocumentReferenceMetaInfo.getId()); assertEquals(sourceDocumentReferenceMetaInfo.getImageMetaInfo().getHeight(), sourceDocumentReferenceMetaInfoFromRead.getImageMetaInfo().getHeight()); sourceDocumentReferenceMetaInfoDao.delete(sourceDocumentReferenceMetaInfo.getId()); }
@Override public SourceDocumentReferenceMetaInfo read(String id) { return datastore.get(SourceDocumentReferenceMetaInfo.class, id); }
SourceDocumentReferenceMetaInfoDaoImpl implements SourceDocumentReferenceMetaInfoDao { @Override public SourceDocumentReferenceMetaInfo read(String id) { return datastore.get(SourceDocumentReferenceMetaInfo.class, id); } }
SourceDocumentReferenceMetaInfoDaoImpl implements SourceDocumentReferenceMetaInfoDao { @Override public SourceDocumentReferenceMetaInfo read(String id) { return datastore.get(SourceDocumentReferenceMetaInfo.class, id); } SourceDocumentReferenceMetaInfoDaoImpl(Datastore datastore); }
SourceDocumentReferenceMetaInfoDaoImpl implements SourceDocumentReferenceMetaInfoDao { @Override public SourceDocumentReferenceMetaInfo read(String id) { return datastore.get(SourceDocumentReferenceMetaInfo.class, id); } SourceDocumentReferenceMetaInfoDaoImpl(Datastore datastore); @Override Long getCount(); @Override boolean create(SourceDocumentReferenceMetaInfo sourceDocumentReferenceMetaInfo, WriteConcern writeConcern); @Override Iterable<com.google.code.morphia.Key<SourceDocumentReferenceMetaInfo>> createOrModify(Collection<SourceDocumentReferenceMetaInfo> sourceDocumentReferenceMetaInfos, WriteConcern writeConcern); @Override SourceDocumentReferenceMetaInfo read(String id); @Override List<SourceDocumentReferenceMetaInfo> read(Collection<String> ids); @Override boolean update(SourceDocumentReferenceMetaInfo sourceDocumentReferenceMetaInfo, WriteConcern writeConcern); @Override WriteResult delete(String id); }
SourceDocumentReferenceMetaInfoDaoImpl implements SourceDocumentReferenceMetaInfoDao { @Override public SourceDocumentReferenceMetaInfo read(String id) { return datastore.get(SourceDocumentReferenceMetaInfo.class, id); } SourceDocumentReferenceMetaInfoDaoImpl(Datastore datastore); @Override Long getCount(); @Override boolean create(SourceDocumentReferenceMetaInfo sourceDocumentReferenceMetaInfo, WriteConcern writeConcern); @Override Iterable<com.google.code.morphia.Key<SourceDocumentReferenceMetaInfo>> createOrModify(Collection<SourceDocumentReferenceMetaInfo> sourceDocumentReferenceMetaInfos, WriteConcern writeConcern); @Override SourceDocumentReferenceMetaInfo read(String id); @Override List<SourceDocumentReferenceMetaInfo> read(Collection<String> ids); @Override boolean update(SourceDocumentReferenceMetaInfo sourceDocumentReferenceMetaInfo, WriteConcern writeConcern); @Override WriteResult delete(String id);  }