@Test public void testExecuteAtTime1031() { CurrentDateInMinutesRequest request = new CurrentDateInMinutesRequest(TIME1031); List<Feed> results = sut.execute(request); assertTrue(results.size() == 4); assertTrue(results.get(0).getId() == 1L); assertTrue(results.get(1).getId() == 2L); assertTrue(results.get(2).getId() == 4L); assertTrue(results.get(3).getId() == 5L); }
@SuppressWarnings("unchecked") @Override public List<Feed> execute(final CurrentDateInMinutesRequest inRequest) { Query q = getEntityManager() .createQuery( "SELECT f FROM Feed f WHERE ((f.updateFrequency " + "is not null and f.updated + f.updateFrequency " + "< :currentTimeInMinutes) or (f.updateFrequency " + "is null and f.updated + f.streamPlugin.updateFrequency" + "< :currentTimeInMinutes))") .setParameter("currentTimeInMinutes", inRequest.getCurrentDateInMinutes()); return q.getResultList(); }
GetRefreshableFeedsMapper extends
		ReadMapper<CurrentDateInMinutesRequest, List<Feed>> { @SuppressWarnings("unchecked") @Override public List<Feed> execute(final CurrentDateInMinutesRequest inRequest) { Query q = getEntityManager() .createQuery( "SELECT f FROM Feed f WHERE ((f.updateFrequency " + "is not null and f.updated + f.updateFrequency " + "< :currentTimeInMinutes) or (f.updateFrequency " + "is null and f.updated + f.streamPlugin.updateFrequency" + "< :currentTimeInMinutes))") .setParameter("currentTimeInMinutes", inRequest.getCurrentDateInMinutes()); return q.getResultList(); } }
GetRefreshableFeedsMapper extends
		ReadMapper<CurrentDateInMinutesRequest, List<Feed>> { @SuppressWarnings("unchecked") @Override public List<Feed> execute(final CurrentDateInMinutesRequest inRequest) { Query q = getEntityManager() .createQuery( "SELECT f FROM Feed f WHERE ((f.updateFrequency " + "is not null and f.updated + f.updateFrequency " + "< :currentTimeInMinutes) or (f.updateFrequency " + "is null and f.updated + f.streamPlugin.updateFrequency" + "< :currentTimeInMinutes))") .setParameter("currentTimeInMinutes", inRequest.getCurrentDateInMinutes()); return q.getResultList(); }  }
GetRefreshableFeedsMapper extends
		ReadMapper<CurrentDateInMinutesRequest, List<Feed>> { @SuppressWarnings("unchecked") @Override public List<Feed> execute(final CurrentDateInMinutesRequest inRequest) { Query q = getEntityManager() .createQuery( "SELECT f FROM Feed f WHERE ((f.updateFrequency " + "is not null and f.updated + f.updateFrequency " + "< :currentTimeInMinutes) or (f.updateFrequency " + "is null and f.updated + f.streamPlugin.updateFrequency" + "< :currentTimeInMinutes))") .setParameter("currentTimeInMinutes", inRequest.getCurrentDateInMinutes()); return q.getResultList(); }  @SuppressWarnings("unchecked") @Override List<Feed> execute(final CurrentDateInMinutesRequest inRequest); }
GetRefreshableFeedsMapper extends
		ReadMapper<CurrentDateInMinutesRequest, List<Feed>> { @SuppressWarnings("unchecked") @Override public List<Feed> execute(final CurrentDateInMinutesRequest inRequest) { Query q = getEntityManager() .createQuery( "SELECT f FROM Feed f WHERE ((f.updateFrequency " + "is not null and f.updated + f.updateFrequency " + "< :currentTimeInMinutes) or (f.updateFrequency " + "is null and f.updated + f.streamPlugin.updateFrequency" + "< :currentTimeInMinutes))") .setParameter("currentTimeInMinutes", inRequest.getCurrentDateInMinutes()); return q.getResultList(); }  @SuppressWarnings("unchecked") @Override List<Feed> execute(final CurrentDateInMinutesRequest inRequest);  }