@Test public void testReadSucceeds() throws Exception { IntegrationDefinition integrationDefinition = dao.getIntegrationDefinition("1"); assertNotNull(integrationDefinition); assertTrue(integrationDefinition.isValid()); assertEquals("1", integrationDefinition.getProvider().getKey()); assertEquals("1", integrationDefinition.getConsumer().getKey()); assertEquals(true, integrationDefinition.isUsing()); assertEquals(2009, integrationDefinition.getValidateFrom().get(Calendar.YEAR)); assertEquals(Calendar.JANUARY, integrationDefinition.getValidateFrom().get(Calendar.MONTH)); assertEquals(1, integrationDefinition.getValidateFrom().get(Calendar.DAY_OF_MONTH)); assertEquals(0, integrationDefinition.getValidateFrom().get(Calendar.HOUR_OF_DAY)); assertEquals(0, integrationDefinition.getValidateFrom().get(Calendar.MINUTE)); assertEquals(0, integrationDefinition.getValidateFrom().get(Calendar.SECOND)); assertEquals(2009, integrationDefinition.getValidateTo().get(Calendar.YEAR)); assertEquals(Calendar.MAY, integrationDefinition.getValidateTo().get(Calendar.MONTH)); assertEquals(31, integrationDefinition.getValidateTo().get(Calendar.DAY_OF_MONTH)); assertEquals(23, integrationDefinition.getValidateTo().get(Calendar.HOUR_OF_DAY)); assertEquals(59, integrationDefinition.getValidateTo().get(Calendar.MINUTE)); assertEquals(59, integrationDefinition.getValidateTo().get(Calendar.SECOND)); }
public IntegrationDefinition getIntegrationDefinition(String id) { LOGGER.debug("get IntegrationDefinition (id = \"{}\")", id); IntegrationDefinition integrationDefinition = (IntegrationDefinition) getHibernateTemplate().get(IntegrationDefinition.class, id); LOGGER.debug("get IntegrationDefinition (id = \"{}\") = {}", id, integrationDefinition); return integrationDefinition; }
HibernateIntegrationDefinitionDao extends HibernateDaoSupport implements IntegrationDefinitionDao { public IntegrationDefinition getIntegrationDefinition(String id) { LOGGER.debug("get IntegrationDefinition (id = \"{}\")", id); IntegrationDefinition integrationDefinition = (IntegrationDefinition) getHibernateTemplate().get(IntegrationDefinition.class, id); LOGGER.debug("get IntegrationDefinition (id = \"{}\") = {}", id, integrationDefinition); return integrationDefinition; } }
HibernateIntegrationDefinitionDao extends HibernateDaoSupport implements IntegrationDefinitionDao { public IntegrationDefinition getIntegrationDefinition(String id) { LOGGER.debug("get IntegrationDefinition (id = \"{}\")", id); IntegrationDefinition integrationDefinition = (IntegrationDefinition) getHibernateTemplate().get(IntegrationDefinition.class, id); LOGGER.debug("get IntegrationDefinition (id = \"{}\") = {}", id, integrationDefinition); return integrationDefinition; }  }
HibernateIntegrationDefinitionDao extends HibernateDaoSupport implements IntegrationDefinitionDao { public IntegrationDefinition getIntegrationDefinition(String id) { LOGGER.debug("get IntegrationDefinition (id = \"{}\")", id); IntegrationDefinition integrationDefinition = (IntegrationDefinition) getHibernateTemplate().get(IntegrationDefinition.class, id); LOGGER.debug("get IntegrationDefinition (id = \"{}\") = {}", id, integrationDefinition); return integrationDefinition; }  IntegrationDefinition getIntegrationDefinition(String id); @SuppressWarnings("unchecked") List<IntegrationDefinition> getIntegrationDefinitionOfConsumer(String consumerOrganizationId, String consumerSystemId); @SuppressWarnings("unchecked") List<IntegrationDefinition> getIntegrationDefinitionOfProvider(String providerOrganizationId, String providerSystemId); }
HibernateIntegrationDefinitionDao extends HibernateDaoSupport implements IntegrationDefinitionDao { public IntegrationDefinition getIntegrationDefinition(String id) { LOGGER.debug("get IntegrationDefinition (id = \"{}\")", id); IntegrationDefinition integrationDefinition = (IntegrationDefinition) getHibernateTemplate().get(IntegrationDefinition.class, id); LOGGER.debug("get IntegrationDefinition (id = \"{}\") = {}", id, integrationDefinition); return integrationDefinition; }  IntegrationDefinition getIntegrationDefinition(String id); @SuppressWarnings("unchecked") List<IntegrationDefinition> getIntegrationDefinitionOfConsumer(String consumerOrganizationId, String consumerSystemId); @SuppressWarnings("unchecked") List<IntegrationDefinition> getIntegrationDefinitionOfProvider(String providerOrganizationId, String providerSystemId);  }