@Test public void testExecute() { final long settingsId = 1001L; SystemSettings settings = sut.execute(null); assertEquals(settingsId, settings.getId()); assertEquals("some site label", settings.getSiteLabel()); assertEquals("some terms of service", settings.getTermsOfService()); assertEquals(1, settings.getTosPromptInterval()); assertEquals("some content warning", settings.getContentWarningText()); assertEquals(1, settings.getContentExpiration()); assertTrue(settings.getSendWelcomeEmails()); assertEquals("HeaderTemplate", settings.getHeaderTemplate()); assertEquals("FooterTemplate", settings.getFooterTemplate()); assertEquals("BannerTemplate", settings.getBannerTemplate()); }
@Override public SystemSettings execute(final MapperRequest inRequest) { Query q = getEntityManager().createQuery("from SystemSettings"); SystemSettings settings = (SystemSettings) q.getSingleResult(); settings.setHeaderTemplate(headerTemplate); settings.setFooterTemplate(footerTemplate); settings.setBannerTemplate(bannerTemplate); return settings; }
FindSystemSettingsDbDomainMapperImpl extends ReadMapper<MapperRequest, SystemSettings> { @Override public SystemSettings execute(final MapperRequest inRequest) { Query q = getEntityManager().createQuery("from SystemSettings"); SystemSettings settings = (SystemSettings) q.getSingleResult(); settings.setHeaderTemplate(headerTemplate); settings.setFooterTemplate(footerTemplate); settings.setBannerTemplate(bannerTemplate); return settings; } }
FindSystemSettingsDbDomainMapperImpl extends ReadMapper<MapperRequest, SystemSettings> { @Override public SystemSettings execute(final MapperRequest inRequest) { Query q = getEntityManager().createQuery("from SystemSettings"); SystemSettings settings = (SystemSettings) q.getSingleResult(); settings.setHeaderTemplate(headerTemplate); settings.setFooterTemplate(footerTemplate); settings.setBannerTemplate(bannerTemplate); return settings; } FindSystemSettingsDbDomainMapperImpl(final String inHeaderTemplate, final String inFooterTemplate,
            final String inBannerTemplate); }
FindSystemSettingsDbDomainMapperImpl extends ReadMapper<MapperRequest, SystemSettings> { @Override public SystemSettings execute(final MapperRequest inRequest) { Query q = getEntityManager().createQuery("from SystemSettings"); SystemSettings settings = (SystemSettings) q.getSingleResult(); settings.setHeaderTemplate(headerTemplate); settings.setFooterTemplate(footerTemplate); settings.setBannerTemplate(bannerTemplate); return settings; } FindSystemSettingsDbDomainMapperImpl(final String inHeaderTemplate, final String inFooterTemplate,
            final String inBannerTemplate); @Override SystemSettings execute(final MapperRequest inRequest); }
FindSystemSettingsDbDomainMapperImpl extends ReadMapper<MapperRequest, SystemSettings> { @Override public SystemSettings execute(final MapperRequest inRequest) { Query q = getEntityManager().createQuery("from SystemSettings"); SystemSettings settings = (SystemSettings) q.getSingleResult(); settings.setHeaderTemplate(headerTemplate); settings.setFooterTemplate(footerTemplate); settings.setBannerTemplate(bannerTemplate); return settings; } FindSystemSettingsDbDomainMapperImpl(final String inHeaderTemplate, final String inFooterTemplate,
            final String inBannerTemplate); @Override SystemSettings execute(final MapperRequest inRequest);  }