@Test public void testDelete() throws Exception { final SourceDocumentReferenceProcessingProfile profile = new SourceDocumentReferenceProcessingProfile(true, new ReferenceOwner("1", "1", "1"), "1", URLSourceType.HASVIEW, DocumentReferenceTaskType.CHECK_LINK, 0, null, 0); assertFalse(processingProfileDao.delete(profile.getId()).getN() == 1); processingProfileDao.createOrModify(profile, WriteConcern.NONE); SourceDocumentReferenceProcessingProfile profileFromRead = processingProfileDao.read(profile.getId()); assertNotNull(profileFromRead); assertTrue(processingProfileDao.delete(profile.getId()).getN() == 1); profileFromRead = processingProfileDao.read(profile.getId()); assertNull(profileFromRead); assertFalse(processingProfileDao.delete(profile.getId()).getN() == 1); }
@Override public WriteResult delete (String id) { return datastore.delete(SourceDocumentReferenceProcessingProfile.class, id); }
SourceDocumentReferenceProcessingProfileDaoImpl implements SourceDocumentReferenceProcessingProfileDao { @Override public WriteResult delete (String id) { return datastore.delete(SourceDocumentReferenceProcessingProfile.class, id); } }
SourceDocumentReferenceProcessingProfileDaoImpl implements SourceDocumentReferenceProcessingProfileDao { @Override public WriteResult delete (String id) { return datastore.delete(SourceDocumentReferenceProcessingProfile.class, id); } SourceDocumentReferenceProcessingProfileDaoImpl(Datastore datastore); }
SourceDocumentReferenceProcessingProfileDaoImpl implements SourceDocumentReferenceProcessingProfileDao { @Override public WriteResult delete (String id) { return datastore.delete(SourceDocumentReferenceProcessingProfile.class, id); } SourceDocumentReferenceProcessingProfileDaoImpl(Datastore datastore); @Override Long getCount(); @Override boolean create(SourceDocumentReferenceProcessingProfile sourceDocumentReferenceProcessingProfile,
                           WriteConcern writeConcern); @Override void createOrModify(SourceDocumentReferenceProcessingProfile sourceDocumentReferenceProcessingProfile,
                                WriteConcern writeConcern); @Override Iterable<Key<SourceDocumentReferenceProcessingProfile>> createOrModify(Collection<SourceDocumentReferenceProcessingProfile> sourceDocumentReferenceProcessingProfiles,
                                                                                   WriteConcern writeConcern); @Override SourceDocumentReferenceProcessingProfile read(String id); @Override List<SourceDocumentReferenceProcessingProfile> read(List<String> ids); @Override boolean update(SourceDocumentReferenceProcessingProfile sourceDocumentReferenceProcessingProfile,
                           WriteConcern writeConcern); @Override WriteResult delete(String id); @Override List<SourceDocumentReferenceProcessingProfile> findByRecordID(String recordID); @Override List<SourceDocumentReferenceProcessingProfile> getJobToBeEvaluated(); @Override List<SourceDocumentReferenceProcessingProfile> deactivateDocuments(ReferenceOwner owner, WriteConcern concern); }
SourceDocumentReferenceProcessingProfileDaoImpl implements SourceDocumentReferenceProcessingProfileDao { @Override public WriteResult delete (String id) { return datastore.delete(SourceDocumentReferenceProcessingProfile.class, id); } SourceDocumentReferenceProcessingProfileDaoImpl(Datastore datastore); @Override Long getCount(); @Override boolean create(SourceDocumentReferenceProcessingProfile sourceDocumentReferenceProcessingProfile,
                           WriteConcern writeConcern); @Override void createOrModify(SourceDocumentReferenceProcessingProfile sourceDocumentReferenceProcessingProfile,
                                WriteConcern writeConcern); @Override Iterable<Key<SourceDocumentReferenceProcessingProfile>> createOrModify(Collection<SourceDocumentReferenceProcessingProfile> sourceDocumentReferenceProcessingProfiles,
                                                                                   WriteConcern writeConcern); @Override SourceDocumentReferenceProcessingProfile read(String id); @Override List<SourceDocumentReferenceProcessingProfile> read(List<String> ids); @Override boolean update(SourceDocumentReferenceProcessingProfile sourceDocumentReferenceProcessingProfile,
                           WriteConcern writeConcern); @Override WriteResult delete(String id); @Override List<SourceDocumentReferenceProcessingProfile> findByRecordID(String recordID); @Override List<SourceDocumentReferenceProcessingProfile> getJobToBeEvaluated(); @Override List<SourceDocumentReferenceProcessingProfile> deactivateDocuments(ReferenceOwner owner, WriteConcern concern);  }