Beispiel #1
0
 public List<MetaData> getMetaData(String blankId) {
   List<QuestionEntity> questionEntities = questionDao.findWithoutGroup(blankId);
   ArrayList<MetaData> metaDatas = new ArrayList<>();
   for (QuestionEntity questionEntity : questionEntities) {
     ArrayList<Choice> choices = new ArrayList<>();
     for (ChoiceEntity choiceEntity : questionEntity.getChoices())
       choices.add(
           new Choice(choiceEntity.getId(), choiceEntity.getCode(), choiceEntity.getText()));
     metaDatas.add(
         new MetaData(
             questionEntity.getId(),
             questionEntity.getCode(),
             questionEntity.getText(),
             questionEntity.getType(),
             questionEntity.getFormat(),
             choices));
   }
   return metaDatas;
 }