@Test public void testExecute() { final long activityId = 6789L; final long mrburnsId = 99; List<Long> results = sut.execute(activityId); assertNotNull(results); assertTrue(results.contains(mrburnsId)); }
@SuppressWarnings("unchecked") @Override public List<Long> execute(final Long inActivityId) { return getEntityManager().createQuery( "SELECT sa.pk.personId from StarredActivity sa WHERE sa.pk.activityId = :activityId") .setParameter("activityId", inActivityId) .getResultList(); }
GetPersonIdsWithStarredActivity extends ReadMapper<Long, List<Long>> { @SuppressWarnings("unchecked") @Override public List<Long> execute(final Long inActivityId) { return getEntityManager().createQuery( "SELECT sa.pk.personId from StarredActivity sa WHERE sa.pk.activityId = :activityId") .setParameter("activityId", inActivityId) .getResultList(); } }
GetPersonIdsWithStarredActivity extends ReadMapper<Long, List<Long>> { @SuppressWarnings("unchecked") @Override public List<Long> execute(final Long inActivityId) { return getEntityManager().createQuery( "SELECT sa.pk.personId from StarredActivity sa WHERE sa.pk.activityId = :activityId") .setParameter("activityId", inActivityId) .getResultList(); }  }
GetPersonIdsWithStarredActivity extends ReadMapper<Long, List<Long>> { @SuppressWarnings("unchecked") @Override public List<Long> execute(final Long inActivityId) { return getEntityManager().createQuery( "SELECT sa.pk.personId from StarredActivity sa WHERE sa.pk.activityId = :activityId") .setParameter("activityId", inActivityId) .getResultList(); }  @SuppressWarnings("unchecked") @Override List<Long> execute(final Long inActivityId); }
GetPersonIdsWithStarredActivity extends ReadMapper<Long, List<Long>> { @SuppressWarnings("unchecked") @Override public List<Long> execute(final Long inActivityId) { return getEntityManager().createQuery( "SELECT sa.pk.personId from StarredActivity sa WHERE sa.pk.activityId = :activityId") .setParameter("activityId", inActivityId) .getResultList(); }  @SuppressWarnings("unchecked") @Override List<Long> execute(final Long inActivityId);  }