use of org.motechproject.mots.domain.Choice in project mots by motech-implementations.
the class ModuleMapper method fromDto.
List<Choice> fromDto(List<ChoiceDto> choiceDtos) {
List<Choice> choices = new ArrayList<>();
if (choiceDtos != null) {
for (int i = 0; i < choiceDtos.size(); i++) {
Choice choice = fromDto(choiceDtos.get(i));
choice.setIsCorrect(BooleanUtils.isTrue(choice.getIsCorrect()));
choice.setChoiceId(i + 1);
choices.add(choice);
}
}
return choices;
}