@Test public void testFetchAllByYear_2016() { log.info("*** BEGIN Test ***"); Integer year = 2016; List<SeasonData> results = classUnderTest.fetchAllByYear(year); assertEquals(68, results.size()); log.info("*** END Test ***"); }
@Override public List<SeasonData> fetchAllByYear(Integer year) { List<SeasonData> ret = null; String sql = "SELECT t.* FROM " + TABLE_NAME + " t WHERE t.year = ?"; Object[] args = { year }; ret = getJdbcTemplate().query(sql, args, new SeasonDataRowMapper()); return ret; }
SeasonDataJdbcDao extends JdbcDaoSupport implements SeasonDataDao { @Override public List<SeasonData> fetchAllByYear(Integer year) { List<SeasonData> ret = null; String sql = "SELECT t.* FROM " + TABLE_NAME + " t WHERE t.year = ?"; Object[] args = { year }; ret = getJdbcTemplate().query(sql, args, new SeasonDataRowMapper()); return ret; } }
SeasonDataJdbcDao extends JdbcDaoSupport implements SeasonDataDao { @Override public List<SeasonData> fetchAllByYear(Integer year) { List<SeasonData> ret = null; String sql = "SELECT t.* FROM " + TABLE_NAME + " t WHERE t.year = ?"; Object[] args = { year }; ret = getJdbcTemplate().query(sql, args, new SeasonDataRowMapper()); return ret; } SeasonDataJdbcDao(DataSource dataSource); }
SeasonDataJdbcDao extends JdbcDaoSupport implements SeasonDataDao { @Override public List<SeasonData> fetchAllByYear(Integer year) { List<SeasonData> ret = null; String sql = "SELECT t.* FROM " + TABLE_NAME + " t WHERE t.year = ?"; Object[] args = { year }; ret = getJdbcTemplate().query(sql, args, new SeasonDataRowMapper()); return ret; } SeasonDataJdbcDao(DataSource dataSource); @Override List<SeasonData> fetchAllByYear(Integer year); @Override SeasonData fetchByYearAndTeamName(Integer year, String teamName); }
SeasonDataJdbcDao extends JdbcDaoSupport implements SeasonDataDao { @Override public List<SeasonData> fetchAllByYear(Integer year) { List<SeasonData> ret = null; String sql = "SELECT t.* FROM " + TABLE_NAME + " t WHERE t.year = ?"; Object[] args = { year }; ret = getJdbcTemplate().query(sql, args, new SeasonDataRowMapper()); return ret; } SeasonDataJdbcDao(DataSource dataSource); @Override List<SeasonData> fetchAllByYear(Integer year); @Override SeasonData fetchByYearAndTeamName(Integer year, String teamName);  }