@Test public void testExecute() { List<Long> results = sut.execute(null); assertEquals(5, results.size()); for (int i = 0; i < EXPECTED_RESULTS.length; i++) { assertEquals((Long) EXPECTED_RESULTS[i], results.get(i)); } }
@Override public List<Long> execute(final Long inRequest) { String idsQueryString = "select id FROM Activity WHERE showInStream = :showInStreamFlag ORDER BY id DESC"; Query idsQuery = getEntityManager().createQuery(idsQueryString).setParameter("showInStreamFlag", true); idsQuery.setMaxResults(MAX_RESULTS); return idsQuery.getResultList(); }
GetEveryoneActivityDbMapper extends BaseDomainMapper implements DomainMapper<Long, List<Long>> { @Override public List<Long> execute(final Long inRequest) { String idsQueryString = "select id FROM Activity WHERE showInStream = :showInStreamFlag ORDER BY id DESC"; Query idsQuery = getEntityManager().createQuery(idsQueryString).setParameter("showInStreamFlag", true); idsQuery.setMaxResults(MAX_RESULTS); return idsQuery.getResultList(); } }
GetEveryoneActivityDbMapper extends BaseDomainMapper implements DomainMapper<Long, List<Long>> { @Override public List<Long> execute(final Long inRequest) { String idsQueryString = "select id FROM Activity WHERE showInStream = :showInStreamFlag ORDER BY id DESC"; Query idsQuery = getEntityManager().createQuery(idsQueryString).setParameter("showInStreamFlag", true); idsQuery.setMaxResults(MAX_RESULTS); return idsQuery.getResultList(); }  }
GetEveryoneActivityDbMapper extends BaseDomainMapper implements DomainMapper<Long, List<Long>> { @Override public List<Long> execute(final Long inRequest) { String idsQueryString = "select id FROM Activity WHERE showInStream = :showInStreamFlag ORDER BY id DESC"; Query idsQuery = getEntityManager().createQuery(idsQueryString).setParameter("showInStreamFlag", true); idsQuery.setMaxResults(MAX_RESULTS); return idsQuery.getResultList(); }  @Override List<Long> execute(final Long inRequest); }
GetEveryoneActivityDbMapper extends BaseDomainMapper implements DomainMapper<Long, List<Long>> { @Override public List<Long> execute(final Long inRequest) { String idsQueryString = "select id FROM Activity WHERE showInStream = :showInStreamFlag ORDER BY id DESC"; Query idsQuery = getEntityManager().createQuery(idsQueryString).setParameter("showInStreamFlag", true); idsQuery.setMaxResults(MAX_RESULTS); return idsQuery.getResultList(); }  @Override List<Long> execute(final Long inRequest);  }