@Test public void testExecute() throws ParseException { List<Long> results = sut.execute(new SimpleDateFormat("yyyy-MM-dd HH:mm").parse("2010-02-03 00:00")); assertEquals(2, results.size()); final long id42 = 42L; final long id98 = 98L; assertTrue(results.contains(id42)); assertTrue(results.contains(id98)); }
@Override @SuppressWarnings("unchecked") public List<Long> execute(final Date startDate) { String q = "select distinct recipient.id from InAppNotification " + "where notificationDate <= :startDate and isread = false"; Query query = getEntityManager().createQuery(q).setParameter("startDate", startDate); return query.getResultList(); }
GetUserIdsWithUnreadInAppNotificationsByDate extends BaseArgDomainMapper<Date, List<Long>> { @Override @SuppressWarnings("unchecked") public List<Long> execute(final Date startDate) { String q = "select distinct recipient.id from InAppNotification " + "where notificationDate <= :startDate and isread = false"; Query query = getEntityManager().createQuery(q).setParameter("startDate", startDate); return query.getResultList(); } }
GetUserIdsWithUnreadInAppNotificationsByDate extends BaseArgDomainMapper<Date, List<Long>> { @Override @SuppressWarnings("unchecked") public List<Long> execute(final Date startDate) { String q = "select distinct recipient.id from InAppNotification " + "where notificationDate <= :startDate and isread = false"; Query query = getEntityManager().createQuery(q).setParameter("startDate", startDate); return query.getResultList(); }  }
GetUserIdsWithUnreadInAppNotificationsByDate extends BaseArgDomainMapper<Date, List<Long>> { @Override @SuppressWarnings("unchecked") public List<Long> execute(final Date startDate) { String q = "select distinct recipient.id from InAppNotification " + "where notificationDate <= :startDate and isread = false"; Query query = getEntityManager().createQuery(q).setParameter("startDate", startDate); return query.getResultList(); }  @Override @SuppressWarnings("unchecked") List<Long> execute(final Date startDate); }
GetUserIdsWithUnreadInAppNotificationsByDate extends BaseArgDomainMapper<Date, List<Long>> { @Override @SuppressWarnings("unchecked") public List<Long> execute(final Date startDate) { String q = "select distinct recipient.id from InAppNotification " + "where notificationDate <= :startDate and isread = false"; Query query = getEntityManager().createQuery(q).setParameter("startDate", startDate); return query.getResultList(); }  @Override @SuppressWarnings("unchecked") List<Long> execute(final Date startDate);  }