@Test public void singleClientConfigurationThatDoesNotExist() { DbLoadedSamlClientConfigurationDto cfg = templateUnderTest.loadClient("DoesNotExist"); assertNull(cfg); }
@Override @Transactional(readOnly=true) public DbLoadedSamlClientConfigurationDto loadClient(final String clientName) { if (StringUtils.isBlank(clientName)) { throw new IllegalArgumentException("Client name must not be null or empty."); } final Object[] selectSingleClientParameters = new Object[] {environment, clientName}; final List<DbLoadedSamlClientConfigurationDto> configurations = template.query(selectSingleClientSqlText, selectSingleClientParameters, selectSingleClientParameterTypes, fullRowMapper); if ((configurations != null) && (!configurations.isEmpty())) { return configurations.get(0); } else { return null; } }
SpringJdbcTemplateSamlClientDaoImpl implements SamlClientDao { @Override @Transactional(readOnly=true) public DbLoadedSamlClientConfigurationDto loadClient(final String clientName) { if (StringUtils.isBlank(clientName)) { throw new IllegalArgumentException("Client name must not be null or empty."); } final Object[] selectSingleClientParameters = new Object[] {environment, clientName}; final List<DbLoadedSamlClientConfigurationDto> configurations = template.query(selectSingleClientSqlText, selectSingleClientParameters, selectSingleClientParameterTypes, fullRowMapper); if ((configurations != null) && (!configurations.isEmpty())) { return configurations.get(0); } else { return null; } } }
SpringJdbcTemplateSamlClientDaoImpl implements SamlClientDao { @Override @Transactional(readOnly=true) public DbLoadedSamlClientConfigurationDto loadClient(final String clientName) { if (StringUtils.isBlank(clientName)) { throw new IllegalArgumentException("Client name must not be null or empty."); } final Object[] selectSingleClientParameters = new Object[] {environment, clientName}; final List<DbLoadedSamlClientConfigurationDto> configurations = template.query(selectSingleClientSqlText, selectSingleClientParameters, selectSingleClientParameterTypes, fullRowMapper); if ((configurations != null) && (!configurations.isEmpty())) { return configurations.get(0); } else { return null; } } SpringJdbcTemplateSamlClientDaoImpl(final DataSource dataSource, final LobHandler lobHandler, final String tableName, final String environment); }
SpringJdbcTemplateSamlClientDaoImpl implements SamlClientDao { @Override @Transactional(readOnly=true) public DbLoadedSamlClientConfigurationDto loadClient(final String clientName) { if (StringUtils.isBlank(clientName)) { throw new IllegalArgumentException("Client name must not be null or empty."); } final Object[] selectSingleClientParameters = new Object[] {environment, clientName}; final List<DbLoadedSamlClientConfigurationDto> configurations = template.query(selectSingleClientSqlText, selectSingleClientParameters, selectSingleClientParameterTypes, fullRowMapper); if ((configurations != null) && (!configurations.isEmpty())) { return configurations.get(0); } else { return null; } } SpringJdbcTemplateSamlClientDaoImpl(final DataSource dataSource, final LobHandler lobHandler, final String tableName, final String environment); @Override @Transactional(readOnly=true) List<String> loadClientNames(); @Override @Transactional(readOnly=true) List<DbLoadedSamlClientConfigurationDto> loadAllClients(); @Override @Transactional(readOnly=true) DbLoadedSamlClientConfigurationDto loadClient(final String clientName); }
SpringJdbcTemplateSamlClientDaoImpl implements SamlClientDao { @Override @Transactional(readOnly=true) public DbLoadedSamlClientConfigurationDto loadClient(final String clientName) { if (StringUtils.isBlank(clientName)) { throw new IllegalArgumentException("Client name must not be null or empty."); } final Object[] selectSingleClientParameters = new Object[] {environment, clientName}; final List<DbLoadedSamlClientConfigurationDto> configurations = template.query(selectSingleClientSqlText, selectSingleClientParameters, selectSingleClientParameterTypes, fullRowMapper); if ((configurations != null) && (!configurations.isEmpty())) { return configurations.get(0); } else { return null; } } SpringJdbcTemplateSamlClientDaoImpl(final DataSource dataSource, final LobHandler lobHandler, final String tableName, final String environment); @Override @Transactional(readOnly=true) List<String> loadClientNames(); @Override @Transactional(readOnly=true) List<DbLoadedSamlClientConfigurationDto> loadAllClients(); @Override @Transactional(readOnly=true) DbLoadedSamlClientConfigurationDto loadClient(final String clientName);  }