Interface QuestionResultService

    • Method Detail

      • getQuestionResultToQuestion

        Collection<QuestionResult> getQuestionResultToQuestion​(ResourceReference questionPK)
        Return all result to a given question
        Parameters:
        questionPK - the Question id
        Returns:
        a QuestionResult Collection
      • getQuestionResultToQuestionByParticipation

        Collection<QuestionResult> getQuestionResultToQuestionByParticipation​(ResourceReference questionPK,
                                                                              int participationId)
        Return all result to a given question for a given participation
        Parameters:
        questionPK - the Question id
        participationId - the number of the participation
        Returns:
        a QuestionResult Collection
      • getUserQuestionResultsToQuestion

        Collection<QuestionResult> getUserQuestionResultsToQuestion​(String userId,
                                                                    ResourceReference questionPK)
        Return all user result to a given question
        Parameters:
        questionPK - the Question id
        userId - the user id
        Returns:
        a QuestionResult Collection
      • getUsersByAnswer

        Collection<String> getUsersByAnswer​(String answerId)
        Return all users by a answer
        Parameters:
        answerId - the Answer id
        Returns:
        a String Collection
      • getUserQuestionResultsToQuestionByParticipation

        Collection<QuestionResult> getUserQuestionResultsToQuestionByParticipation​(String userId,
                                                                                   ResourceReference questionPK,
                                                                                   int participationId)
        Return all user result to a given question for a given participation
        Parameters:
        userId - the user id
        questionPK - the Question id
        participationId - the number of the participation
        Returns:
        a QuestionResult Collection
      • setQuestionResultToUser

        void setQuestionResultToUser​(QuestionResult result)
        Store response given by a user
        Parameters:
        result - the QuestionResult
      • setQuestionResultsToUser

        void setQuestionResultsToUser​(Collection<QuestionResult> results)
        Store responses given by a user
        Parameters:
        results - a Collection of QuestionResult
      • deleteQuestionResultsToQuestion

        void deleteQuestionResultsToQuestion​(ResourceReference questionPK)
        Delete all results for a question
        Parameters:
        questionPK - the question id
      • getUserAnswerToQuestion

        QuestionResult getUserAnswerToQuestion​(String userId,
                                               ResourceReference questionPK,
                                               AnswerPK answerPK)
        Return result for a question and an answer of a user
        Parameters:
        userId - the user id
        questionPK - the question id
        answerPK - the answer id