Interface AnswerService
-
- All Known Implementing Classes:
DefaultAnswerService
public interface AnswerService
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addAnswersToAQuestion(Collection<Answer> answers, ResourceReference questionPK)
Add some answers to a questionvoid
addAnswerToAQuestion(Answer answer, ResourceReference questionPK)
Add an answer to a questionvoid
deleteAnswersToAQuestion(ResourceReference questionPK)
Delete all answers to a given questionvoid
deleteAnswerToAQuestion(ResourceReference questionPK, String answerId)
Delete an answer to a questionstatic AnswerService
get()
Collection<Answer>
getAnswersByQuestionPK(ResourceReference questionPK)
Get answers which composed the questionvoid
recordThisAnswerAsVote(ResourceReference questionPK, AnswerPK answerPK)
Record that the answer (answerPK) has been chosen to the question (questionPK)void
updateAnswerToAQuestion(ResourceReference questionPK, Answer answer)
Update an answer to a question
-
-
-
Method Detail
-
get
static AnswerService get()
-
getAnswersByQuestionPK
Collection<Answer> getAnswersByQuestionPK(ResourceReference questionPK)
Get answers which composed the question- Parameters:
questionPK
- the QuestionPK (question id)- Returns:
- a Collection of Answer
-
recordThisAnswerAsVote
void recordThisAnswerAsVote(ResourceReference questionPK, AnswerPK answerPK)
Record that the answer (answerPK) has been chosen to the question (questionPK)- Parameters:
questionPK
- the QuestionPK (question id)answerPK
- the AnswerPK (answer id)
-
addAnswersToAQuestion
void addAnswersToAQuestion(Collection<Answer> answers, ResourceReference questionPK)
Add some answers to a question- Parameters:
answers
- a Collection of AnswerquestionPK
- the QuestionPK (question id)
-
addAnswerToAQuestion
void addAnswerToAQuestion(Answer answer, ResourceReference questionPK)
Add an answer to a question- Parameters:
answer
- the AnswerquestionPK
- the QuestionPK (question id)
-
updateAnswerToAQuestion
void updateAnswerToAQuestion(ResourceReference questionPK, Answer answer)
Update an answer to a question- Parameters:
questionPK
- the QuestionPK (question id)answer
- the Answer
-
deleteAnswersToAQuestion
void deleteAnswersToAQuestion(ResourceReference questionPK)
Delete all answers to a given question- Parameters:
questionPK
- the QuestionPK (question id)
-
deleteAnswerToAQuestion
void deleteAnswerToAQuestion(ResourceReference questionPK, String answerId)
Delete an answer to a question- Parameters:
questionPK
- the QuestionPK (question id)answerId
- the answer id
-
-