Interface EventQuestionService
- All Known Implementing Classes:
EventQuestionServiceImpl
public interface EventQuestionService
This service can be used to easily create or update
Event_question_answer
s for a specific
Event_question
and Registration
.-
Method Summary
Modifier and TypeMethodDescriptiongetQuestionAnswer
(Entity registration, Entity eventQuestion) Returns anEvent_question_answer
for the passedregistration
andEvent_question
if existing.void
updateOrCreateChoiceQuestion
(Entity eventQuestion, Entity registration, EntityList answers) Updates or creates anEvent_question_answer
for the passedRegistration
andEvent_question
and adds the passedRegistration_answer_options
to it.void
updateOrCreateTextQuestion
(Entity eventQuestion, Entity registration, String answer) Updates or creates anEvent_question_answer
for the passedRegistration
andEvent_question
and sets the value of the fieldanswer
with the passedString
.
-
Method Details
-
getQuestionAnswer
Returns anEvent_question_answer
for the passedregistration
andEvent_question
if existing. Otherwise ancom.google.common.base.Absent<T>
will be returned. -
updateOrCreateTextQuestion
Updates or creates anEvent_question_answer
for the passedRegistration
andEvent_question
and sets the value of the fieldanswer
with the passedString
. The type of the question has either to betext_single_line
ortext_multi_line
. Otherwise this method won't do anything. If there is noEvent_question_answer
available for the passedRegistration
andEvent_question
a new one will be created. -
updateOrCreateChoiceQuestion
Updates or creates anEvent_question_answer
for the passedRegistration
andEvent_question
and adds the passedRegistration_answer_options
to it. the type of the question has either to besingle_choice
ormultiple_choice
. Otherwise this method won't do anything. If there is noEvent_question_answer
available for the passedRegistration
andEvent_question
a new one will be created. If the type of the passedEvent_question
issingle_choice
and the passedEntityList
has more than one entries, only the first entry will be added.
-