@Test public void testFetchAllByYear_2014() { log.info("*** BEGIN Test ***"); Integer year = 2014; List<TournamentResult> results = classUnderTest.fetchAllByYear(year); assertEquals(67, results.size()); log.info("*** END Test ***"); }
@Override public List<TournamentResult> fetchAllByYear(Integer year) { String sql = "SELECT t.* FROM " + TABLE_NAME + " t WHERE t.year = ? ORDER BY t.game_date"; Object[] args = { year }; List<TournamentResult> results = getJdbcTemplate().query(sql, new TournamentResultRowMapper(), args); return results; }
TournamentResultJdbcDao extends JdbcDaoSupport implements TournamentResultDao { @Override public List<TournamentResult> fetchAllByYear(Integer year) { String sql = "SELECT t.* FROM " + TABLE_NAME + " t WHERE t.year = ? ORDER BY t.game_date"; Object[] args = { year }; List<TournamentResult> results = getJdbcTemplate().query(sql, new TournamentResultRowMapper(), args); return results; } }
TournamentResultJdbcDao extends JdbcDaoSupport implements TournamentResultDao { @Override public List<TournamentResult> fetchAllByYear(Integer year) { String sql = "SELECT t.* FROM " + TABLE_NAME + " t WHERE t.year = ? ORDER BY t.game_date"; Object[] args = { year }; List<TournamentResult> results = getJdbcTemplate().query(sql, new TournamentResultRowMapper(), args); return results; } TournamentResultJdbcDao(DataSource dataSource); }
TournamentResultJdbcDao extends JdbcDaoSupport implements TournamentResultDao { @Override public List<TournamentResult> fetchAllByYear(Integer year) { String sql = "SELECT t.* FROM " + TABLE_NAME + " t WHERE t.year = ? ORDER BY t.game_date"; Object[] args = { year }; List<TournamentResult> results = getJdbcTemplate().query(sql, new TournamentResultRowMapper(), args); return results; } TournamentResultJdbcDao(DataSource dataSource); @Override List<TournamentResult> fetchAllByYear(Integer year); }
TournamentResultJdbcDao extends JdbcDaoSupport implements TournamentResultDao { @Override public List<TournamentResult> fetchAllByYear(Integer year) { String sql = "SELECT t.* FROM " + TABLE_NAME + " t WHERE t.year = ? ORDER BY t.game_date"; Object[] args = { year }; List<TournamentResult> results = getJdbcTemplate().query(sql, new TournamentResultRowMapper(), args); return results; } TournamentResultJdbcDao(DataSource dataSource); @Override List<TournamentResult> fetchAllByYear(Integer year);  }