@Test public void executeWithNoResults() { final long entityId = 41L; List<FeedSubscriber> feedSubs = sut.execute(new GetFeedSubscriberRequest(0L, entityId, EntityType.PERSON, 0)); assertEquals(0, feedSubs.size()); }
@SuppressWarnings("unchecked") @Override public List<FeedSubscriber> execute(final GetFeedSubscriberRequest inRequest) { String query = "FROM FeedSubscriber WHERE entityId=:entityId AND type = :type"; return getEntityManager().createQuery(query) .setParameter("entityId", inRequest.getEntityId()) .setParameter("type", inRequest.getEntityType()).getResultList(); }
GetFeedSubscriptionsByEntity extends ReadMapper<GetFeedSubscriberRequest, List<FeedSubscriber>> { @SuppressWarnings("unchecked") @Override public List<FeedSubscriber> execute(final GetFeedSubscriberRequest inRequest) { String query = "FROM FeedSubscriber WHERE entityId=:entityId AND type = :type"; return getEntityManager().createQuery(query) .setParameter("entityId", inRequest.getEntityId()) .setParameter("type", inRequest.getEntityType()).getResultList(); } }
GetFeedSubscriptionsByEntity extends ReadMapper<GetFeedSubscriberRequest, List<FeedSubscriber>> { @SuppressWarnings("unchecked") @Override public List<FeedSubscriber> execute(final GetFeedSubscriberRequest inRequest) { String query = "FROM FeedSubscriber WHERE entityId=:entityId AND type = :type"; return getEntityManager().createQuery(query) .setParameter("entityId", inRequest.getEntityId()) .setParameter("type", inRequest.getEntityType()).getResultList(); }  }
GetFeedSubscriptionsByEntity extends ReadMapper<GetFeedSubscriberRequest, List<FeedSubscriber>> { @SuppressWarnings("unchecked") @Override public List<FeedSubscriber> execute(final GetFeedSubscriberRequest inRequest) { String query = "FROM FeedSubscriber WHERE entityId=:entityId AND type = :type"; return getEntityManager().createQuery(query) .setParameter("entityId", inRequest.getEntityId()) .setParameter("type", inRequest.getEntityType()).getResultList(); }  @SuppressWarnings("unchecked") @Override List<FeedSubscriber> execute(final GetFeedSubscriberRequest inRequest); }
GetFeedSubscriptionsByEntity extends ReadMapper<GetFeedSubscriberRequest, List<FeedSubscriber>> { @SuppressWarnings("unchecked") @Override public List<FeedSubscriber> execute(final GetFeedSubscriberRequest inRequest) { String query = "FROM FeedSubscriber WHERE entityId=:entityId AND type = :type"; return getEntityManager().createQuery(query) .setParameter("entityId", inRequest.getEntityId()) .setParameter("type", inRequest.getEntityType()).getResultList(); }  @SuppressWarnings("unchecked") @Override List<FeedSubscriber> execute(final GetFeedSubscriberRequest inRequest);  }