pulse - the web application framework Get pulse at SourceForge.net. Fast, secure and Free Open Source software downloads Ohloh project report for pulse-java

org.torweg.pulse.component.survey.model
Class QuestionGroupAnswer

java.lang.Object
  extended by org.torweg.pulse.util.entity.AbstractBasicEntity
      extended by org.torweg.pulse.component.survey.model.AbstractTypedAnswer<java.util.List<AbstractTypedAnswer<?>>>
          extended by org.torweg.pulse.component.survey.model.QuestionGroupAnswer
All Implemented Interfaces:
java.io.Serializable

@Entity
public class QuestionGroupAnswer
extends AbstractTypedAnswer<java.util.List<AbstractTypedAnswer<?>>>

The AbstractTypedAnswer<?> for the QuestionGroup.

Version:
$Revision: 1586 $
Author:
Daniel Dietz
See Also:
Serialized Form

Constructor Summary
protected QuestionGroupAnswer()
          Default constructor.
protected QuestionGroupAnswer(AbstractQuestion quest, java.util.List<AbstractTypedAnswer<?>> val)
          Creates a new QuestionGroupAnswer with the given val and the given AbstractQuestion.
 
Method Summary
 AbstractTypedAnswer<?> getAnswer(AbstractQuestion quest)
          Returns the {@code AbstractTypedAnswer
 java.util.List<AbstractTypedAnswer<?>> getValue()
          Returns the value of the QuestionGroupAnswer.
 
Methods inherited from class org.torweg.pulse.component.survey.model.AbstractTypedAnswer
getQuestion, getQuestionId, getValidationError, isValid, setQuestionId, setValid, setValidationError
 
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

QuestionGroupAnswer

protected QuestionGroupAnswer()
Default constructor.


QuestionGroupAnswer

protected QuestionGroupAnswer(AbstractQuestion quest,
                              java.util.List<AbstractTypedAnswer<?>> val)
Creates a new QuestionGroupAnswer with the given val and the given AbstractQuestion.

Parameters:
quest - the AbstractQuestion
val - the value
Method Detail

getValue

public final java.util.List<AbstractTypedAnswer<?>> getValue()
Returns the value of the QuestionGroupAnswer.

Specified by:
getValue in class AbstractTypedAnswer<java.util.List<AbstractTypedAnswer<?>>>
Returns:
the value

getAnswer

public final AbstractTypedAnswer<?> getAnswer(AbstractQuestion quest)
Returns the AbstractTypedAnswer<?> for the given AbstractQuestion.

Parameters:
quest - the AbstractQuestion
Returns:
the AbstractTypedAnswer<?> for the given AbstractQuestion if the value contains an AbstractTypedAnswer<?> for the given AbstractQuestion, null otherwise