@Test public void testGetTabTemplate() { final long welcomeId = 5555L; TabTemplate welcome = jpaTabMapper.getTabTemplate(TabType.WELCOME); assertEquals(welcomeId, welcome.getId()); assertEquals(TabType.WELCOME, welcome.getType()); }
public TabTemplate getTabTemplate(final String type) { Query q = entityManager.createQuery("FROM TabTemplate t where t.type=:tabTemplateType").setParameter( "tabTemplateType", type); return (TabTemplate) q.getSingleResult(); }
TabMapper { public TabTemplate getTabTemplate(final String type) { Query q = entityManager.createQuery("FROM TabTemplate t where t.type=:tabTemplateType").setParameter( "tabTemplateType", type); return (TabTemplate) q.getSingleResult(); } }
TabMapper { public TabTemplate getTabTemplate(final String type) { Query q = entityManager.createQuery("FROM TabTemplate t where t.type=:tabTemplateType").setParameter( "tabTemplateType", type); return (TabTemplate) q.getSingleResult(); } TabMapper(final QueryOptimizer inQueryOptimizer); }
TabMapper { public TabTemplate getTabTemplate(final String type) { Query q = entityManager.createQuery("FROM TabTemplate t where t.type=:tabTemplateType").setParameter( "tabTemplateType", type); return (TabTemplate) q.getSingleResult(); } TabMapper(final QueryOptimizer inQueryOptimizer); TabTemplate getTabTemplate(final String type); void setUndeleteGadgetWindowInMinutes(final int undeleteWindowInMinutes); @PersistenceContext void setEntityManager(final EntityManager inEntityManager); Tab findById(final Long tabId); TabTemplate findByGadgetId(final Long gadgetId); Tab findTabByGadgetId(final Long gadgetId); Tab findById(final Integer tabId); void flush(); void deleteGadget(final Gadget gadgetToDelete); Gadget undeleteGadget(final long gadgetId); @SuppressWarnings("unchecked") void moveGadget(final Long gadgetId, final Long sourceTabTemplateId, final Integer sourceZoneIndex,
            final Integer sourceZoneNumber, final Long targetTabTemplateId, final Integer targetZoneIndex,
            final Integer targetZoneNumber); }
TabMapper { public TabTemplate getTabTemplate(final String type) { Query q = entityManager.createQuery("FROM TabTemplate t where t.type=:tabTemplateType").setParameter( "tabTemplateType", type); return (TabTemplate) q.getSingleResult(); } TabMapper(final QueryOptimizer inQueryOptimizer); TabTemplate getTabTemplate(final String type); void setUndeleteGadgetWindowInMinutes(final int undeleteWindowInMinutes); @PersistenceContext void setEntityManager(final EntityManager inEntityManager); Tab findById(final Long tabId); TabTemplate findByGadgetId(final Long gadgetId); Tab findTabByGadgetId(final Long gadgetId); Tab findById(final Integer tabId); void flush(); void deleteGadget(final Gadget gadgetToDelete); Gadget undeleteGadget(final long gadgetId); @SuppressWarnings("unchecked") void moveGadget(final Long gadgetId, final Long sourceTabTemplateId, final Integer sourceZoneIndex,
            final Integer sourceZoneNumber, final Long targetTabTemplateId, final Integer targetZoneIndex,
            final Integer targetZoneNumber);  }