|
|||||||||
| Home >> All >> com >> RuntimeCollective >> questionnaire >> [ bean overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.RuntimeCollective.questionnaire.bean
Class SimpleAnswer

java.lang.Objectcom.RuntimeCollective.questionnaire.bean.SimpleAnswer
- All Implemented Interfaces:
- Answer, com.RuntimeCollective.webapps.bean.EntityBean, java.io.Serializable
- Direct Known Subclasses:
- ManyStringAnswer, OneStringAnswer
- public abstract class SimpleAnswer
- extends java.lang.Object
- implements Answer
- extends java.lang.Object
Basic and incomplete implementation of the Answer interface, which you
can subclass at will to create new types of Answers.
In your sub classes, you should define some Fields to store the actual
answer content, and override setAnswerGiven and
getAnswerGiven, and (most probably) save,
delete and the 2 usual constructors.
- Version:
- $Id: SimpleAnswer.java,v 1.9 2003/09/30 15:12:53 joe Exp $
| Field Summary | |
protected int |
AnsweredQuestionId
The AnsweredQuestion |
static java.lang.String |
DATABASE_TABLE
The name of the database table for this bean type. |
protected int |
id
This object's id |
protected int |
UserAnswersId
The UserAnswers |
| Fields inherited from interface com.RuntimeCollective.webapps.bean.EntityBean |
INTERFACE_BEAN, NULL_ID |
| Constructor Summary | |
SimpleAnswer()
Construct a new blank SimpleAnswer, giving it a new unique ID. |
|
SimpleAnswer(int id)
Get a current SimpleAnswer from the RuntimeDataSource, given an id. |
|
| Method Summary | |
void |
delete()
Delete this bean from the database. |
Question |
getAnsweredQuestion()
Get the AnsweredQuestion of this Answer |
abstract java.lang.Object |
getAnswerGiven()
Get the AnswerGiven of this Answer |
int |
getId()
Get the unique id of this bean instance. |
UserAnswers |
getUserAnswers()
Get the UserAnswers of this Answer |
void |
save()
Save this bean to the database. |
void |
setAnsweredQuestion(Question answeredQuestion)
Set the AnsweredQuestion of this Answer |
abstract void |
setAnswerGiven(java.lang.Object answerGiven)
Set the AnswerGiven of this Answer |
void |
setId(int id)
Set the unique id of this bean instance. |
void |
setUserAnswers(UserAnswers userAnswers)
Set the UserAnswers of this Answer |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
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
id
protected int id
- This object's id
UserAnswersId
protected int UserAnswersId
- The UserAnswers
AnsweredQuestionId
protected int AnsweredQuestionId
- The AnsweredQuestion
| Constructor Detail |
SimpleAnswer
public SimpleAnswer()
- Construct a new blank SimpleAnswer, giving it a new unique ID.
SimpleAnswer
public SimpleAnswer(int id)
- Get a current SimpleAnswer from the RuntimeDataSource, given an id.
| Method Detail |
setId
public void setId(int id)
getId
public int getId()
save
public void save()
delete
public void delete()
setUserAnswers
public void setUserAnswers(UserAnswers userAnswers)
- Set the UserAnswers of this Answer
- Specified by:
setUserAnswersin interfaceAnswer
getUserAnswers
public UserAnswers getUserAnswers()
- Get the UserAnswers of this Answer
- Specified by:
getUserAnswersin interfaceAnswer
setAnsweredQuestion
public void setAnsweredQuestion(Question answeredQuestion)
- Set the AnsweredQuestion of this Answer
- Specified by:
setAnsweredQuestionin interfaceAnswer
getAnsweredQuestion
public Question getAnsweredQuestion()
- Get the AnsweredQuestion of this Answer
- Specified by:
getAnsweredQuestionin interfaceAnswer
setAnswerGiven
public abstract void setAnswerGiven(java.lang.Object answerGiven) throws com.RuntimeCollective.questionnaire.InvalidAnswerException
- Set the AnswerGiven of this Answer
- Specified by:
setAnswerGivenin interfaceAnswer
getAnswerGiven
public abstract java.lang.Object getAnswerGiven()
- Get the AnswerGiven of this Answer
- Specified by:
getAnswerGivenin interfaceAnswer
|
|||||||||
| Home >> All >> com >> RuntimeCollective >> questionnaire >> [ bean overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
com.RuntimeCollective.questionnaire.bean.SimpleAnswer