@Test public void testExecuteSingleRow() { final long id = 99L; NotificationFilterPreferenceDTO expected1 = new NotificationFilterPreferenceDTO(id, "email", "COMMENT"); Collection<NotificationFilterPreferenceDTO> list = sut.execute(id); assertEquals(1, list.size()); assertTrue(Matchers.hasItem(equalInternally(expected1)).matches(list)); }
@Override @SuppressWarnings("unchecked") public Collection<NotificationFilterPreferenceDTO> execute(final Long personId) { String q = "select new org.eurekastreams.server.domain.NotificationFilterPreferenceDTO" + "(person.id,notifierType,notificationCategory) " + "from NotificationFilterPreference where person.id = :personId"; Query query = getEntityManager().createQuery(q).setParameter("personId", personId); return query.getResultList(); }
GetNotificationFilterPreferencesByPersonId extends
        BaseArgDomainMapper<Long, Collection<NotificationFilterPreferenceDTO>> { @Override @SuppressWarnings("unchecked") public Collection<NotificationFilterPreferenceDTO> execute(final Long personId) { String q = "select new org.eurekastreams.server.domain.NotificationFilterPreferenceDTO" + "(person.id,notifierType,notificationCategory) " + "from NotificationFilterPreference where person.id = :personId"; Query query = getEntityManager().createQuery(q).setParameter("personId", personId); return query.getResultList(); } }
GetNotificationFilterPreferencesByPersonId extends
        BaseArgDomainMapper<Long, Collection<NotificationFilterPreferenceDTO>> { @Override @SuppressWarnings("unchecked") public Collection<NotificationFilterPreferenceDTO> execute(final Long personId) { String q = "select new org.eurekastreams.server.domain.NotificationFilterPreferenceDTO" + "(person.id,notifierType,notificationCategory) " + "from NotificationFilterPreference where person.id = :personId"; Query query = getEntityManager().createQuery(q).setParameter("personId", personId); return query.getResultList(); }  }
GetNotificationFilterPreferencesByPersonId extends
        BaseArgDomainMapper<Long, Collection<NotificationFilterPreferenceDTO>> { @Override @SuppressWarnings("unchecked") public Collection<NotificationFilterPreferenceDTO> execute(final Long personId) { String q = "select new org.eurekastreams.server.domain.NotificationFilterPreferenceDTO" + "(person.id,notifierType,notificationCategory) " + "from NotificationFilterPreference where person.id = :personId"; Query query = getEntityManager().createQuery(q).setParameter("personId", personId); return query.getResultList(); }  @Override @SuppressWarnings("unchecked") Collection<NotificationFilterPreferenceDTO> execute(final Long personId); }
GetNotificationFilterPreferencesByPersonId extends
        BaseArgDomainMapper<Long, Collection<NotificationFilterPreferenceDTO>> { @Override @SuppressWarnings("unchecked") public Collection<NotificationFilterPreferenceDTO> execute(final Long personId) { String q = "select new org.eurekastreams.server.domain.NotificationFilterPreferenceDTO" + "(person.id,notifierType,notificationCategory) " + "from NotificationFilterPreference where person.id = :personId"; Query query = getEntityManager().createQuery(q).setParameter("personId", personId); return query.getResultList(); }  @Override @SuppressWarnings("unchecked") Collection<NotificationFilterPreferenceDTO> execute(final Long personId);  }