com.stratelia.webactiv.util.questionResult.control
Interface QuestionResultBm

All Known Implementing Classes:
QuestionResultBmEJB

public interface QuestionResultBm


Method Summary
 void deleteQuestionResultsToQuestion(ForeignPK questionPK)
          Delete all results for a question
 Collection<QuestionResult> getQuestionResultToQuestion(ForeignPK questionPK)
          Return all result to a given question
 Collection<QuestionResult> getQuestionResultToQuestionByParticipation(ForeignPK questionPK, int participationId)
          Return all result to a given question for a given participation
 QuestionResult getUserAnswerToQuestion(String userId, ForeignPK questionPK, AnswerPK answerPK)
          Return result for a question and an answer of a user
 Collection<QuestionResult> getUserQuestionResultsToQuestion(String userId, ForeignPK questionPK)
          Return all user result to a given question
 Collection<QuestionResult> getUserQuestionResultsToQuestionByParticipation(String userId, ForeignPK questionPK, int participationId)
          Return all user result to a given question for a given participation
 Collection<String> getUsersByAnswer(String answerId)
          Return all users by a answer
 void setQuestionResultsToUser(Collection<QuestionResult> results)
          Store responses given by a user
 void setQuestionResultToUser(QuestionResult result)
          Store response given by a user
 

Method Detail

getQuestionResultToQuestion

Collection<QuestionResult> getQuestionResultToQuestion(ForeignPK questionPK)
Return all result to a given question

Parameters:
questionPK - the Question id
Returns:
a QuestionResult Collection

getQuestionResultToQuestionByParticipation

Collection<QuestionResult> getQuestionResultToQuestionByParticipation(ForeignPK 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,
                                                            ForeignPK 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,
                                                                           ForeignPK 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(ForeignPK questionPK)
Delete all results for a question

Parameters:
questionPK - the question id

getUserAnswerToQuestion

QuestionResult getUserAnswerToQuestion(String userId,
                                       ForeignPK 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


Copyright © 2016 Silverpeas. All Rights Reserved.