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 SelectQuestionAnswer

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

@Entity
public class SelectQuestionAnswer
extends AbstractTypedAnswer<java.util.Collection<java.lang.String>>

Is an answer to a AbstractQuestion that has multiple values.

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

Constructor Summary
protected SelectQuestionAnswer()
          Default constructor.
protected SelectQuestionAnswer(AbstractQuestion quest, java.util.Collection<java.lang.String> vals, java.lang.String customVal)
          Creates a new SelectQuestionAnswer with the given vals and the given AbstractQuestion.
 
Method Summary
 boolean containsValue(java.lang.String val)
          Tests the given val against the values of the SelectQuestionAnswer.
 java.lang.String getCustomValue()
          Returns the custom value of the SelectQuestionAnswer.
 java.util.Collection<java.lang.String> getValue()
          Returns the values of the SelectQuestionAnswer.
 
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

SelectQuestionAnswer

protected SelectQuestionAnswer()
Default constructor.


SelectQuestionAnswer

protected SelectQuestionAnswer(AbstractQuestion quest,
                               java.util.Collection<java.lang.String> vals,
                               java.lang.String customVal)
Creates a new SelectQuestionAnswer with the given vals and the given AbstractQuestion.

Parameters:
quest - the AbstractQuestion
vals - the values
customVal - the customValue (if any)
Method Detail

getValue

public final java.util.Collection<java.lang.String> getValue()
Returns the values of the SelectQuestionAnswer.

Specified by:
getValue in class AbstractTypedAnswer<java.util.Collection<java.lang.String>>
Returns:
the values

getCustomValue

public final java.lang.String getCustomValue()
Returns the custom value of the SelectQuestionAnswer.

Returns:
the customValue

containsValue

public final boolean containsValue(java.lang.String val)
Tests the given val against the values of the SelectQuestionAnswer.

Parameters:
val - the value to test
Returns:
Collection.contains(Object)