@Test public void shouldReturnFilteredListOfParameterNames() { database().withParameters(5).build(); ParameterDAO parameterDAO = get(ParameterDAO.class); ParameterFilter filter = new ParameterFilter("*4"); List<String> parameters = parameterDAO.getParameterNames(filter); assertThat(parameters).containsExactly("parameter4"); }
public Set<String> getParameterNames() { SelectQuery query = QueryFactory.select("name").from(configuration.parameterEntityName()); return new HashSet<String>(simpleQueryRunner.queryList(query, new StringMapper())); }
ParameterDAO { public Set<String> getParameterNames() { SelectQuery query = QueryFactory.select("name").from(configuration.parameterEntityName()); return new HashSet<String>(simpleQueryRunner.queryList(query, new StringMapper())); } }
ParameterDAO { public Set<String> getParameterNames() { SelectQuery query = QueryFactory.select("name").from(configuration.parameterEntityName()); return new HashSet<String>(simpleQueryRunner.queryList(query, new StringMapper())); } ParameterDAO(JdbcConfig configuration, SimpleQueryRunner simpleQueryRunner); }
ParameterDAO { public Set<String> getParameterNames() { SelectQuery query = QueryFactory.select("name").from(configuration.parameterEntityName()); return new HashSet<String>(simpleQueryRunner.queryList(query, new StringMapper())); } ParameterDAO(JdbcConfig configuration, SimpleQueryRunner simpleQueryRunner); long insert(QueryRunner queryRunner, Parameter parameter); void delete(QueryRunner queryRunner, String parameterName); Set<String> getParameterNames(); List<String> getParameterNames(ParameterFilter filter); JdbcParameter getParameter(QueryRunner queryRunner, String parameterName); boolean parameterExists(String parameterName); void update(QueryRunner queryRunner, String parameterName, Parameter parameter); }
ParameterDAO { public Set<String> getParameterNames() { SelectQuery query = QueryFactory.select("name").from(configuration.parameterEntityName()); return new HashSet<String>(simpleQueryRunner.queryList(query, new StringMapper())); } ParameterDAO(JdbcConfig configuration, SimpleQueryRunner simpleQueryRunner); long insert(QueryRunner queryRunner, Parameter parameter); void delete(QueryRunner queryRunner, String parameterName); Set<String> getParameterNames(); List<String> getParameterNames(ParameterFilter filter); JdbcParameter getParameter(QueryRunner queryRunner, String parameterName); boolean parameterExists(String parameterName); void update(QueryRunner queryRunner, String parameterName, Parameter parameter);  }