@Test public void testDelete() throws Exception { final SourceDocumentReferenceMetaInfo sourceDocumentReferenceMetaInfo = new SourceDocumentReferenceMetaInfo("a", new ImageMetaInfo(10, 10, "", "", "", null, null, null), null, null, null); sourceDocumentReferenceMetaInfoDao.create(sourceDocumentReferenceMetaInfo, WriteConcern.NONE); SourceDocumentReferenceMetaInfo sourceDocumentReferenceMetaInfoFromRead = sourceDocumentReferenceMetaInfoDao.read(sourceDocumentReferenceMetaInfo.getId()); assertNotNull(sourceDocumentReferenceMetaInfoFromRead); assertTrue(sourceDocumentReferenceMetaInfoDao.delete(sourceDocumentReferenceMetaInfo.getId()).getN() == 1); sourceDocumentReferenceMetaInfoFromRead = sourceDocumentReferenceMetaInfoDao.read(sourceDocumentReferenceMetaInfo.getId()); assertNull(sourceDocumentReferenceMetaInfoFromRead); assertFalse(sourceDocumentReferenceMetaInfoDao.delete(sourceDocumentReferenceMetaInfo.getId()).getN() == 1); }
@Override public WriteResult delete(String id) { return datastore.delete(SourceDocumentReferenceMetaInfo.class, id); }
SourceDocumentReferenceMetaInfoDaoImpl implements SourceDocumentReferenceMetaInfoDao { @Override public WriteResult delete(String id) { return datastore.delete(SourceDocumentReferenceMetaInfo.class, id); } }
SourceDocumentReferenceMetaInfoDaoImpl implements SourceDocumentReferenceMetaInfoDao { @Override public WriteResult delete(String id) { return datastore.delete(SourceDocumentReferenceMetaInfo.class, id); } SourceDocumentReferenceMetaInfoDaoImpl(Datastore datastore); }
SourceDocumentReferenceMetaInfoDaoImpl implements SourceDocumentReferenceMetaInfoDao { @Override public WriteResult delete(String id) { return datastore.delete(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 WriteResult delete(String id) { return datastore.delete(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);  }