@Test public void findByUrlWithExistingUrl() { Theme theme = jpaThemeMapper.findByUrl("http: assertNotNull("Did not find the theme", theme); assertEquals("Theme id does not match, got the wrong theme.", testThemeId, theme.getId()); }
public Theme findByUrl(final String themeLocation) { try { Theme theme = null; Query q = getEntityManager().createQuery( "from Theme where themeUrl = :themeUrl").setParameter( "themeUrl", themeLocation.toLowerCase()); q.setFlushMode(FlushModeType.COMMIT); return (Theme) q.getSingleResult(); } catch (Exception ex) { return null; } }
ThemeMapper extends DomainEntityMapper<Theme> implements
        GalleryItemMapper<Theme> { public Theme findByUrl(final String themeLocation) { try { Theme theme = null; Query q = getEntityManager().createQuery( "from Theme where themeUrl = :themeUrl").setParameter( "themeUrl", themeLocation.toLowerCase()); q.setFlushMode(FlushModeType.COMMIT); return (Theme) q.getSingleResult(); } catch (Exception ex) { return null; } } }
ThemeMapper extends DomainEntityMapper<Theme> implements
        GalleryItemMapper<Theme> { public Theme findByUrl(final String themeLocation) { try { Theme theme = null; Query q = getEntityManager().createQuery( "from Theme where themeUrl = :themeUrl").setParameter( "themeUrl", themeLocation.toLowerCase()); q.setFlushMode(FlushModeType.COMMIT); return (Theme) q.getSingleResult(); } catch (Exception ex) { return null; } } ThemeMapper(final QueryOptimizer inQueryOptimizer); }
ThemeMapper extends DomainEntityMapper<Theme> implements
        GalleryItemMapper<Theme> { public Theme findByUrl(final String themeLocation) { try { Theme theme = null; Query q = getEntityManager().createQuery( "from Theme where themeUrl = :themeUrl").setParameter( "themeUrl", themeLocation.toLowerCase()); q.setFlushMode(FlushModeType.COMMIT); return (Theme) q.getSingleResult(); } catch (Exception ex) { return null; } } ThemeMapper(final QueryOptimizer inQueryOptimizer); Theme findByUrl(final String themeLocation); Theme findByUUID(final String uuid); Theme findDefault(); PagedSet<Theme> findForCategorySortedByPopularity(
            final String inCategory, final int inStart, final int inEnd); PagedSet<Theme> findSortedByPopularity(final int inStart,
            final int inEnd); PagedSet<Theme> findForCategorySortedByRecent(
            final String inCategory, final int inStart, final int inEnd); PagedSet<Theme> findSortedByRecent(final int inStart, final int inEnd); void delete(final Theme inTheme); }
ThemeMapper extends DomainEntityMapper<Theme> implements
        GalleryItemMapper<Theme> { public Theme findByUrl(final String themeLocation) { try { Theme theme = null; Query q = getEntityManager().createQuery( "from Theme where themeUrl = :themeUrl").setParameter( "themeUrl", themeLocation.toLowerCase()); q.setFlushMode(FlushModeType.COMMIT); return (Theme) q.getSingleResult(); } catch (Exception ex) { return null; } } ThemeMapper(final QueryOptimizer inQueryOptimizer); Theme findByUrl(final String themeLocation); Theme findByUUID(final String uuid); Theme findDefault(); PagedSet<Theme> findForCategorySortedByPopularity(
            final String inCategory, final int inStart, final int inEnd); PagedSet<Theme> findSortedByPopularity(final int inStart,
            final int inEnd); PagedSet<Theme> findForCategorySortedByRecent(
            final String inCategory, final int inStart, final int inEnd); PagedSet<Theme> findSortedByRecent(final int inStart, final int inEnd); void delete(final Theme inTheme);  }