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

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


   
    if(fs == null){
      return null;
    }
   
    Game game = new Game();
    game.setId(fs.readString("id"));
    game.setYear(fs.readInt("year"));
    game.setTeam(fs.readString("team"));
    game.setWeek(fs.readInt("week"));
    game.setOpponent(fs.readString("opponent"));
    game.setCompletes(fs.readInt("completes"));
    game.setAttempts(fs.readInt("attempts"));
    game.setPassingYards(fs.readInt("passingYards"));
    game.setPassingTd(fs.readInt("passingTd"));
    game.setInterceptions(fs.readInt("interceptions"));
    game.setRushes(fs.readInt("rushes"));
    game.setRushYards(fs.readInt("rushYards"));
    game.setReceptions(fs.readInt("receptions", 0));
    game.setReceptionYards(fs.readInt("receptionYards"));
    game.setTotalTd(fs.readInt("totalTd"));
   
    return game;
  }
View Full Code Here


  @Transactional @Test
  public void testWrite() {
    gameDao.write(Collections.singletonList(game));

    Game tempGame = jdbcTemplate.queryForObject("SELECT * FROM GAMES where PLAYER_ID=? AND YEAR_NO=?",
        new GameRowMapper(), "XXXXX00 ", game.getYear());
    assertEquals(tempGame, game);
  }
View Full Code Here

    public Game mapRow(ResultSet rs, int arg1) throws SQLException {
      if (rs == null) {
        return null;
      }

      Game game = new Game();
      game.setId(rs.getString("PLAYER_ID").trim());
      game.setYear(rs.getInt("year_no"));
      game.setTeam(rs.getString("team"));
      game.setWeek(rs.getInt("week"));
      game.setOpponent(rs.getString("opponent"));
      game.setCompletes(rs.getInt("completes"));
      game.setAttempts(rs.getInt("attempts"));
      game.setPassingYards(rs.getInt("passing_Yards"));
      game.setPassingTd(rs.getInt("passing_Td"));
      game.setInterceptions(rs.getInt("interceptions"));
      game.setRushes(rs.getInt("rushes"));
      game.setRushYards(rs.getInt("rush_Yards"));
      game.setReceptions(rs.getInt("receptions"));
      game.setReceptionYards(rs.getInt("receptions_Yards"));
      game.setTotalTd(rs.getInt("total_Td"));

      return game;
    }
View Full Code Here

TOP

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

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.