Class QuestionEntityImpl
java.lang.Object
com.flowable.questionnaire.service.impl.entity.QuestionEntityImpl
- All Implemented Interfaces:
Question,QuestionEntity
public class QuestionEntityImpl extends java.lang.Object implements QuestionEntity
- Author:
- Filip Hrisafov
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<Answer>answersprotected java.lang.Stringcontentprotected java.lang.Stringidprotected java.util.Map<java.lang.String,java.lang.Object>parametersprotected AnswerselectedAnswerprotected java.lang.Stringtype -
Constructor Summary
Constructors Constructor Description QuestionEntityImpl() -
Method Summary
Modifier and Type Method Description voidaddParameter(java.lang.String parameterName, java.lang.Object parameter)java.util.List<Answer>getAnswers()Returns a list of possible answers for this question in the exact order they should be rendered.java.lang.StringgetContent()The optional content of the question.java.lang.StringgetId()Returns the unique id of this question.java.util.Map<java.lang.String,java.lang.Object>getParameters()The parameters that were used when answering the question.AnswergetSelectedAnswer()Optionally returns the selected answer, if this question was answered already.java.lang.StringgetType()Returns the type (typically an enumeration) of the question.voidsetAnswers(java.util.List<Answer> answers)voidsetContent(java.lang.String content)voidsetId(java.lang.String id)voidsetParameters(java.util.Map<java.lang.String,java.lang.Object> parameters)voidsetSelectedAnswer(Answer selectedAnswer)voidsetType(java.lang.String type)
-
Field Details
-
id
protected java.lang.String id -
type
protected java.lang.String type -
content
protected java.lang.String content -
parameters
protected java.util.Map<java.lang.String,java.lang.Object> parameters -
answers
-
selectedAnswer
-
-
Constructor Details
-
QuestionEntityImpl
public QuestionEntityImpl()
-
-
Method Details
-
getId
public java.lang.String getId()Description copied from interface:QuestionReturns the unique id of this question. -
setId
public void setId(java.lang.String id)- Specified by:
setIdin interfaceQuestionEntity
-
getType
public java.lang.String getType()Description copied from interface:QuestionReturns the type (typically an enumeration) of the question. -
setType
public void setType(java.lang.String type)- Specified by:
setTypein interfaceQuestionEntity
-
getContent
public java.lang.String getContent()Description copied from interface:QuestionThe optional content of the question.- Specified by:
getContentin interfaceQuestion- Returns:
- the optional content of the question object, might be
null
-
setContent
public void setContent(java.lang.String content)- Specified by:
setContentin interfaceQuestionEntity
-
getParameters
public java.util.Map<java.lang.String,java.lang.Object> getParameters()Description copied from interface:QuestionThe parameters that were used when answering the question.- Specified by:
getParametersin interfaceQuestion- Returns:
- the optional parameters for the question, might be empty or even
null
-
setParameters
public void setParameters(java.util.Map<java.lang.String,java.lang.Object> parameters)- Specified by:
setParametersin interfaceQuestionEntity
-
addParameter
public void addParameter(java.lang.String parameterName, java.lang.Object parameter)- Specified by:
addParameterin interfaceQuestionEntity
-
getAnswers
Description copied from interface:QuestionReturns a list of possible answers for this question in the exact order they should be rendered.- Specified by:
getAnswersin interfaceQuestion- Returns:
- the list of possible answers
-
setAnswers
- Specified by:
setAnswersin interfaceQuestionEntity
-
getSelectedAnswer
Description copied from interface:QuestionOptionally returns the selected answer, if this question was answered already.- Specified by:
getSelectedAnswerin interfaceQuestion- Returns:
- the selected answer, if this question was answered,
nullotherwise
-
setSelectedAnswer
- Specified by:
setSelectedAnswerin interfaceQuestionEntity
-