@Test public void findFeedById() { final String userId = "1234"; List<FeedReader> feedReader = sut.findFeedsByOpenSocialId(userId); assertNotNull("No feeds found for user" + userId, feedReader); assertEquals(2, feedReader.size()); }
@SuppressWarnings("unchecked") public List<FeedReader> findFeedsByOpenSocialId(final String inOpenSocialId) { Query q = entityManager.createQuery("from FeedReader where openSocialId= :inOpenSocialId").setParameter( "inOpenSocialId", inOpenSocialId); List<FeedReader> results = q.getResultList(); return results; }
FeedReaderMapper { @SuppressWarnings("unchecked") public List<FeedReader> findFeedsByOpenSocialId(final String inOpenSocialId) { Query q = entityManager.createQuery("from FeedReader where openSocialId= :inOpenSocialId").setParameter( "inOpenSocialId", inOpenSocialId); List<FeedReader> results = q.getResultList(); return results; } }
FeedReaderMapper { @SuppressWarnings("unchecked") public List<FeedReader> findFeedsByOpenSocialId(final String inOpenSocialId) { Query q = entityManager.createQuery("from FeedReader where openSocialId= :inOpenSocialId").setParameter( "inOpenSocialId", inOpenSocialId); List<FeedReader> results = q.getResultList(); return results; }  }
FeedReaderMapper { @SuppressWarnings("unchecked") public List<FeedReader> findFeedsByOpenSocialId(final String inOpenSocialId) { Query q = entityManager.createQuery("from FeedReader where openSocialId= :inOpenSocialId").setParameter( "inOpenSocialId", inOpenSocialId); List<FeedReader> results = q.getResultList(); return results; }  @PersistenceContext void setEntityManager(final EntityManager inEntityManager); void insert(final FeedReader domainEntity); void flush(); void refresh(final FeedReader domainEntity); @SuppressWarnings("unchecked") FeedReader findFeedByOpenSocialIdAndModuleId(final String inOpenSocialId, final String inModuleId); @SuppressWarnings("unchecked") List<FeedReader> findFeedsByOpenSocialId(final String inOpenSocialId); @SuppressWarnings("unchecked") List<FeedReaderUrlCount> findTop10PublicFeeds(); @SuppressWarnings("unchecked") List<FeedReaderUrlCount> findTop10FriendFeeds(final String openSocialIdString); void delete(final long id); }
FeedReaderMapper { @SuppressWarnings("unchecked") public List<FeedReader> findFeedsByOpenSocialId(final String inOpenSocialId) { Query q = entityManager.createQuery("from FeedReader where openSocialId= :inOpenSocialId").setParameter( "inOpenSocialId", inOpenSocialId); List<FeedReader> results = q.getResultList(); return results; }  @PersistenceContext void setEntityManager(final EntityManager inEntityManager); void insert(final FeedReader domainEntity); void flush(); void refresh(final FeedReader domainEntity); @SuppressWarnings("unchecked") FeedReader findFeedByOpenSocialIdAndModuleId(final String inOpenSocialId, final String inModuleId); @SuppressWarnings("unchecked") List<FeedReader> findFeedsByOpenSocialId(final String inOpenSocialId); @SuppressWarnings("unchecked") List<FeedReaderUrlCount> findTop10PublicFeeds(); @SuppressWarnings("unchecked") List<FeedReaderUrlCount> findTop10FriendFeeds(final String openSocialIdString); void delete(final long id);  }