com.stratelia.webactiv.util.question.control
Interface QuestionBm

All Known Implementing Classes:
QuestionBmEJB

public interface QuestionBm

Interface declaration

Author:

Method Summary
 void createAnswersToAQuestion(Question questionDetail)
          Create some answers to a question
 AnswerPK createAnswerToAQuestion(Answer answerDetail, QuestionPK questionPK)
          Add an answer to a question
 QuestionPK createQuestion(Question question)
          Create a new question
 void createQuestions(Collection<Question> questions, String fatherId)
          Create some questions to a given father
 void deleteAnswersToAQuestion(QuestionPK questionPK)
          Delete all answers to a question
 void deleteAnswerToAQuestion(AnswerPK answerPK, QuestionPK questionPK)
          Delete an answer to a question
 void deleteQuestion(QuestionPK questionPK)
          Delete a question
 void deleteQuestionsByFatherPK(QuestionPK questionPK, String fatherId)
          Delete the questions of a father
 Question getQuestion(QuestionPK questionPK)
          Get a question
 Collection<Question> getQuestionsByFatherPK(QuestionPK questionPK, String fatherId)
          Get all questions for a given father
 void updateAnswersToAQuestion(Question questionDetail)
          Update the answers to a question
 void updateAnswerToAQuestion(Answer answerDetail)
          Update an answer to a question
 void updateQuestion(Question questionDetail)
          Update a question
 void updateQuestionHeader(Question questionDetail)
          Update a question header (self attributes)
 

Method Detail

getQuestion

Question getQuestion(QuestionPK questionPK)
Get a question

Parameters:
questionPK - the question id
Returns:
a Question
See Also:

getQuestionsByFatherPK

Collection<Question> getQuestionsByFatherPK(QuestionPK questionPK,
                                            String fatherId)
Get all questions for a given father

Parameters:
questionPK - the question id
fatherId - the father id
Returns:
a Collection of Question
See Also:

createQuestion

QuestionPK createQuestion(Question question)
Create a new question

Parameters:
question - the question to create
Returns:
the id of the new question
See Also:

createQuestions

void createQuestions(Collection<Question> questions,
                     String fatherId)
Create some questions to a given father

Parameters:
questions - a Collection of Question to create
fatherId - the father id
See Also:

deleteQuestionsByFatherPK

void deleteQuestionsByFatherPK(QuestionPK questionPK,
                               String fatherId)
Delete the questions of a father

Parameters:
questionPK - the question context
fatherId - the father id
See Also:

deleteQuestion

void deleteQuestion(QuestionPK questionPK)
Delete a question

Parameters:
questionPK - the question id to delete
See Also:

updateQuestion

void updateQuestion(Question questionDetail)
Update a question

Parameters:
questionDetail - the question to update
See Also:

updateQuestionHeader

void updateQuestionHeader(Question questionDetail)
Update a question header (self attributes)

Parameters:
questionDetail - the question attributes
See Also:

updateAnswersToAQuestion

void updateAnswersToAQuestion(Question questionDetail)
Update the answers to a question

Parameters:
questionDetail - the question containing the answers
See Also:

updateAnswerToAQuestion

void updateAnswerToAQuestion(Answer answerDetail)
Update an answer to a question

Parameters:
answerDetail - the answer to update
See Also:

deleteAnswersToAQuestion

void deleteAnswersToAQuestion(QuestionPK questionPK)
Delete all answers to a question

Parameters:
questionPK - the question
See Also:

deleteAnswerToAQuestion

void deleteAnswerToAQuestion(AnswerPK answerPK,
                             QuestionPK questionPK)
Delete an answer to a question

Parameters:
answerPK - the answer id to delete
questionPK - the question id
See Also:

createAnswersToAQuestion

void createAnswersToAQuestion(Question questionDetail)
Create some answers to a question

Parameters:
questionDetail - the question which contains the answers
See Also:

createAnswerToAQuestion

AnswerPK createAnswerToAQuestion(Answer answerDetail,
                                 QuestionPK questionPK)
Add an answer to a question

Parameters:
answerDetail - the new answer
questionPK - the question id
Returns:
the PK of the new answer
See Also:


Copyright © 2016 Silverpeas. All Rights Reserved.