@Test public void shouldDeleteAllEntriesOfParameter() { database().withParameter("parameter").withLevels("parameter", 5).withParameterEntries("parameter", 5).build(); SimpleJdbcRepository repository = get(SimpleJdbcRepository.class); QueryRunner runner = queryRunner(); repository.deleteParameterEntries(runner, "parameter"); runner.close(); assertDatabase().hasNoEntriesForParameter("parameter").close(); }
@Override public void deleteParameterEntries(QueryRunner runner, Iterable<Long> entriesIds) { parameterEntryDAO.delete(runner, entriesIds); }
SimpleJdbcRepository implements JdbcRepository { @Override public void deleteParameterEntries(QueryRunner runner, Iterable<Long> entriesIds) { parameterEntryDAO.delete(runner, entriesIds); } }
SimpleJdbcRepository implements JdbcRepository { @Override public void deleteParameterEntries(QueryRunner runner, Iterable<Long> entriesIds) { parameterEntryDAO.delete(runner, entriesIds); } SimpleJdbcRepository(JdbcConfig configuration, ParameterDAO parameterDAO, LevelDAO levelDAO, ParameterEntryDAO parameterEntryDAO); }
SimpleJdbcRepository implements JdbcRepository { @Override public void deleteParameterEntries(QueryRunner runner, Iterable<Long> entriesIds) { parameterEntryDAO.delete(runner, entriesIds); } SimpleJdbcRepository(JdbcConfig configuration, ParameterDAO parameterDAO, LevelDAO levelDAO, ParameterEntryDAO parameterEntryDAO); @Override long createParameter(QueryRunner runner, Parameter parameter); @Override boolean parameterExists(QueryRunner runner, String parameterName); @Override JdbcParameter getParameter(QueryRunner runner, String parameterName); @Override JdbcParameter getParameterMetadata(QueryRunner runner, String parameterName); @Override Set<String> listParameterNames(); @Override List<String> listParameterNames(ParameterFilter filter); @Override Set<ParameterEntry> getParameterEntries(QueryRunner runner, String parameterName); @Override List<Long> writeParameterEntries(QueryRunner runner, String parameterName, Iterable<ParameterEntry> entries); @Override void deleteParameter(QueryRunner runner, String parameterName); @Override void updateParameter(QueryRunner runner, String parameterName, Parameter parameter); @Override long addLevel(QueryRunner runner, String parameterName, Level level); @Override void updateLevel(QueryRunner runner, long levelId, Level level); @Override void reorderLevels(QueryRunner runner, long[] orderedLevelIds); @Override void deleteLevel(QueryRunner queryRunner, String parameterName, long levelId); @Override List<ParameterEntry> getEntries(QueryRunner runner, List<Long> ids); @Override List<ParameterEntry> listEntries(QueryRunner runner, String parameterName, ParameterEntriesFilter filter); @Override long addParameterEntry(QueryRunner runner, String parameterName, ParameterEntry entry); @Override void updateParameterEntry(QueryRunner runner, long entryId, ParameterEntry entry); @Override void deleteParameterEntry(QueryRunner runner, long entryId); @Override void deleteParameterEntries(QueryRunner runner, Iterable<Long> entriesIds); @Override void deleteParameterEntries(QueryRunner runner, String parameterName); }
SimpleJdbcRepository implements JdbcRepository { @Override public void deleteParameterEntries(QueryRunner runner, Iterable<Long> entriesIds) { parameterEntryDAO.delete(runner, entriesIds); } SimpleJdbcRepository(JdbcConfig configuration, ParameterDAO parameterDAO, LevelDAO levelDAO, ParameterEntryDAO parameterEntryDAO); @Override long createParameter(QueryRunner runner, Parameter parameter); @Override boolean parameterExists(QueryRunner runner, String parameterName); @Override JdbcParameter getParameter(QueryRunner runner, String parameterName); @Override JdbcParameter getParameterMetadata(QueryRunner runner, String parameterName); @Override Set<String> listParameterNames(); @Override List<String> listParameterNames(ParameterFilter filter); @Override Set<ParameterEntry> getParameterEntries(QueryRunner runner, String parameterName); @Override List<Long> writeParameterEntries(QueryRunner runner, String parameterName, Iterable<ParameterEntry> entries); @Override void deleteParameter(QueryRunner runner, String parameterName); @Override void updateParameter(QueryRunner runner, String parameterName, Parameter parameter); @Override long addLevel(QueryRunner runner, String parameterName, Level level); @Override void updateLevel(QueryRunner runner, long levelId, Level level); @Override void reorderLevels(QueryRunner runner, long[] orderedLevelIds); @Override void deleteLevel(QueryRunner queryRunner, String parameterName, long levelId); @Override List<ParameterEntry> getEntries(QueryRunner runner, List<Long> ids); @Override List<ParameterEntry> listEntries(QueryRunner runner, String parameterName, ParameterEntriesFilter filter); @Override long addParameterEntry(QueryRunner runner, String parameterName, ParameterEntry entry); @Override void updateParameterEntry(QueryRunner runner, long entryId, ParameterEntry entry); @Override void deleteParameterEntry(QueryRunner runner, long entryId); @Override void deleteParameterEntries(QueryRunner runner, Iterable<Long> entriesIds); @Override void deleteParameterEntries(QueryRunner runner, String parameterName);  }