@Service public class AnswersService extends java.lang.Object implements IAnswersService
| Constructor and Description |
|---|
AnswersService() |
| Modifier and Type | Method and Description |
|---|---|
AnswerBO |
add(AnswerVO answerVO,
java.lang.Long questionId)
This method adds a new answer to a specified by id question.
|
void |
delete(java.lang.Long questionId,
java.lang.Long answerId)
This method deletes a specified by id answer to a specified by id question.
|
java.util.List<AnswerBO> |
findByQuestionId(java.lang.Long questionId)
This method returns all answers that are available
to a specified by id question.
|
AnswerBO |
update(AnswerVO answerVO,
java.lang.Long questionId,
java.lang.Long answerId)
This method updates an existing specified by id answer to a specified by id question.
|
public java.util.List<AnswerBO> findByQuestionId(java.lang.Long questionId)
findByQuestionId in interface IAnswersServicequestionId - Id of question to receive answers topublic AnswerBO add(AnswerVO answerVO, java.lang.Long questionId)
add in interface IAnswersServiceanswerVO - AnswerVO's instance with user's input dataquestionId - Id of question to add an answer topublic AnswerBO update(AnswerVO answerVO, java.lang.Long questionId, java.lang.Long answerId)
update in interface IAnswersServiceanswerVO - AnswerVO's instance with user's changed and old data.questionId - Id of question to edit an answer toanswerId - Id of answer to edit@Transactional
public void delete(java.lang.Long questionId,
java.lang.Long answerId)
delete in interface IAnswersServicequestionId - Id of question to delete an answer toanswerId - Id of answer to delete