net.sourceforge.jsurveyor
Class Evaluation

java.lang.Object
  extended bynet.sourceforge.jsurveyor.Evaluation

public class Evaluation
extends java.lang.Object

This is a container class to handle a users submitted answers for a questionnaire. It holds references to the user that has submitted the evaluation, reference to the questionnaire, a timestampt and a list of the answers contained in the evaluation.

Version:
1.0
Author:
Claus Methmann Christensen, Anders Spliid Hansen, Esben Iversen Hansen, Lars H Jensen, Marcus Overheu, Thomas Ramdal, Peter Thomsen

Constructor Summary
Evaluation()
          Constructor for Evaluation
Evaluation(int evaluationID, java.lang.String userName, int questionnaireID)
          Constructor for Evaluation
Evaluation(int evaluationID, java.lang.String userName, int questionnaireID, long date, java.util.ArrayList answers)
          Constructor for Evaluation, usage only through DataAccess.
Evaluation(java.lang.String userName, int questionnaireID)
          Constructor for Evaluation
 
Method Summary
 void addAnswer(net.sourceforge.jsurveyor.Answer answer)
          Adds an answer to the evaluation
 java.util.ArrayList getAnswers()
          Returns an ArrayList containing toString representations of all the answers in the evaluation
 int getAnswerSize()
          Returns the number of answers
 int getEvaluationID()
          Returns the evaluations ID.
 int getQuestionnaireID()
          Returns an id of the questionnaire that this is an evaluation for.
 long getTimestamp()
          Returns the timestamp of the object.
 java.lang.String getUserName()
          Returns the username of the person that has submitted this evaluation.
 void setEvaluationID(int evaluationID)
          Sets an ID for the evaluation.
 void setQuestionnaireID(int questionnaireID)
          Sets the questionnaire that this is an evaluation for.
 void setTimestamp(java.util.Date timestamp)
          Sets a timestampt for the object.
 void setUserName(java.lang.String userNameInput)
          Sets the name of the person who has submitted the evaluation.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Evaluation

public Evaluation()
Constructor for Evaluation


Evaluation

public Evaluation(java.lang.String userName,
                  int questionnaireID)
Constructor for Evaluation

Parameters:
userName - String
questionnaireID - int

Evaluation

public Evaluation(int evaluationID,
                  java.lang.String userName,
                  int questionnaireID)
Constructor for Evaluation

Parameters:
evaluationID - int
userName - String
questionnaireID - int

Evaluation

public Evaluation(int evaluationID,
                  java.lang.String userName,
                  int questionnaireID,
                  long date,
                  java.util.ArrayList answers)
Constructor for Evaluation, usage only through DataAccess.

Parameters:
evaluationID - int
userName - String
questionnaireID - int
date - long
answers - ArrayList
Method Detail

setEvaluationID

public void setEvaluationID(int evaluationID)
Sets an ID for the evaluation.

Parameters:
evaluationID - int

getEvaluationID

public int getEvaluationID()
Returns the evaluations ID.

Returns:
int

setUserName

public void setUserName(java.lang.String userNameInput)
Sets the name of the person who has submitted the evaluation.

Parameters:
userNameInput - String

getUserName

public java.lang.String getUserName()
Returns the username of the person that has submitted this evaluation.

Returns:
String

setTimestamp

public void setTimestamp(java.util.Date timestamp)
Sets a timestampt for the object. The timestampt represents when the evaluation has been submitted.

Parameters:
timestamp - Date

getTimestamp

public long getTimestamp()
Returns the timestamp of the object. The timestampt represents when the evaluation has been submitted.

Returns:
Date

setQuestionnaireID

public void setQuestionnaireID(int questionnaireID)
Sets the questionnaire that this is an evaluation for.

Parameters:
questionnaireID - int

getQuestionnaireID

public int getQuestionnaireID()
Returns an id of the questionnaire that this is an evaluation for.

Returns:
int

getAnswers

public java.util.ArrayList getAnswers()
Returns an ArrayList containing toString representations of all the answers in the evaluation

Returns:
ArrayList

addAnswer

public void addAnswer(net.sourceforge.jsurveyor.Answer answer)
Adds an answer to the evaluation

Parameters:
answer - Answer

getAnswerSize

public int getAnswerSize()
Returns the number of answers