Package org.springframework.batch.sample.domain.football

Examples of org.springframework.batch.sample.domain.football.PlayerSummary


   * @see org.springframework.jdbc.core.RowMapper#mapRow(java.sql.ResultSet, int)
   */
  @Override
  public PlayerSummary mapRow(ResultSet rs, int rowNum) throws SQLException {
   
    PlayerSummary summary = new PlayerSummary();
   
    summary.setId(rs.getString(1));
    summary.setYear(rs.getInt(2));
    summary.setCompletes(rs.getInt(3));
    summary.setAttempts(rs.getInt(4));
    summary.setPassingYards(rs.getInt(5));
    summary.setPassingTd(rs.getInt(6));
    summary.setInterceptions(rs.getInt(7));
    summary.setRushes(rs.getInt(8));
    summary.setRushYards(rs.getInt(9));
    summary.setReceptions(rs.getInt(10));
    summary.setReceptionYards(rs.getInt(11));
    summary.setTotalTd(rs.getInt(12));
   
    return summary;
  }
View Full Code Here


   * @see org.springframework.jdbc.core.RowMapper#mapRow(java.sql.ResultSet, int)
   */
  @Override
  public PlayerSummary mapRow(ResultSet rs, int rowNum) throws SQLException {
   
    PlayerSummary summary = new PlayerSummary();
   
    summary.setId(rs.getString(1));
    summary.setYear(rs.getInt(2));
    summary.setCompletes(rs.getInt(3));
    summary.setAttempts(rs.getInt(4));
    summary.setPassingYards(rs.getInt(5));
    summary.setPassingTd(rs.getInt(6));
    summary.setInterceptions(rs.getInt(7));
    summary.setRushes(rs.getInt(8));
    summary.setRushYards(rs.getInt(9));
    summary.setReceptions(rs.getInt(10));
    summary.setReceptionYards(rs.getInt(11));
    summary.setTotalTd(rs.getInt(12));
   
    return summary;
  }
View Full Code Here

  public void init(DataSource dataSource) {
    this.jdbcTemplate = new JdbcTemplate(dataSource);
    playerSummaryDao = new JdbcPlayerSummaryDao();
    playerSummaryDao.setDataSource(dataSource);

    summary = new PlayerSummary();
    summary.setId("AikmTr00");
    summary.setYear(1997);
    summary.setCompletes(294);
    summary.setAttempts(517);
    summary.setPassingYards(3283);
View Full Code Here

  @Test
  @Transactional
  public void testWrite() {
    playerSummaryDao.write(Collections.singletonList(summary));

    PlayerSummary testSummary = jdbcTemplate.queryForObject("SELECT * FROM PLAYER_SUMMARY",
        new PlayerSummaryMapper());

    assertEquals(summary, testSummary);
  }
View Full Code Here

TOP

Related Classes of org.springframework.batch.sample.domain.football.PlayerSummary

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.