Class QuestionService

java.lang.Object
com.amos2020.javabackend.service.QuestionService

@Service
public class QuestionService
extends java.lang.Object
  • Field Summary

    Fields 
    Modifier and Type Field Description
    (package private) QuestionRepository repository  
  • Constructor Summary

    Constructors 
    Constructor Description
    QuestionService​(QuestionRepository repository)  
  • Method Summary

    Modifier and Type Method Description
    Question getQuestionById​(int questionId)
    Get a question by id
    java.util.List<Question> getQuestionsByFacCritId​(int faccritId)
    Get a all Questions for a facCrit by the facCrit id

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

  • Method Details

    • getQuestionsByFacCritId

      @Transactional public java.util.List<Question> getQuestionsByFacCritId​(int faccritId)
      Get a all Questions for a facCrit by the facCrit id
      Parameters:
      faccritId - int
      Returns:
      List
    • getQuestionById

      public Question getQuestionById​(int questionId) throws javassist.NotFoundException
      Get a question by id
      Parameters:
      questionId - int
      Returns:
      Question
      Throws:
      javassist.NotFoundException - If the question id is invalid and can not be found