|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.wpi.prc.user.Volunteer
public class Volunteer
The Volunteer class stores information about each user.
Field Summary | |
---|---|
private java.lang.String |
eMailAddress
|
private long |
id
|
private java.util.Date |
joinDate
|
private java.util.Date |
lastResultDate
|
private long |
score
|
private java.lang.String |
stateStr
|
private java.lang.String |
userID
|
private boolean |
waiting
|
Constructor Summary | |
---|---|
Volunteer()
Default constructor. |
|
Volunteer(java.lang.String userID)
Constructor specifying the user ID |
|
Volunteer(java.lang.String userID,
java.lang.String eMailAddress,
java.util.Date joinDate)
Constructor for new users. |
|
Volunteer(java.lang.String userID,
java.lang.String eMailAddress,
long score,
java.util.Date joinDate,
java.util.Date lastResultDate)
Constructor allowing the specification of all Volunteer attributes. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Returns a copy of this Volunteer. |
void |
decreaseScore(int delta)
Decreases this Volunteer's score by delta points. |
void |
delete()
Deletes this Volunteer from the database. |
boolean |
equals(java.lang.Object o)
Tests whether this Volunteer is the same as another. |
Volunteer[] |
find()
Finds all Volunteers in the database that match the attributes set in the this Volunteer. |
static Volunteer[] |
findAll()
Finds all Volunteers in the database. |
java.lang.String |
getEMailAddress()
|
protected long |
getId()
|
java.util.Date |
getJoinDate()
|
java.util.Date |
getLastResultDate()
|
static int |
getNumUsersWaiting()
|
long |
getScore()
|
VolunteerState |
getState()
|
protected java.lang.String |
getStateStr()
|
java.lang.String |
getUserID()
|
boolean |
getWaiting()
|
void |
increaseScore(int delta)
Increase this Volunteer's score by delta points. |
void |
save()
Saves this Volunteer to the database. |
void |
setEMailAddress(java.lang.String mailAddress)
|
protected void |
setId(long id)
|
void |
setJoinDate(java.util.Date joinDate)
|
void |
setLastResultDate(java.util.Date lastResultDate)
|
void |
setScore(long score)
|
void |
setState(VolunteerState state)
Sets the state of this volunteer. |
protected void |
setStateStr(java.lang.String stateStr)
|
void |
setUserID(java.lang.String userID)
|
void |
setWaiting(boolean isWaiting)
|
java.lang.String |
toString()
Converts this Volunteer to a String. |
void |
update()
Updates this Volunteer in the database. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private long id
private java.lang.String userID
private java.lang.String eMailAddress
private long score
private java.util.Date joinDate
private java.util.Date lastResultDate
private java.lang.String stateStr
private boolean waiting
Constructor Detail |
---|
public Volunteer()
public Volunteer(java.lang.String userID)
userID
- The user ID.public Volunteer(java.lang.String userID, java.lang.String eMailAddress, java.util.Date joinDate)
userID
- The user ID.eMailAddress
- The user's e-mail address.joinDate
- The date the user joined the PRC project.public Volunteer(java.lang.String userID, java.lang.String eMailAddress, long score, java.util.Date joinDate, java.util.Date lastResultDate)
userID
- The user ID.eMailAddress
- The user's e-mail address.score
- The user's score.joinDate
- The date the user joined the PRC project.lastResultDate
- The date the user last returned a result.Method Detail |
---|
protected long getId()
protected void setId(long id)
id
- The id to set.public java.lang.String getEMailAddress()
public void setEMailAddress(java.lang.String mailAddress)
mailAddress
- The eMailAddress to set.public long getScore()
public void setScore(long score)
score
- The score to set.public void increaseScore(int delta)
delta
- The amount by which to increase the score.public void decreaseScore(int delta)
delta
- The amount by which to decrease the score.public java.lang.String getUserID()
public void setUserID(java.lang.String userID)
userID
- The userID to set.public java.util.Date getJoinDate()
public void setJoinDate(java.util.Date joinDate)
joinDate
- The joinDate to set.public java.util.Date getLastResultDate()
public void setLastResultDate(java.util.Date lastResultDate)
lastResultDate
- The lastResultDate to set.protected java.lang.String getStateStr()
protected void setStateStr(java.lang.String stateStr)
stateStr
- The stateStr to set.public VolunteerState getState()
public void setState(VolunteerState state)
state
- The state to set.public boolean getWaiting()
public void setWaiting(boolean isWaiting)
isWaiting
- The isWaiting to set.public void save()
public void update()
public Volunteer[] find()
public static Volunteer[] findAll()
public void delete()
public static int getNumUsersWaiting()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- The other Volunteer.
public java.lang.Object clone()
clone
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |