Interface QuestionResultService
-
- All Known Implementing Classes:
DefaultQuestionResultService
public interface QuestionResultService
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddeleteQuestionResultsToQuestion(ResourceReference questionPK)Delete all results for a questionstatic QuestionResultServiceget()Collection<QuestionResult>getQuestionResultToQuestion(ResourceReference questionPK)Return all result to a given questionCollection<QuestionResult>getQuestionResultToQuestionByParticipation(ResourceReference questionPK, int participationId)Return all result to a given question for a given participationResultsgetResultsOfQuestions(List<ResourceReference> pks)QuestionResultgetUserAnswerToQuestion(String userId, ResourceReference questionPK, AnswerPK answerPK)Return result for a question and an answer of a userCollection<QuestionResult>getUserQuestionResultsToQuestion(String userId, ResourceReference questionPK)Return all user result to a given questionCollection<QuestionResult>getUserQuestionResultsToQuestionByParticipation(String userId, ResourceReference questionPK, int participationId)Return all user result to a given question for a given participationCollection<String>getUsersByAnswer(String answerId)Return all users by a answervoidsetQuestionResultsToUser(Collection<QuestionResult> results)Store responses given by a uservoidsetQuestionResultToUser(QuestionResult result)Store response given by a user
-
-
-
Method Detail
-
get
static QuestionResultService get()
-
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 idparticipationId- 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 iduserId- 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 idquestionPK- the Question idparticipationId- 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 idquestionPK- the question idanswerPK- the answer id
-
getResultsOfQuestions
Results getResultsOfQuestions(List<ResourceReference> pks)
-
-