Class CreateVotesProcess
java.lang.Object
com.skava.ratingandreviews.process.CreateVotesProcess
Class CreateVotesProcess
this class provides the votes process of the ratings
- Author:
- Infosys Equinox
-
Constructor Summary
ConstructorsConstructorDescriptionCreateVotesProcess
(RatingVotesRepository ratingVotesRepository, RatingQuestionsRepository ratingQuestionsRepository, RatingAnswersRepository ratingAnswersRepository) -
Method Summary
Modifier and TypeMethodDescriptioncreateVotesForQuestionAndAnswer
(VotesEntity votesEntity, long collectionId) method createRatingAnswer This method is used to create Answer for Question with the help of the createRatingAnswersvoid
updateVotesForAnswers
(RatingAnswersEntity answerEntity, VotesEntity votesEntity) method updateVotesForAnswers This method is used to update votes for answer with the help of the votesEnitity
-
Constructor Details
-
CreateVotesProcess
@Autowired public CreateVotesProcess(RatingVotesRepository ratingVotesRepository, RatingQuestionsRepository ratingQuestionsRepository, RatingAnswersRepository ratingAnswersRepository)
-
-
Method Details
-
createVotesForQuestionAndAnswer
method createRatingAnswer This method is used to create Answer for Question with the help of the createRatingAnswers- Parameters:
votesEntity
- Holds the value of VotesEntity.collectionId
- Holds the value of CollectionId.- Returns:
- ratingQuestionsAndAnswersResponse The create answers for question is returned in the type of ratingQuestionsAndAnswersResponse.
-
updateVotesForAnswers
method updateVotesForAnswers This method is used to update votes for answer with the help of the votesEnitity- Parameters:
votesEntity
- Holds the value of VotesEntity.collectionId
- Holds the value of answerEntity.
-