Examples of QuestionsValue


Examples of se.inera.ifv.casebox.core.service.QuestionsValue

        FindAllQuestionsResponseType response = new FindAllQuestionsResponseType();
        try {
            String careUnit = parameters.getCareUnitId().getExtension();
            log.debug("FindAllQuestions called for careunit:" + careUnit);
           
            QuestionsValue questionValue = questionService.getQuestionsForCareUnit(careUnit);

            response.setResult(new ResultOfCall());
            response.getResult().setResultCode(ResultCodeEnum.OK);
            response.setQuestionsLeft(questionValue.getQuestionsLeft());
            response.setQuestions(new QuestionsType());

            for (Question q : questionValue.getQuestions()) {
                QuestionFromFkType questionFromFk = (QuestionFromFkType) q.getMessage();
                QuestionType qt = new QuestionType();
                qt.setId(q.getId().toString());
                qt.setReceivedDate(q.getArrived());
                qt.setQuestion(questionFromFk);

                response.getQuestions().getQuestion().add(qt);

                q.setStatusRetrieved();
            }

            log.debug("FindAllQuestions found " + questionValue.getQuestions().size() " questions for careunit " + careUnit);

        } catch (Exception e) {
            log.warn("Failed to handle FindAllQuestions", e);
            response.setResult(new ResultOfCall());
            response.getResult().setResultCode(ResultCodeEnum.ERROR);
View Full Code Here

Examples of se.inera.ifv.casebox.core.service.QuestionsValue

        for (Question q : questions) {
            q.setStatusRetrieved();
        }

        return new QuestionsValue(questions, questionsLeft);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.