|
|
|
|
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.torweg.pulse.util.entity.AbstractBasicEntity
org.torweg.pulse.component.survey.model.Questionnaire
@Entity public class Questionnaire
The Questionnaire stores the
AbstractTypedAnswer<?>s for a Survey.
| Constructor Summary | |
|---|---|
protected |
Questionnaire()
Default constructor. |
|
Questionnaire(Survey sur)
Creates a new Questionnaire for the given
Survey. |
| Method Summary | |
|---|---|
boolean |
addAnswer(AbstractTypedAnswer<?> answer)
Adds an {@code AbstractTypedAnswer<? |
AbstractTypedAnswer<?> |
getAnswer(AbstractQuestion quest)
Returns the {@code AbstractTypedAnswer<? |
java.util.List<? extends AbstractTypedAnswer<?>> |
getAnswers()
Returns the answers of the Questionnaire. |
java.util.Date |
getStorageDate()
Returns the storage- Date. |
Survey |
getSurvey(org.hibernate.Session s)
Returns the Survey the Questionnaire belongs
to. |
java.lang.Long |
getSurveyId()
Returns the id of the Survey the
Questionnaire belongs to. |
java.lang.String |
getSurveyToken()
Returns the surveyToken-string. |
java.lang.Long |
getUserId()
Returns the userId. |
Questionnaire |
setStorageDate(java.util.Date storage)
Sets the storage- Date. |
void |
setSurveyToken(java.lang.String surveyTok)
Sets the surveyToken-string. |
void |
setUserId(java.lang.Long uId)
Sets the userId. |
| Methods inherited from class org.torweg.pulse.util.entity.AbstractBasicEntity |
|---|
compareTo, equals, getFullQualifiedClassNameJAXB, getId, hashCode |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected Questionnaire()
public Questionnaire(Survey sur)
Questionnaire for the given
Survey.
sur - the Survey| Method Detail |
|---|
public final java.lang.Long getSurveyId()
Survey the
Questionnaire belongs to.
Surveypublic final void setUserId(java.lang.Long uId)
uId - the userId to setpublic final java.lang.Long getUserId()
public final boolean addAnswer(AbstractTypedAnswer<?> answer)
AbstractTypedAnswer<?> to the
Questionnaire.
If Questionnaire.answers already contains an
AbstractTypedAnswer<?> with
AbstractTypedAnswer<?>.
getQuestionId().equals(answer.getQuestionId()) that
AbstractTypedAnswer<?> will be replaced by the given
answer.
answer - the AbstractTypedAnswer<?> to add
true if the given answer has been added,
false otherwisepublic final java.util.List<? extends AbstractTypedAnswer<?>> getAnswers()
Questionnaire.
List<? extends AbstractTypedAnswer<?>>public final AbstractTypedAnswer<?> getAnswer(AbstractQuestion quest)
AbstractTypedAnswer<?> for the given
AbstractQuestion.
quest - the AbstractQuestion
AbstractTypedAnswer<?> for the given
AbstractQuestion or null if the
Questionnaire does not have an
AbstractTypedAnswer<?> for the given
AbstractQuestionpublic final Survey getSurvey(org.hibernate.Session s)
Survey the Questionnaire belongs
to.
s - the hibernateTM-Session
Survey the Questionnaire belongs to
if a Survey could be loaded, null
otherwisepublic final void setSurveyToken(java.lang.String surveyTok)
surveyTok - the surveyToken-stringpublic final java.lang.String getSurveyToken()
public final Questionnaire setStorageDate(java.util.Date storage)
Date.
storage - the storage-Date to set
Questionnairepublic final java.util.Date getStorageDate()
Date.
Date
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||