@Test public void testExecuteActivityWithOutResults() { List<List<Long>> values = sut.execute(Arrays.asList(1L)); final List<Long> peopleIds = values.iterator().next(); assertEquals(0, peopleIds.size()); }
@SuppressWarnings("unchecked") @Override public List<List<Long>> execute(final List<Long> inRequest) { List<List<Long>> values = new ArrayList<List<Long>>(); for (Long activityId : inRequest) { values.add(getEntityManager().createQuery( "SELECT pk.personId FROM LikedActivity WHERE activityId = :activityId").setParameter("activityId", activityId).getResultList()); } return values; }
GetPeopleWhoLikedActivityDbMapper extends
        BaseArgDomainMapper<List<Long>, List<List<Long>>> { @SuppressWarnings("unchecked") @Override public List<List<Long>> execute(final List<Long> inRequest) { List<List<Long>> values = new ArrayList<List<Long>>(); for (Long activityId : inRequest) { values.add(getEntityManager().createQuery( "SELECT pk.personId FROM LikedActivity WHERE activityId = :activityId").setParameter("activityId", activityId).getResultList()); } return values; } }
GetPeopleWhoLikedActivityDbMapper extends
        BaseArgDomainMapper<List<Long>, List<List<Long>>> { @SuppressWarnings("unchecked") @Override public List<List<Long>> execute(final List<Long> inRequest) { List<List<Long>> values = new ArrayList<List<Long>>(); for (Long activityId : inRequest) { values.add(getEntityManager().createQuery( "SELECT pk.personId FROM LikedActivity WHERE activityId = :activityId").setParameter("activityId", activityId).getResultList()); } return values; }  }
GetPeopleWhoLikedActivityDbMapper extends
        BaseArgDomainMapper<List<Long>, List<List<Long>>> { @SuppressWarnings("unchecked") @Override public List<List<Long>> execute(final List<Long> inRequest) { List<List<Long>> values = new ArrayList<List<Long>>(); for (Long activityId : inRequest) { values.add(getEntityManager().createQuery( "SELECT pk.personId FROM LikedActivity WHERE activityId = :activityId").setParameter("activityId", activityId).getResultList()); } return values; }  @SuppressWarnings("unchecked") @Override List<List<Long>> execute(final List<Long> inRequest); }
GetPeopleWhoLikedActivityDbMapper extends
        BaseArgDomainMapper<List<Long>, List<List<Long>>> { @SuppressWarnings("unchecked") @Override public List<List<Long>> execute(final List<Long> inRequest) { List<List<Long>> values = new ArrayList<List<Long>>(); for (Long activityId : inRequest) { values.add(getEntityManager().createQuery( "SELECT pk.personId FROM LikedActivity WHERE activityId = :activityId").setParameter("activityId", activityId).getResultList()); } return values; }  @SuppressWarnings("unchecked") @Override List<List<Long>> execute(final List<Long> inRequest);  }