return null;
}
final Campaign campaign = summary.getCampaign();
final User master = summary.getMaster();
final CampaignSummaryDTO dto = new CampaignSummaryDTO();
dto.setId(campaign.getKey().getId());
dto.setName(campaign.getName());
dto.setGame(campaign.getGame());
dto.setIcon(campaign.getIcon());
dto.setNotifications(mapNotification(
summary.getNotifications(), NotificationType.CAMPAIGN));
dto.setCreationDate(campaign.getDate());
dto.setGameMasterNickname(master == null ? null : master.getNickname());
dto.setGame(campaign.getGame());
// iterate to keep only the names.
final List<Data.Character> characters = summary.getCharacters();
if(characters != null) {
final List<String> names = new ArrayList<String>();
for(Data.Character character : characters) {
names.add(character.getName());
}
dto.setCharacters(names.isEmpty() ? null : names);
}
return dto;
}