com.stratelia.webactiv.util.answer.control
Interface AnswerBm

All Known Implementing Classes:
AnswerBmEJB

public interface AnswerBm


Method Summary
 void addAnswersToAQuestion(Collection<Answer> answers, ForeignPK questionPK)
          Add some answers to a question
 void addAnswerToAQuestion(Answer answer, ForeignPK questionPK)
          Add an answer to a question
 void deleteAnswersToAQuestion(ForeignPK questionPK)
          Delete all answers to a given question
 void deleteAnswerToAQuestion(ForeignPK questionPK, String answerId)
          Delete an answer to a question
 Collection<Answer> getAnswersByQuestionPK(ForeignPK questionPK)
          Get answers which composed the question
 void recordThisAnswerAsVote(ForeignPK questionPK, AnswerPK answerPK)
          Record that the answer (answerPK) has been chosen to the question (questionPK)
 void updateAnswerToAQuestion(ForeignPK questionPK, Answer answer)
          Update an answer to a question
 

Method Detail

getAnswersByQuestionPK

Collection<Answer> getAnswersByQuestionPK(ForeignPK questionPK)
Get answers which composed the question

Parameters:
con - the Connection
questionPK - the QuestionPK (question id)
Returns:
a Collection of Answer

recordThisAnswerAsVote

void recordThisAnswerAsVote(ForeignPK questionPK,
                            AnswerPK answerPK)
Record that the answer (answerPK) has been chosen to the question (questionPK)

Parameters:
con - the Connection
questionPK - the QuestionPK (question id)
answerPK - the AnswerPK (answer id)

addAnswersToAQuestion

void addAnswersToAQuestion(Collection<Answer> answers,
                           ForeignPK questionPK)
Add some answers to a question

Parameters:
con - the Connection
answers - a Collection of Answer
questionPK - the QuestionPK (question id)

addAnswerToAQuestion

void addAnswerToAQuestion(Answer answer,
                          ForeignPK questionPK)
Add an answer to a question

Parameters:
con - the Connection
answer - the Answer
questionPK - the QuestionPK (question id)

updateAnswerToAQuestion

void updateAnswerToAQuestion(ForeignPK questionPK,
                             Answer answer)
Update an answer to a question

Parameters:
con - the Connection
questionPK - the QuestionPK (question id)
answer - the Answer

deleteAnswersToAQuestion

void deleteAnswersToAQuestion(ForeignPK questionPK)
Delete all answers to a given question

Parameters:
con - the Connection
questionPK - the QuestionPK (question id)

deleteAnswerToAQuestion

void deleteAnswerToAQuestion(ForeignPK questionPK,
                             String answerId)
Delete an answer to a question

Parameters:
con - the Connection
questionPK - the QuestionPK (question id)
answerId - the answer id


Copyright © 2016 Silverpeas. All Rights Reserved.