Package org.ametys.plugins.survey.data
Class SurveySession
java.lang.Object
org.ametys.plugins.survey.data.SurveySession
- Direct Known Subclasses:
ProcessInputAction.SurveyInput
Class representing a survey session, i.e. all the responses of a user to a survey.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected List<SurveyAnswer>The list of answers.protected intThe session ID.protected StringThe IP address of the person who answered the survey.protected StringThe login of the person who answered the survey.protected StringThe population of the person who answered the survey.protected DateThe date and time at which the person completed the survey.protected StringThe survey ID. -
Constructor Summary
ConstructorsConstructorDescriptionBuild a SurveySession object.SurveySession(int id, String surveyId, UserIdentity user, String ipAddress, Date submittedAt, List<SurveyAnswer> answers) Build a SurveySession object. -
Method Summary
Modifier and TypeMethodDescriptionList<? extends SurveyAnswer>Get the answers.intgetId()Get the id.Get the ipAddress.getLogin()Get the login of the user answering the surveyGet the population of the user answering the surveyGet the submittedAt.Get the surveyId.getUser()Get the identity of the user answering the surveyvoidsetAnswers(List<SurveyAnswer> answers) Set the answers.voidsetId(int id) Set the id.voidsetIpAddress(String ipAddress) Set the ipAddress.voidSet the login of the user answering the surveyvoidsetPopulation(String population) Set the population of the user answering the surveyvoidsetSubmittedAt(Date submittedAt) Set the submittedAt.voidsetSurveyId(String surveyId) Set the surveyId.voidsetUser(UserIdentity user) Set the identity of the user answering the survey
-
Field Details
-
_id
The session ID. -
_surveyId
The survey ID. -
_login
The login of the person who answered the survey. -
_population
The population of the person who answered the survey. -
_ipAddress
The IP address of the person who answered the survey. -
_submittedAt
The date and time at which the person completed the survey. -
_answers
The list of answers.
-
-
Constructor Details
-
SurveySession
public SurveySession()Build a SurveySession object. -
SurveySession
public SurveySession(int id, String surveyId, UserIdentity user, String ipAddress, Date submittedAt, List<SurveyAnswer> answers) Build a SurveySession object.- Parameters:
id- the session ID.surveyId- the survey ID.user- the user.ipAddress- the user IP address.submittedAt- the date of completion.answers- the list of answers.
-
-
Method Details
-
getId
Get the id.- Returns:
- the id
-
setId
Set the id.- Parameters:
id- the id to set
-
getSurveyId
Get the surveyId.- Returns:
- the surveyId
-
setSurveyId
Set the surveyId.- Parameters:
surveyId- the surveyId to set
-
getLogin
Get the login of the user answering the survey- Returns:
- the user login
-
setLogin
Set the login of the user answering the survey- Parameters:
login- the login
-
getPopulation
Get the population of the user answering the survey- Returns:
- the user identity
-
setPopulation
Set the population of the user answering the survey- Parameters:
population- the population
-
setUser
Set the identity of the user answering the survey- Parameters:
user- the user identity
-
getUser
Get the identity of the user answering the survey- Returns:
- the user identity
-
getIpAddress
Get the ipAddress.- Returns:
- the ipAddress
-
setIpAddress
Set the ipAddress.- Parameters:
ipAddress- the ipAddress to set
-
getSubmittedAt
Get the submittedAt.- Returns:
- the submittedAt
-
setSubmittedAt
Set the submittedAt.- Parameters:
submittedAt- the submittedAt to set
-
getAnswers
Get the answers.- Returns:
- the answers
-
setAnswers
Set the answers.- Parameters:
answers- the answers to set
-