ch6.complexForm
Class RequestDataComplex

java.lang.Object
  extended by ch6.complexForm.RequestDataComplex

public class RequestDataComplex
extends java.lang.Object

Uses multiple-valued properties for checkbox groups and multiple selection lists. Single-valued properties are used for all other input elements.


Field Summary
protected  java.lang.String comments
          Variable for the textarea element.
protected  java.lang.String[] extra
          Array for the checkbox group.
protected  double grade
          Variable for the single-select list.
protected  int happiness
          Variable for the radio group.
protected  java.lang.String secretCode
          Variable for the password element.
protected  java.lang.String[] team
          Array for the multiple-select list.
 
Constructor Summary
RequestDataComplex()
          Creates a new instance of RequestData
 
Method Summary
 java.lang.String getComments()
          Accessor for the textarea element.
 java.lang.String[] getExtra()
          Accessor for the checkbox group.
 double getGrade()
          Accessor for the single-select list.
 int getHappiness()
          Accessor for the radio group.
 java.lang.String getSecretCode()
          Accessor for the password field.
 java.lang.String[] getTeam()
          Accessor for the multiple-select list.
 void setComments(java.lang.String comments)
          Mutator for the textarea element.
 void setExtra(java.lang.String[] extra)
          Mutator for the checkbox group.
 void setGrade(double grade)
          Mutator for the single-select list.
 void setHappiness(int happiness)
          Mutator for the radio group.
 void setSecretCode(java.lang.String code)
          Mutator for the password field.
 void setTeam(java.lang.String[] team)
          Mutator for the multiple-select list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

secretCode

protected java.lang.String secretCode
Variable for the password element.


happiness

protected int happiness
Variable for the radio group. It is single-valued, since only one of the radio buttons can be selected. It can also be null.


extra

protected java.lang.String[] extra
Array for the checkbox group. It is multiple-valued since the checkbox group can have more than one box selected. It can also be null.


comments

protected java.lang.String comments
Variable for the textarea element. It is single-valued since it only contains one string.


grade

protected double grade
Variable for the single-select list. It is single-valued since only one option in the list can be selected. It cannot be null, since the first element in the list is the default selected element.


team

protected java.lang.String[] team
Array for the multiple-select list. It is multiple-valued since the list can have more than one option selected. It can also be null.

Constructor Detail

RequestDataComplex

public RequestDataComplex()
Creates a new instance of RequestData

Method Detail

setSecretCode

public void setSecretCode(java.lang.String code)
Mutator for the password field. It is single-valued, since only one of the radio buttons can be selected. It can also be null.

Parameters:
code - The code from the request data.

getSecretCode

public java.lang.String getSecretCode()
Accessor for the password field. It is single-valued, since only one of the radio buttons can be selected. It can also be null.

Returns:
The password

setHappiness

public void setHappiness(int happiness)
Mutator for the radio group. It is single-valued, since only one of the radio buttons can be selected. It can also be null.

Parameters:
happiness - The happiness from the request data.

getHappiness

public int getHappiness()
Accessor for the radio group. It is single-valued, since only one of the radio buttons can be selected. It can also be null.

Returns:
The level of happines

setExtra

public void setExtra(java.lang.String[] extra)
Mutator for the checkbox group. It is multiple-valued since the user can select more than one.

Parameters:
extra - The list of extras from the request data.

getExtra

public java.lang.String[] getExtra()
Accessor for the checkbox group. It is multiple-valued since more than one box can be checked.

Returns:
The list of extras

setComments

public void setComments(java.lang.String comments)
Mutator for the textarea element. It is single-valued since it only contains one string.

Parameters:
comments - The comments from the request data.

getComments

public java.lang.String getComments()
Accessor for the textarea element. It is single-valued since it only contains one string.

Returns:
The comments

setGrade

public void setGrade(double grade)
Mutator for the single-select list. It is single-valued since only one option in the list can be selected. It cannot be null, since the first element in the list is the default selected element.

Parameters:
grade - The grade from the request data.

getGrade

public double getGrade()
Accessor for the single-select list. It is single-valued since only one option in the list can be selected. It cannot be null, since the first element in the list is the default selected element.

Returns:
The value for the grade

setTeam

public void setTeam(java.lang.String[] team)
Mutator for the multiple-select list. It is multiple-valued since the list can have more than one option selected. It can also be null.

Parameters:
team - The list of teams from the request data.

getTeam

public java.lang.String[] getTeam()
Accessor for the multiple-select list. It is multiple-valued since the list can have more than one option selected. It can also be null.

Returns:
The values for the team