Interface QuestionService
-
- All Known Implementing Classes:
DefaultQuestionService
public interface QuestionService
Interface declaration- Author:
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description void
createAnswersToAQuestion(Question questionDetail)
Create some answers to a questionAnswerPK
createAnswerToAQuestion(Answer answerDetail, QuestionPK questionPK)
Add an answer to a questionQuestionPK
createQuestion(Question question)
Create a new questionvoid
createQuestions(Collection<Question> questions, String fatherId)
Create some questions to a given fathervoid
deleteAnswersToAQuestion(QuestionPK questionPK)
Delete all answers to a questionvoid
deleteAnswerToAQuestion(AnswerPK answerPK, QuestionPK questionPK)
Delete an answer to a questionvoid
deleteQuestion(QuestionPK questionPK)
Delete a questionvoid
deleteQuestionsByFatherPK(QuestionPK questionPK, String fatherId)
Delete the questions of a fatherstatic QuestionService
get()
Question
getQuestion(QuestionPK questionPK)
Get a questionCollection<Question>
getQuestionsByFatherPK(QuestionPK questionPK, String fatherId)
Get all questions for a given fathervoid
updateAnswersToAQuestion(Question questionDetail)
Update the answers to a questionvoid
updateAnswerToAQuestion(Answer answerDetail)
Update an answer to a questionvoid
updateQuestion(Question questionDetail)
Update a questionvoid
updateQuestionHeader(Question questionDetail)
Update a question header (self attributes)
-
-
-
Method Detail
-
get
static QuestionService get()
-
getQuestion
Question getQuestion(QuestionPK questionPK)
Get a question- Parameters:
questionPK
- the question id- Returns:
- a Question
-
getQuestionsByFatherPK
Collection<Question> getQuestionsByFatherPK(QuestionPK questionPK, String fatherId)
Get all questions for a given father- Parameters:
questionPK
- the question idfatherId
- the father id- Returns:
- a Collection of Question
-
createQuestion
QuestionPK createQuestion(Question question)
Create a new question- Parameters:
question
- the question to create- Returns:
- the id of the new question
-
createQuestions
void createQuestions(Collection<Question> questions, String fatherId)
Create some questions to a given father- Parameters:
questions
- a Collection of Question to createfatherId
- the father id
-
deleteQuestionsByFatherPK
void deleteQuestionsByFatherPK(QuestionPK questionPK, String fatherId)
Delete the questions of a father- Parameters:
questionPK
- the question contextfatherId
- the father id
-
deleteQuestion
void deleteQuestion(QuestionPK questionPK)
Delete a question- Parameters:
questionPK
- the question id to delete
-
updateQuestion
void updateQuestion(Question questionDetail)
Update a question- Parameters:
questionDetail
- the question to update
-
updateQuestionHeader
void updateQuestionHeader(Question questionDetail)
Update a question header (self attributes)- Parameters:
questionDetail
- the question attributes
-
updateAnswersToAQuestion
void updateAnswersToAQuestion(Question questionDetail)
Update the answers to a question- Parameters:
questionDetail
- the question containing the answers
-
updateAnswerToAQuestion
void updateAnswerToAQuestion(Answer answerDetail)
Update an answer to a question- Parameters:
answerDetail
- the answer to update
-
deleteAnswersToAQuestion
void deleteAnswersToAQuestion(QuestionPK questionPK)
Delete all answers to a question- Parameters:
questionPK
- the question
-
deleteAnswerToAQuestion
void deleteAnswerToAQuestion(AnswerPK answerPK, QuestionPK questionPK)
Delete an answer to a question- Parameters:
answerPK
- the answer id to deletequestionPK
- the question id
-
createAnswersToAQuestion
void createAnswersToAQuestion(Question questionDetail)
Create some answers to a question- Parameters:
questionDetail
- the question which contains the answers
-
createAnswerToAQuestion
AnswerPK createAnswerToAQuestion(Answer answerDetail, QuestionPK questionPK)
Add an answer to a question- Parameters:
answerDetail
- the new answerquestionPK
- the question id- Returns:
- the PK of the new answer
-
-