public class Respondent
extends java.lang.Object
keepBusinessObject()
. Keeping references to objects may cause inconsistencies in the system, so
always remember to call releaseBusinessObject()
as soon as you
are finished using them. isPersisted
is set to true if respondent is saved in the
storage. setCurrentResponse()
Modifier and Type | Method and Description |
---|---|
void |
deleteResponse(int questionNo)
Deletes a response.
|
java.lang.String |
getAttribute(java.lang.String attributeName)
Gets the value for a respondent attribute.
|
java.util.HashMap |
getAttributes()
Gets all the respondent attributes.
|
boolean |
getAttributesExist()
Returns true if one or more attributes exist for this respondent.
|
boolean |
getBlocked()
Get the flag that determines if the respondent is to be blocked from
continuing the survey.
|
long |
getCompletedDate()
Gets the completed date
|
int |
getCurrentResponse()
Gets the current response.
|
long |
getEntryDate()
Gets the entry date
|
boolean |
getFinishClicked()
Get the flag that determines the finish-button was clicked in the survey.
|
long |
getInviteeId()
Gets the invitee id (if applicable)
|
java.lang.String |
getIpAddress()
Gets the ip address.
|
java.lang.String |
getLanguageCode()
Gets the languageCode for which language the respondent responded to the
survey in.
|
int |
getLastResponse()
Gets the question number of last answered question.
|
int |
getNextQuestion()
Gets the number of the next question (after current response).
If survey contains branch conditions some questions might be filtered out based on responses to the previous questions. |
long |
getRespondentId()
Gets the respondent id
|
Response |
getResponse(int questionNo)
Gets a question response.
|
long |
getSurveyId()
Gets the survey id
|
java.lang.String |
getThankYouNote()
Gets the custom thank-you note for current respondent.
|
java.lang.String |
getTicket()
Gets the ticket value
|
java.lang.String |
getUserData(int index)
Gets the user data at a specified index.
|
boolean |
hasBusinessObject()
Check if this question has reference to the business Respondent object.
|
boolean |
isFilteredOut(int questionNo)
Check if question is filtered out by condition branching.
|
boolean |
isPersisted()
Returns true if respondent is persisted (some of the respondent
information/responses are saved in the storage).
|
void |
keepBusinessObject()
Get and keep business object.
|
void |
releaseBusinessObject()
Release business object.
|
void |
setAttribute(java.lang.String attributeName,
java.lang.String attributeValue)
Sets an attribute of the respondent object.
|
void |
setBlocked(boolean blocked)
Set this attribute to block the respondent from continue the survey.
|
void |
setCurrentResponse(int currentResponse)
Sets the current response.
|
void |
setFinishClicked(boolean finishClicked)
Sets the finishedClicked attribute.
|
void |
setThankYouNote(java.lang.String thankYouNote)
Sets the custom thank-you note for current respondent.
|
public void setAttribute(java.lang.String attributeName, java.lang.String attributeValue) throws SurveySystemException
opdata_()
are allowed.
Attributes with a different name will simply be ignored.
When the respondent object is stored/updated the respondent attributes
will be stored in the OPS_RespondentAttribute table in the database.String
- attributeName The attribute nameString
- attributeValue The attribute valueSurveySystemException
public void setFinishClicked(boolean finishClicked) throws SurveySystemException
finishClicked
- True to simulate clicking on finish button.SurveySystemException
public void setBlocked(boolean blocked) throws SurveySystemException
blocked
- True to block respondent, false otherwise.SurveySystemException
public void setThankYouNote(java.lang.String thankYouNote) throws SurveySystemException
thankYouNote
- The customized thank-you note.SurveySystemException
public java.lang.String getAttribute(java.lang.String attributeName) throws SurveySystemException
String
- attributeName The attribute nameSurveySystemException
public java.util.HashMap getAttributes() throws SurveySystemException
SurveySystemException
public boolean getAttributesExist() throws SurveySystemException
SurveySystemException
public java.lang.String getUserData(int index) throws SurveySystemException
index
- The index of the user data.SurveySystemException
- If an error occurs in the system.public void setCurrentResponse(int currentResponse) throws java.lang.IllegalArgumentException, SurveySystemException
currentResponse
- The number of the question the
respondent is answering.java.lang.IllegalArgumentException
- If invalid currentResponseSurveySystemException
- If an error occurs in the system.public long getCompletedDate() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public long getInviteeId() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public int getCurrentResponse() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public long getEntryDate() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public java.lang.String getIpAddress() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public java.lang.String getLanguageCode() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public int getLastResponse() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public int getNextQuestion() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public long getRespondentId()
public boolean getBlocked() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public boolean getFinishClicked() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public java.lang.String getThankYouNote() throws SurveySystemException
SurveySystemException
public Response getResponse(int questionNo) throws java.lang.IllegalArgumentException, SurveySystemException
questionNo
- Question number of response to getjava.lang.IllegalArgumentException
- If illegal question numberSurveySystemException
- If an error occurs in the system.public long getSurveyId()
public java.lang.String getTicket() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public boolean isFilteredOut(int questionNo) throws java.lang.IllegalArgumentException, SurveySystemException
questionNo
- Question numberjava.lang.IllegalArgumentException
- If illegal question numberSurveySystemException
- If any error occurs in the system.public boolean isPersisted() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public void deleteResponse(int questionNo) throws SurveySystemException
questionNo
- Question number of response to remove.SurveySystemException
- If an error occurs in the system.public boolean hasBusinessObject()
public void keepBusinessObject() throws SurveySystemException
SurveySystemException
- If an error occurs in the system.public void releaseBusinessObject()
Built on October 18 2017