@Test public void testRead() throws Exception { ProcessingJob processingJobFromRead = processingJobDao.read(""); assertNull(processingJobFromRead); final String startDateString = "2013-03-26"; final DateFormat df = new SimpleDateFormat("yyyy-MM-dd"); final Date date = df.parse(startDateString); final SourceDocumentReference sourceDocumentReference = new SourceDocumentReference(new ReferenceOwner("1", "1", "1"), "a.com", null, null, 0l, null, true); final ProcessingJobTaskDocumentReference processingJobTaskDocumentReference = new ProcessingJobTaskDocumentReference(DocumentReferenceTaskType.UNCONDITIONAL_DOWNLOAD, sourceDocumentReference.getId(), null); final List<ProcessingJobTaskDocumentReference> tasks = new ArrayList<ProcessingJobTaskDocumentReference>(); tasks.add(processingJobTaskDocumentReference); final ProcessingJob processingJob = new ProcessingJob(1, date, new ReferenceOwner("1", "1", "1"), tasks, JobState.READY, null, "", null); processingJobDao.create(processingJob, WriteConcern.NONE); assertEquals(processingJob.getExpectedStartDate(), processingJobDao.read(processingJob.getId()).getExpectedStartDate()); processingJobDao.delete(processingJob.getId()); }
@Override public ProcessingJob read(String id) { return datastore.get(ProcessingJob.class, id); }
ProcessingJobDaoImpl implements ProcessingJobDao { @Override public ProcessingJob read(String id) { return datastore.get(ProcessingJob.class, id); } }
ProcessingJobDaoImpl implements ProcessingJobDao { @Override public ProcessingJob read(String id) { return datastore.get(ProcessingJob.class, id); } ProcessingJobDaoImpl(Datastore datastore); }
ProcessingJobDaoImpl implements ProcessingJobDao { @Override public ProcessingJob read(String id) { return datastore.get(ProcessingJob.class, id); } ProcessingJobDaoImpl(Datastore datastore); @Override Long getCount(); @Override boolean create(ProcessingJob processingJob, WriteConcern writeConcern); @Override com.google.code.morphia.Key<ProcessingJob> createOrModify(
			ProcessingJob processingJobs, WriteConcern writeConcern); @Override Iterable<com.google.code.morphia.Key<ProcessingJob>> createOrModify(
			Collection<ProcessingJob> processingJobs, WriteConcern writeConcern); @Override ProcessingJob read(String id); @Override boolean update(ProcessingJob processingJob, WriteConcern writeConcern); @Override WriteResult delete(String id); @Override List<ProcessingJob> getJobsWithState(JobState jobState, Page page); @Override void modifyStateOfJobsWithIds(JobState newJobState,
			final List<String> jobIds); @Override void modifyStateOfJobs(JobState oldJobState, JobState newJobState); Map<String, Integer> getIpDistribution(); @Override List<ProcessingJob> getDiffusedJobsWithState(
			JobPriority jobPriority, JobState jobState, Page page,
			Map<String, Integer> ipDistribution); @Override List<ProcessingJob> deactivateJobs(final ReferenceOwner owner,
			final WriteConcern writeConcern); @Override PagedElements<ProcessingJob> findJobsByCollectionIdAndState(
			final Set<String> collectionIds, final Set<JobState> states,
			final Page pageConfiguration); @Override Map<String, JobStatistics> findJobsByCollectionId(String collectionId); }
ProcessingJobDaoImpl implements ProcessingJobDao { @Override public ProcessingJob read(String id) { return datastore.get(ProcessingJob.class, id); } ProcessingJobDaoImpl(Datastore datastore); @Override Long getCount(); @Override boolean create(ProcessingJob processingJob, WriteConcern writeConcern); @Override com.google.code.morphia.Key<ProcessingJob> createOrModify(
			ProcessingJob processingJobs, WriteConcern writeConcern); @Override Iterable<com.google.code.morphia.Key<ProcessingJob>> createOrModify(
			Collection<ProcessingJob> processingJobs, WriteConcern writeConcern); @Override ProcessingJob read(String id); @Override boolean update(ProcessingJob processingJob, WriteConcern writeConcern); @Override WriteResult delete(String id); @Override List<ProcessingJob> getJobsWithState(JobState jobState, Page page); @Override void modifyStateOfJobsWithIds(JobState newJobState,
			final List<String> jobIds); @Override void modifyStateOfJobs(JobState oldJobState, JobState newJobState); Map<String, Integer> getIpDistribution(); @Override List<ProcessingJob> getDiffusedJobsWithState(
			JobPriority jobPriority, JobState jobState, Page page,
			Map<String, Integer> ipDistribution); @Override List<ProcessingJob> deactivateJobs(final ReferenceOwner owner,
			final WriteConcern writeConcern); @Override PagedElements<ProcessingJob> findJobsByCollectionIdAndState(
			final Set<String> collectionIds, final Set<JobState> states,
			final Page pageConfiguration); @Override Map<String, JobStatistics> findJobsByCollectionId(String collectionId);  }