* Converts a data record of a player into a player entity.
*
* @param record the record to convert
*/
private void convertRecordToPlayer(final String[] record) {
final Player player = new Player();
player.setId(new Long(record[AttributePosition.ID]));
player.setFirstName(record[AttributePosition.FIRSTNAME]);
player.setLastName(record[AttributePosition.LASTNAME]);
try {
player.setCountry(Country.valueOf(record[AttributePosition.COUNTRY]));
} catch (final IllegalArgumentException e) {
// TODO remove if all countries are provided
System.out.println("Country [" + record[AttributePosition.COUNTRY] + "] is missing in model.");
e.printStackTrace();
}
player.setHeight(new Integer(record[AttributePosition.HEIGHT]));
player.setPersonality(record[AttributePosition.PERSONALITY]);
player.setBirthday(record[AttributePosition.BIRTHDAY]);
player.setStrongFoot(StrongFoot.valueOf(record[AttributePosition.STRONG_FOOT].toUpperCase()));
player.setImportDate(importDate);
players.put(player.getId(), player);
}