@Test public void findFeedByOpenSocialIdAndModuleId() { final String userId = "1234"; final String appId = "45"; FeedReader feedReader = sut.findFeedByOpenSocialIdAndModuleId(userId, appId); assertNotNull("No feeds found for user" + userId + " with appid of " + appId, feedReader); assertEquals(feedReader.getUrl(), "http: }
@SuppressWarnings("unchecked") public FeedReader findFeedByOpenSocialIdAndModuleId(final String inOpenSocialId, final String inModuleId) { Query q = entityManager.createQuery( "from FeedReader where moduleId = :inModuleId and openSocialId= :inOpenSocialId").setParameter( "inModuleId", inModuleId).setParameter("inOpenSocialId", inOpenSocialId); List<FeedReader> results = q.getResultList(); if (results.size() < 1) { return null; } else { return (FeedReader) results.get(0); } }
FeedReaderMapper { @SuppressWarnings("unchecked") public FeedReader findFeedByOpenSocialIdAndModuleId(final String inOpenSocialId, final String inModuleId) { Query q = entityManager.createQuery( "from FeedReader where moduleId = :inModuleId and openSocialId= :inOpenSocialId").setParameter( "inModuleId", inModuleId).setParameter("inOpenSocialId", inOpenSocialId); List<FeedReader> results = q.getResultList(); if (results.size() < 1) { return null; } else { return (FeedReader) results.get(0); } } }
FeedReaderMapper { @SuppressWarnings("unchecked") public FeedReader findFeedByOpenSocialIdAndModuleId(final String inOpenSocialId, final String inModuleId) { Query q = entityManager.createQuery( "from FeedReader where moduleId = :inModuleId and openSocialId= :inOpenSocialId").setParameter( "inModuleId", inModuleId).setParameter("inOpenSocialId", inOpenSocialId); List<FeedReader> results = q.getResultList(); if (results.size() < 1) { return null; } else { return (FeedReader) results.get(0); } }  }
FeedReaderMapper { @SuppressWarnings("unchecked") public FeedReader findFeedByOpenSocialIdAndModuleId(final String inOpenSocialId, final String inModuleId) { Query q = entityManager.createQuery( "from FeedReader where moduleId = :inModuleId and openSocialId= :inOpenSocialId").setParameter( "inModuleId", inModuleId).setParameter("inOpenSocialId", inOpenSocialId); List<FeedReader> results = q.getResultList(); if (results.size() < 1) { return null; } else { return (FeedReader) results.get(0); } }  @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 FeedReader findFeedByOpenSocialIdAndModuleId(final String inOpenSocialId, final String inModuleId) { Query q = entityManager.createQuery( "from FeedReader where moduleId = :inModuleId and openSocialId= :inOpenSocialId").setParameter( "inModuleId", inModuleId).setParameter("inOpenSocialId", inOpenSocialId); List<FeedReader> results = q.getResultList(); if (results.size() < 1) { return null; } else { return (FeedReader) results.get(0); } }  @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);  }