com.stratelia.webactiv.util.answer.control
Class AnswerBmEJB

java.lang.Object
  extended by com.stratelia.webactiv.util.answer.control.AnswerBmEJB
All Implemented Interfaces:
AnswerBm

public class AnswerBmEJB
extends Object
implements AnswerBm

Answer Business Manager See AnswerBm for methods documentation

Author:
neysseri

Constructor Summary
AnswerBmEJB()
           
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnswerBmEJB

public AnswerBmEJB()
Method Detail

getAnswersByQuestionPK

public Collection<Answer> getAnswersByQuestionPK(ForeignPK questionPK)
Description copied from interface: AnswerBm
Get answers which composed the question

Specified by:
getAnswersByQuestionPK in interface AnswerBm
Parameters:
questionPK - the QuestionPK (question id)
Returns:
a Collection of Answer

recordThisAnswerAsVote

public void recordThisAnswerAsVote(ForeignPK questionPK,
                                   AnswerPK answerPK)
Description copied from interface: AnswerBm
Record that the answer (answerPK) has been chosen to the question (questionPK)

Specified by:
recordThisAnswerAsVote in interface AnswerBm
Parameters:
questionPK - the QuestionPK (question id)
answerPK - the AnswerPK (answer id)

addAnswersToAQuestion

public void addAnswersToAQuestion(Collection<Answer> answers,
                                  ForeignPK questionPK)
Description copied from interface: AnswerBm
Add some answers to a question

Specified by:
addAnswersToAQuestion in interface AnswerBm
Parameters:
answers - a Collection of Answer
questionPK - the QuestionPK (question id)

addAnswerToAQuestion

public void addAnswerToAQuestion(Answer answer,
                                 ForeignPK questionPK)
Description copied from interface: AnswerBm
Add an answer to a question

Specified by:
addAnswerToAQuestion in interface AnswerBm
Parameters:
answer - the Answer
questionPK - the QuestionPK (question id)

deleteAnswersToAQuestion

public void deleteAnswersToAQuestion(ForeignPK questionPK)
Description copied from interface: AnswerBm
Delete all answers to a given question

Specified by:
deleteAnswersToAQuestion in interface AnswerBm
Parameters:
questionPK - the QuestionPK (question id)

deleteAnswerToAQuestion

public void deleteAnswerToAQuestion(ForeignPK questionPK,
                                    String answerId)
Description copied from interface: AnswerBm
Delete an answer to a question

Specified by:
deleteAnswerToAQuestion in interface AnswerBm
Parameters:
questionPK - the QuestionPK (question id)
answerId - the answer id

updateAnswerToAQuestion

public void updateAnswerToAQuestion(ForeignPK questionPK,
                                    Answer answer)
Description copied from interface: AnswerBm
Update an answer to a question

Specified by:
updateAnswerToAQuestion in interface AnswerBm
Parameters:
questionPK - the QuestionPK (question id)
answer - the Answer


Copyright © 2016 Silverpeas. All Rights Reserved.