@Test public void testExecute() { List<Long> results = sut.execute(activityId); assertEquals(3, results.size()); assertEquals(1, results.get(0).longValue()); assertEquals(2, results.get(1).longValue()); assertEquals(3, results.get(2).longValue()); }
@SuppressWarnings("unchecked") @Override public List<Long> execute(final Long inActivityId) { return getEntityManager().createQuery( "SELECT c.id FROM Comment c WHERE c.target.id = :activityId " + "ORDER BY c.id ASC").setParameter( "activityId", inActivityId).getResultList(); }
GetOrderedCommentIdsByActivityIdDbMapper extends BaseArgDomainMapper<Long, List<Long>> { @SuppressWarnings("unchecked") @Override public List<Long> execute(final Long inActivityId) { return getEntityManager().createQuery( "SELECT c.id FROM Comment c WHERE c.target.id = :activityId " + "ORDER BY c.id ASC").setParameter( "activityId", inActivityId).getResultList(); } }
GetOrderedCommentIdsByActivityIdDbMapper extends BaseArgDomainMapper<Long, List<Long>> { @SuppressWarnings("unchecked") @Override public List<Long> execute(final Long inActivityId) { return getEntityManager().createQuery( "SELECT c.id FROM Comment c WHERE c.target.id = :activityId " + "ORDER BY c.id ASC").setParameter( "activityId", inActivityId).getResultList(); }  }
GetOrderedCommentIdsByActivityIdDbMapper extends BaseArgDomainMapper<Long, List<Long>> { @SuppressWarnings("unchecked") @Override public List<Long> execute(final Long inActivityId) { return getEntityManager().createQuery( "SELECT c.id FROM Comment c WHERE c.target.id = :activityId " + "ORDER BY c.id ASC").setParameter( "activityId", inActivityId).getResultList(); }  @SuppressWarnings("unchecked") @Override List<Long> execute(final Long inActivityId); }
GetOrderedCommentIdsByActivityIdDbMapper extends BaseArgDomainMapper<Long, List<Long>> { @SuppressWarnings("unchecked") @Override public List<Long> execute(final Long inActivityId) { return getEntityManager().createQuery( "SELECT c.id FROM Comment c WHERE c.target.id = :activityId " + "ORDER BY c.id ASC").setParameter( "activityId", inActivityId).getResultList(); }  @SuppressWarnings("unchecked") @Override List<Long> execute(final Long inActivityId);  }