Interface EventQuestionService

All Known Implementing Classes:
EventQuestionServiceImpl

public interface EventQuestionService
This service can be used to easily create or update Event_question_answers for a specific Event_question and Registration.
  • Method Summary

    Modifier and Type
    Method
    Description
    getQuestionAnswer(Entity registration, Entity eventQuestion)
    Returns an Event_question_answer for the passed registration and Event_question if existing.
    void
    updateOrCreateChoiceQuestion(Entity eventQuestion, Entity registration, EntityList answers)
    Updates or creates an Event_question_answer for the passed Registration and Event_question and adds the passed Registration_answer_options to it.
    void
    updateOrCreateTextQuestion(Entity eventQuestion, Entity registration, String answer)
    Updates or creates an Event_question_answer for the passed Registration and Event_question and sets the value of the field answer with the passed String.
  • Method Details

    • getQuestionAnswer

      Optional<Entity> getQuestionAnswer(Entity registration, Entity eventQuestion)
      Returns an Event_question_answer for the passed registration and Event_question if existing. Otherwise an com.google.common.base.Absent<T> will be returned.
    • updateOrCreateTextQuestion

      void updateOrCreateTextQuestion(Entity eventQuestion, Entity registration, String answer)
      Updates or creates an Event_question_answer for the passed Registration and Event_question and sets the value of the field answer with the passed String. The type of the question has either to be text_single_line or text_multi_line. Otherwise this method won't do anything. If there is no Event_question_answer available for the passed Registration and Event_question a new one will be created.
    • updateOrCreateChoiceQuestion

      void updateOrCreateChoiceQuestion(Entity eventQuestion, Entity registration, EntityList answers)
      Updates or creates an Event_question_answer for the passed Registration and Event_question and adds the passed Registration_answer_options to it. the type of the question has either to be single_choice or multiple_choice. Otherwise this method won't do anything. If there is no Event_question_answer available for the passed Registration and Event_question a new one will be created. If the type of the passed Event_question is single_choice and the passed EntityList has more than one entries, only the first entry will be added.