Example #1
0
 @Override
 protected Player manageRow(String[] row) {
   Player player = playerRepository.getOne(getId(row));
   Position pos = player.getPosition();
   if (!pos.equals(getPosition(row))) {
     throw new RuntimeException("Invalid position for id");
   }
   player.setGoals(getGoals(row));
   return player;
 }
Example #2
0
 protected Position getPosition(String[] row) {
   return Position.valueOf(row[1]);
 }