java.lang.Object
com.RuntimeCollective.questionnaire.bean.SimpleQuestion
com.RuntimeCollective.questionnaire.bean.XInManyStringsQuestion
com.RuntimeCollective.questionnaire.bean.ManyInManyStringsQuestion
- All Implemented Interfaces:
- com.RuntimeCollective.webapps.bean.EntityBean, Question, java.io.Serializable
- public class ManyInManyStringsQuestion
- extends XInManyStringsQuestion
Question implementation which offers the choice of many Strings between many.
Useful for multi-choice questionnaires, where more than one answer of many can be chosen.
- Version:
- $Id: ManyInManyStringsQuestion.java,v 1.4 2003/09/30 15:12:53 joe Exp $
| Methods inherited from class com.RuntimeCollective.questionnaire.bean.XInManyStringsQuestion |
addChoice, addChoice, delete, getDisplayText, getDisplayTexts, getIndexOfKey, getKey, getKeys, isNewChoiceValid, removeChoice, removeChoiceIfNoVotes, save, setDisplayText, setKey |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DATABASE_TABLE
public static final java.lang.String DATABASE_TABLE
- The name of the database table for this bean type.
- See Also:
- Constant Field Values
ManyInManyStringsQuestion
public ManyInManyStringsQuestion()
- Construct a new blank ManyInManyStringsQuestion, giving it a new unique ID.
ManyInManyStringsQuestion
public ManyInManyStringsQuestion(int id)
- Get a current ManyInManyStringsQuestion from the RuntimeDataSource, given an id.
setDatabaseParticulars
protected void setDatabaseParticulars()
- Fill in details of the database tables used by this class
- Specified by:
setDatabaseParticulars in class XInManyStringsQuestion
makeNewAnswer
public Answer makeNewAnswer(java.lang.Object answer)
throws com.RuntimeCollective.questionnaire.InvalidAnswerException
- Make a new Answer to this Question, based on a row answer Object.
This checks the validity of the raw Object answer (which must be a
Collection of Strings), and then creates a new ManyStringAnswer.
- Specified by:
makeNewAnswer in interface Question- Specified by:
makeNewAnswer in class XInManyStringsQuestion
isAnswerValid
public boolean isAnswerValid(java.lang.Object answer)
- Check the validity of a raw Object answer for this Question.
It should be a Collection of Strings, each one being
one of the possible String choices.
- Specified by:
isAnswerValid in interface Question- Specified by:
isAnswerValid in class XInManyStringsQuestion