ensemble
Class User

java.lang.Object
  extended by ensemble.User

public class User
extends java.lang.Object

This class holds information representing a single user.


Constructor Summary
User(java.lang.String name, java.lang.String password, boolean excluded)
          Creates a new user object with the given name and password.
 
Method Summary
 java.lang.String getName()
          The username of the user.
 java.lang.String getPassword()
          The password of the user.
 boolean isExcluded()
          Determines if predictions submitted by the user should be excluded from ensembles.
static void setDb(DatabaseBean db)
          Sets the static data member that gives the class access to the database.
 void setExcluded(boolean excluded)
          Sets the flag indicating whether predictions submitted by the user should be excluded from ensembles.
 void setPassword(java.lang.String password)
          Sets the password of the user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

User

public User(java.lang.String name,
            java.lang.String password,
            boolean excluded)
Creates a new user object with the given name and password.

Parameters:
name - The new user's name
password - The new user's password
Method Detail

getName

public java.lang.String getName()
The username of the user.

Returns:
The user's name

getPassword

public java.lang.String getPassword()
The password of the user.

Returns:
The user's password

setPassword

public void setPassword(java.lang.String password)
Sets the password of the user.


isExcluded

public boolean isExcluded()
Determines if predictions submitted by the user should be excluded from ensembles.

Returns:
True if the predictions should be excluded, else false

setExcluded

public void setExcluded(boolean excluded)
                 throws java.sql.SQLException,
                        java.io.IOException
Sets the flag indicating whether predictions submitted by the user should be excluded from ensembles.

Parameters:
excluded - True to exclude the user's predictions, else false
Throws:
java.sql.SQLException
java.io.IOException

setDb

public static void setDb(DatabaseBean db)
Sets the static data member that gives the class access to the database.

Parameters:
db - The databaseBean for the application