@Test public void testReadOfConsumerSucceeds() throws Exception { List<IntegrationDefinition> list = dao.getIntegrationDefinitionOfConsumer("00000000", "00000000"); assertEquals(2, list.size()); assertEquals("1", list.get(0).getId()); assertTrue(list.get(0).isValid()); assertEquals("2", list.get(1).getId()); assertTrue(list.get(1).isValid()); }
@SuppressWarnings("unchecked") public List<IntegrationDefinition> getIntegrationDefinitionOfConsumer(String consumerOrganizationId, String consumerSystemId) { LOGGER.debug("get IntegrationDefinition of Consumer(organizationId = \"{}\", systemId = \"{}\")", consumerOrganizationId, consumerSystemId); List<IntegrationDefinition> list = (List<IntegrationDefinition>) getHibernateTemplate().find( "from IntegrationDefinition as integrationDefinition " + "where integrationDefinition.consumer.organization.id = ? " + "and integrationDefinition.consumer.id = ?", new Object[] { consumerOrganizationId, consumerSystemId }); if (LOGGER.isDebugEnabled()) { LOGGER.debug("get IntegrationDefinition of Consumer(organizationId = \"{}\", systemId = \"{}\")'s size = {}", consumerOrganizationId, consumerSystemId, list.size()); int i = 0; for (IntegrationDefinition integrationDefinition : list) { LOGGER.debug("[{}] : {}", i, integrationDefinition); i++; } } return list; }
HibernateIntegrationDefinitionDao extends HibernateDaoSupport implements IntegrationDefinitionDao { @SuppressWarnings("unchecked") public List<IntegrationDefinition> getIntegrationDefinitionOfConsumer(String consumerOrganizationId, String consumerSystemId) { LOGGER.debug("get IntegrationDefinition of Consumer(organizationId = \"{}\", systemId = \"{}\")", consumerOrganizationId, consumerSystemId); List<IntegrationDefinition> list = (List<IntegrationDefinition>) getHibernateTemplate().find( "from IntegrationDefinition as integrationDefinition " + "where integrationDefinition.consumer.organization.id = ? " + "and integrationDefinition.consumer.id = ?", new Object[] { consumerOrganizationId, consumerSystemId }); if (LOGGER.isDebugEnabled()) { LOGGER.debug("get IntegrationDefinition of Consumer(organizationId = \"{}\", systemId = \"{}\")'s size = {}", consumerOrganizationId, consumerSystemId, list.size()); int i = 0; for (IntegrationDefinition integrationDefinition : list) { LOGGER.debug("[{}] : {}", i, integrationDefinition); i++; } } return list; } }
HibernateIntegrationDefinitionDao extends HibernateDaoSupport implements IntegrationDefinitionDao { @SuppressWarnings("unchecked") public List<IntegrationDefinition> getIntegrationDefinitionOfConsumer(String consumerOrganizationId, String consumerSystemId) { LOGGER.debug("get IntegrationDefinition of Consumer(organizationId = \"{}\", systemId = \"{}\")", consumerOrganizationId, consumerSystemId); List<IntegrationDefinition> list = (List<IntegrationDefinition>) getHibernateTemplate().find( "from IntegrationDefinition as integrationDefinition " + "where integrationDefinition.consumer.organization.id = ? " + "and integrationDefinition.consumer.id = ?", new Object[] { consumerOrganizationId, consumerSystemId }); if (LOGGER.isDebugEnabled()) { LOGGER.debug("get IntegrationDefinition of Consumer(organizationId = \"{}\", systemId = \"{}\")'s size = {}", consumerOrganizationId, consumerSystemId, list.size()); int i = 0; for (IntegrationDefinition integrationDefinition : list) { LOGGER.debug("[{}] : {}", i, integrationDefinition); i++; } } return list; }  }
HibernateIntegrationDefinitionDao extends HibernateDaoSupport implements IntegrationDefinitionDao { @SuppressWarnings("unchecked") public List<IntegrationDefinition> getIntegrationDefinitionOfConsumer(String consumerOrganizationId, String consumerSystemId) { LOGGER.debug("get IntegrationDefinition of Consumer(organizationId = \"{}\", systemId = \"{}\")", consumerOrganizationId, consumerSystemId); List<IntegrationDefinition> list = (List<IntegrationDefinition>) getHibernateTemplate().find( "from IntegrationDefinition as integrationDefinition " + "where integrationDefinition.consumer.organization.id = ? " + "and integrationDefinition.consumer.id = ?", new Object[] { consumerOrganizationId, consumerSystemId }); if (LOGGER.isDebugEnabled()) { LOGGER.debug("get IntegrationDefinition of Consumer(organizationId = \"{}\", systemId = \"{}\")'s size = {}", consumerOrganizationId, consumerSystemId, list.size()); int i = 0; for (IntegrationDefinition integrationDefinition : list) { LOGGER.debug("[{}] : {}", i, integrationDefinition); i++; } } return list; }  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 { @SuppressWarnings("unchecked") public List<IntegrationDefinition> getIntegrationDefinitionOfConsumer(String consumerOrganizationId, String consumerSystemId) { LOGGER.debug("get IntegrationDefinition of Consumer(organizationId = \"{}\", systemId = \"{}\")", consumerOrganizationId, consumerSystemId); List<IntegrationDefinition> list = (List<IntegrationDefinition>) getHibernateTemplate().find( "from IntegrationDefinition as integrationDefinition " + "where integrationDefinition.consumer.organization.id = ? " + "and integrationDefinition.consumer.id = ?", new Object[] { consumerOrganizationId, consumerSystemId }); if (LOGGER.isDebugEnabled()) { LOGGER.debug("get IntegrationDefinition of Consumer(organizationId = \"{}\", systemId = \"{}\")'s size = {}", consumerOrganizationId, consumerSystemId, list.size()); int i = 0; for (IntegrationDefinition integrationDefinition : list) { LOGGER.debug("[{}] : {}", i, integrationDefinition); i++; } } return list; }  IntegrationDefinition getIntegrationDefinition(String id); @SuppressWarnings("unchecked") List<IntegrationDefinition> getIntegrationDefinitionOfConsumer(String consumerOrganizationId, String consumerSystemId); @SuppressWarnings("unchecked") List<IntegrationDefinition> getIntegrationDefinitionOfProvider(String providerOrganizationId, String providerSystemId);  }