@Test public void testFindPersonBackgroundWithNoData() { Background background = jpaBackgroundMapper.findPersonBackground("2d359911-0977-418a-9490-57e8252b1a98"); assertNull(background); }
@SuppressWarnings("unchecked") public Background findPersonBackground(final String inOpenSocialId) { logger.debug("finding background for person with opensocial id: " + inOpenSocialId); String queryString = "from Background b where b.person.openSocialId = :openSocialId"; Query query = getEntityManager().createQuery(queryString); query.setParameter("openSocialId", inOpenSocialId); List results = query.getResultList(); return (results.size() == 0) ? null : (Background) results.get(0); }
BackgroundMapper extends DomainEntityMapper<Background> { @SuppressWarnings("unchecked") public Background findPersonBackground(final String inOpenSocialId) { logger.debug("finding background for person with opensocial id: " + inOpenSocialId); String queryString = "from Background b where b.person.openSocialId = :openSocialId"; Query query = getEntityManager().createQuery(queryString); query.setParameter("openSocialId", inOpenSocialId); List results = query.getResultList(); return (results.size() == 0) ? null : (Background) results.get(0); } }
BackgroundMapper extends DomainEntityMapper<Background> { @SuppressWarnings("unchecked") public Background findPersonBackground(final String inOpenSocialId) { logger.debug("finding background for person with opensocial id: " + inOpenSocialId); String queryString = "from Background b where b.person.openSocialId = :openSocialId"; Query query = getEntityManager().createQuery(queryString); query.setParameter("openSocialId", inOpenSocialId); List results = query.getResultList(); return (results.size() == 0) ? null : (Background) results.get(0); } BackgroundMapper(final QueryOptimizer inQueryOptimizer, final PersonMapper inPersonMapper); }
BackgroundMapper extends DomainEntityMapper<Background> { @SuppressWarnings("unchecked") public Background findPersonBackground(final String inOpenSocialId) { logger.debug("finding background for person with opensocial id: " + inOpenSocialId); String queryString = "from Background b where b.person.openSocialId = :openSocialId"; Query query = getEntityManager().createQuery(queryString); query.setParameter("openSocialId", inOpenSocialId); List results = query.getResultList(); return (results.size() == 0) ? null : (Background) results.get(0); } BackgroundMapper(final QueryOptimizer inQueryOptimizer, final PersonMapper inPersonMapper); @SuppressWarnings("unchecked") Background findPersonBackground(final String inOpenSocialId); void delete(final Background inBackground); void deleteItem(final BackgroundItem item); @SuppressWarnings("unchecked") Background findOrCreatePersonBackground(final String inOpenSocialId); @SuppressWarnings("unchecked") List<String> findBackgroundItemNamesByType(final BackgroundItemType backgroundType,
            final String searchString, final int maxResults); void flush(final String uuid); }
BackgroundMapper extends DomainEntityMapper<Background> { @SuppressWarnings("unchecked") public Background findPersonBackground(final String inOpenSocialId) { logger.debug("finding background for person with opensocial id: " + inOpenSocialId); String queryString = "from Background b where b.person.openSocialId = :openSocialId"; Query query = getEntityManager().createQuery(queryString); query.setParameter("openSocialId", inOpenSocialId); List results = query.getResultList(); return (results.size() == 0) ? null : (Background) results.get(0); } BackgroundMapper(final QueryOptimizer inQueryOptimizer, final PersonMapper inPersonMapper); @SuppressWarnings("unchecked") Background findPersonBackground(final String inOpenSocialId); void delete(final Background inBackground); void deleteItem(final BackgroundItem item); @SuppressWarnings("unchecked") Background findOrCreatePersonBackground(final String inOpenSocialId); @SuppressWarnings("unchecked") List<String> findBackgroundItemNamesByType(final BackgroundItemType backgroundType,
            final String searchString, final int maxResults); void flush(final String uuid);  }