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>
answers
protected java.lang.String
content
protected java.lang.String
id
protected java.util.Map<java.lang.String,java.lang.Object>
parameters
protected Answer
selectedAnswer
protected java.lang.String
type
-
Constructor Summary
Constructors Constructor Description QuestionEntityImpl()
-
Method Summary
Modifier and Type Method Description void
addParameter(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.String
getContent()
The optional content of the question.java.lang.String
getId()
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.Answer
getSelectedAnswer()
Optionally returns the selected answer, if this question was answered already.java.lang.String
getType()
Returns the type (typically an enumeration) of the question.void
setAnswers(java.util.List<Answer> answers)
void
setContent(java.lang.String content)
void
setId(java.lang.String id)
void
setParameters(java.util.Map<java.lang.String,java.lang.Object> parameters)
void
setSelectedAnswer(Answer selectedAnswer)
void
setType(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:Question
Returns the unique id of this question. -
setId
public void setId(java.lang.String id)- Specified by:
setId
in interfaceQuestionEntity
-
getType
public java.lang.String getType()Description copied from interface:Question
Returns the type (typically an enumeration) of the question. -
setType
public void setType(java.lang.String type)- Specified by:
setType
in interfaceQuestionEntity
-
getContent
public java.lang.String getContent()Description copied from interface:Question
The optional content of the question.- Specified by:
getContent
in interfaceQuestion
- Returns:
- the optional content of the question object, might be
null
-
setContent
public void setContent(java.lang.String content)- Specified by:
setContent
in interfaceQuestionEntity
-
getParameters
public java.util.Map<java.lang.String,java.lang.Object> getParameters()Description copied from interface:Question
The parameters that were used when answering the question.- Specified by:
getParameters
in 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:
setParameters
in interfaceQuestionEntity
-
addParameter
public void addParameter(java.lang.String parameterName, java.lang.Object parameter)- Specified by:
addParameter
in interfaceQuestionEntity
-
getAnswers
Description copied from interface:Question
Returns a list of possible answers for this question in the exact order they should be rendered.- Specified by:
getAnswers
in interfaceQuestion
- Returns:
- the list of possible answers
-
setAnswers
- Specified by:
setAnswers
in interfaceQuestionEntity
-
getSelectedAnswer
Description copied from interface:Question
Optionally returns the selected answer, if this question was answered already.- Specified by:
getSelectedAnswer
in interfaceQuestion
- Returns:
- the selected answer, if this question was answered,
null
otherwise
-
setSelectedAnswer
- Specified by:
setSelectedAnswer
in interfaceQuestionEntity
-