Package com.znize.platform.entity.form
Interface Response
-
- All Superinterfaces:
java.lang.Cloneable,CreatedDateAware,PersistenceEntity
public interface Response extends PersistenceEntity, CreatedDateAware
Response to questions of a form. A form can have one or more response.- Since:
- 5.13
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringPROPERTY_FORMstatic java.lang.StringPROPERTY_RESPONSE_XMLstatic java.lang.StringPROPERTY_USER-
Fields inherited from interface com.znize.platform.entity.CreatedDateAware
PROPERTY_CREATED_DATE
-
Fields inherited from interface com.znize.platform.entity.PersistenceEntity
ID_SEPARATOR, PROPERTY_ID, PROPERTY_INSTANCE, PROPERTY_SELECTED, PROPERTY_SEQUENCE_NO, PROPERTY_VERSION
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddAnswer(java.lang.Integer questionNumber, Answer answer)Add the answer to this response.AnswergetAnswer(java.lang.Integer questionNumber)Get the answer for the question.java.util.Map<java.lang.Integer,Answer>getAnswers()Get answers.FormgetForm()Get the form with which this response is associated.java.lang.StringgetResponseXml()Get response encoded XML.UsergetUser()Get the user who submitted this response.voidsetAnswers(java.util.Map<java.lang.Integer,Answer> answers)Set answersvoidsetForm(Form form)Set the form with which this response is associated.voidsetResponseXml(java.lang.String responseXml)Get response encoded XML.voidsetUser(User user)Set the user who submitted this response.-
Methods inherited from interface com.znize.platform.entity.CreatedDateAware
getCreatedDate, setCreatedDate
-
Methods inherited from interface com.znize.platform.entity.PersistenceEntity
clone, getId, getInstance, getSequenceNo, getVersion, isChanged, isPartiallyInitialized, isPersisted, isSelected, isStatistics, setChanged, setId, setInstance, setPartiallyInitialized, setPersisted, setSelected, setSequenceNo, setStatistics, setVersion
-
-
-
-
Field Detail
-
PROPERTY_FORM
static final java.lang.String PROPERTY_FORM
- See Also:
- Constant Field Values
-
PROPERTY_USER
static final java.lang.String PROPERTY_USER
- See Also:
- Constant Field Values
-
PROPERTY_RESPONSE_XML
static final java.lang.String PROPERTY_RESPONSE_XML
- See Also:
- Constant Field Values
-
-
Method Detail
-
getForm
Form getForm()
Get the form with which this response is associated.- Returns:
- form
-
setForm
void setForm(Form form)
Set the form with which this response is associated.- Parameters:
form- form instance
-
getUser
User getUser()
Get the user who submitted this response. It can be null if user login is not required to submit this response.- Returns:
- user
-
setUser
void setUser(User user)
Set the user who submitted this response.- Parameters:
user- user
-
getResponseXml
java.lang.String getResponseXml()
Get response encoded XML.- Returns:
- encoded XML
-
setResponseXml
void setResponseXml(java.lang.String responseXml)
Get response encoded XML.- Parameters:
responseXml- response xml
-
getAnswers
java.util.Map<java.lang.Integer,Answer> getAnswers()
Get answers.- Returns:
- a map of answers. map key is question number.
-
setAnswers
void setAnswers(java.util.Map<java.lang.Integer,Answer> answers)
Set answers- Parameters:
answers- a map of answers. map key is question number.
-
addAnswer
void addAnswer(java.lang.Integer questionNumber, Answer answer)Add the answer to this response.- Parameters:
questionNumber- question numberanswer- answer
-
getAnswer
Answer getAnswer(java.lang.Integer questionNumber)
Get the answer for the question.- Parameters:
questionNumber- question number- Returns:
- answer
-
-