com.stratelia.webactiv.util.question.control
Class QuestionBmEJB

java.lang.Object
  extended by com.stratelia.webactiv.util.question.control.QuestionBmEJB
All Implemented Interfaces:
QuestionBm

public class QuestionBmEJB
extends Object
implements QuestionBm

Question Business Manager See QuestionBmBusinessSkeleton for methods documentation

Author:
neysseri

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

Constructor Detail

QuestionBmEJB

public QuestionBmEJB()
Method Detail

getQuestion

public Question getQuestion(QuestionPK questionPK)
Description copied from interface: QuestionBm
Get a question

Specified by:
getQuestion in interface QuestionBm
Parameters:
questionPK - the question id
Returns:
a Question
See Also:

getQuestionsByFatherPK

public Collection<Question> getQuestionsByFatherPK(QuestionPK questionPK,
                                                   String fatherId)
Description copied from interface: QuestionBm
Get all questions for a given father

Specified by:
getQuestionsByFatherPK in interface QuestionBm
Parameters:
questionPK - the question id
fatherId - the father id
Returns:
a Collection of Question
See Also:

createQuestion

public QuestionPK createQuestion(Question question)
Description copied from interface: QuestionBm
Create a new question

Specified by:
createQuestion in interface QuestionBm
Parameters:
question - the question to create
Returns:
the id of the new question
See Also:

createQuestions

public void createQuestions(Collection<Question> questions,
                            String fatherId)
Description copied from interface: QuestionBm
Create some questions to a given father

Specified by:
createQuestions in interface QuestionBm
Parameters:
questions - a Collection of Question to create
fatherId - the father id
See Also:

deleteQuestionsByFatherPK

public void deleteQuestionsByFatherPK(QuestionPK questionPK,
                                      String fatherId)
Description copied from interface: QuestionBm
Delete the questions of a father

Specified by:
deleteQuestionsByFatherPK in interface QuestionBm
Parameters:
questionPK - the question context
fatherId - the father id
See Also:

deleteQuestion

public void deleteQuestion(QuestionPK questionPK)
Description copied from interface: QuestionBm
Delete a question

Specified by:
deleteQuestion in interface QuestionBm
Parameters:
questionPK - the question id to delete
See Also:

updateQuestion

public void updateQuestion(Question questionDetail)
Description copied from interface: QuestionBm
Update a question

Specified by:
updateQuestion in interface QuestionBm
Parameters:
questionDetail - the question to update
See Also:

updateQuestionHeader

public void updateQuestionHeader(Question questionDetail)
Description copied from interface: QuestionBm
Update a question header (self attributes)

Specified by:
updateQuestionHeader in interface QuestionBm
Parameters:
questionDetail - the question attributes
See Also:

updateAnswersToAQuestion

public void updateAnswersToAQuestion(Question questionDetail)
Description copied from interface: QuestionBm
Update the answers to a question

Specified by:
updateAnswersToAQuestion in interface QuestionBm
Parameters:
questionDetail - the question containing the answers
See Also:

updateAnswerToAQuestion

public void updateAnswerToAQuestion(Answer answerDetail)
Description copied from interface: QuestionBm
Update an answer to a question

Specified by:
updateAnswerToAQuestion in interface QuestionBm
Parameters:
answerDetail - the answer to update
See Also:

deleteAnswersToAQuestion

public void deleteAnswersToAQuestion(QuestionPK questionPK)
Description copied from interface: QuestionBm
Delete all answers to a question

Specified by:
deleteAnswersToAQuestion in interface QuestionBm
Parameters:
questionPK - the question
See Also:

deleteAnswerToAQuestion

public void deleteAnswerToAQuestion(AnswerPK answerPK,
                                    QuestionPK questionPK)
Description copied from interface: QuestionBm
Delete an answer to a question

Specified by:
deleteAnswerToAQuestion in interface QuestionBm
Parameters:
answerPK - the answer id to delete
questionPK - the question id
See Also:

createAnswersToAQuestion

public void createAnswersToAQuestion(Question questionDetail)
Description copied from interface: QuestionBm
Create some answers to a question

Specified by:
createAnswersToAQuestion in interface QuestionBm
Parameters:
questionDetail - the question which contains the answers
See Also:

createAnswerToAQuestion

public AnswerPK createAnswerToAQuestion(Answer answerDetail,
                                        QuestionPK questionPK)
Description copied from interface: QuestionBm
Add an answer to a question

Specified by:
createAnswerToAQuestion in interface QuestionBm
Parameters:
answerDetail - the new answer
questionPK - the question id
Returns:
the PK of the new answer
See Also:


Copyright © 2016 Silverpeas. All Rights Reserved.