* Converts a data record of a player's statistics into a player stats entity.
*
* @param record the record to convert
*/
private void convertRecordToPlayerStats(final String[] record) {
final PlayerStats playerStats = new PlayerStats();
playerStats.setPlayer(players.get(new Long(record[AttributePosition.ID])));
playerStats.setNumber(new Integer(record[AttributePosition.NUMBER]));
// is training filled?
final String training = record[AttributePosition.TRAINING];
playerStats.setTraining(StringUtils.isEmpty(training) ? null : training);
// erase apostrophe in strength value
final String strength = StringUtils.remove(record[AttributePosition.STRENGTH], '\'');
playerStats.setAverageStrength(new Float(strength));
playerStats.setPosition(Position.valueOf(record[AttributePosition.POSITION]));
playerStats.setForm(new Integer(record[AttributePosition.FORM]));
playerStats.setEnergy(new Integer(record[AttributePosition.ENERGY]));
playerStats.setEndurance(new Integer(record[AttributePosition.ENDURANCE]));
playerStats.setExperience(new Integer(record[AttributePosition.EXPERIENCE]));
playerStats.setSkillGoalkeeping(new Integer(record[AttributePosition.SKILL_GOALKEEPING]));
playerStats.setSkillTackling(new Integer(record[AttributePosition.SKILL_TACKLING]));
playerStats.setSkillPlaymaking(new Integer(record[AttributePosition.SKILL_PLAYMAKING]));
playerStats.setSkillPassing(new Integer(record[AttributePosition.SKILL_PASSING]));
playerStats.setSkillScoring(new Integer(record[AttributePosition.SKILL_SCORING]));
playerStats.setTalent(record[AttributePosition.TALENT]);
playerStats.setTalentLevel(new Integer(record[AttributePosition.TALENT_LEVEL]));
playerStats.setAge(new Integer(record[AttributePosition.AGE]));
playerStats.setSalary(new Integer(record[AttributePosition.SALARY]));
playerStats.setAssignments(new Integer(record[AttributePosition.ASSIGNMENTS]));
playerStats.setGoalsSeason(new Integer(record[AttributePosition.GOALS_SEASON]));
playerStats.setGoalsTotal(new Integer(record[AttributePosition.GOALS_TOTAL]));
// is market value filled?
final String marketValue = record[AttributePosition.MARKET_VALUE];
playerStats.setMarketValue(StringUtils.isEmpty(marketValue) ? null : new Integer(marketValue));
playerStats.setYellowCardsSeason(new Integer(record[AttributePosition.YELLOW_CARDS_SEASON]));
playerStats.setYellowCardsTotal(new Integer(record[AttributePosition.YELLOW_CARDS_TOTAL]));
playerStats.setRedCardsSeason(new Integer(record[AttributePosition.RED_CARDS_SEASON]));
playerStats.setRedCardsTotal(new Integer(record[AttributePosition.RED_CARDS_TOTAL]));
playerStats.setImportDate(importDate);
stats.put(playerStats.getPlayer().getId(), playerStats);
}