|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.northwestern.at.wordhoard.server.model.Account
public class Account
An account.
Each account has the following attributes:
| Constructor Summary | |
|---|---|
Account()
Creates a new account. |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
Clones the account. |
boolean |
equals(java.lang.Object obj)
Returns true if some other object is equal to this one. |
boolean |
getCanManageAccounts()
Returns true if the account can manage other accounts. |
java.lang.Long |
getId()
Gets the unique id. |
java.lang.String |
getName()
Gets the name. |
boolean |
getNuAccount()
Returns true if the account is an NU account. |
java.lang.String |
getPassword()
Gets the encrypted password. |
java.lang.String |
getUsername()
Gets the username. |
int |
hashCode()
Returns a hash code for the object. |
boolean |
passwordIsValid(java.lang.String password)
Validates a password. |
void |
setCanManageAccounts(boolean canManageAccounts)
Sets the can manage other accounts attribute. |
void |
setId(java.lang.Long id)
Sets the unique id. |
void |
setName(java.lang.String name)
Sets the name. |
void |
setNuAccount(boolean nuAccount)
Sets the NU account attribute. |
void |
setPassword(java.lang.String password)
Sets the password. |
void |
setUsername(java.lang.String username)
Sets the username. |
java.lang.String |
toString()
Gets a string representation of the account. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Account()
| Method Detail |
|---|
public java.lang.Long getId()
public void setId(java.lang.Long id)
id - The unique id. public java.lang.String getUsername()
public void setUsername(java.lang.String username)
username - The username. public java.lang.String getPassword()
public void setPassword(java.lang.String password)
If the parameter is null or empty, null is stored, otherwise the
password is
encrypted and then stored.
password - The password. public boolean passwordIsValid(java.lang.String password)
password - The unencrypted password.
public java.lang.String getName()
public void setName(java.lang.String name)
name - The name. public boolean getNuAccount()
public void setNuAccount(boolean nuAccount)
nuAccount - True if NU account. public boolean getCanManageAccounts()
public void setCanManageAccounts(boolean canManageAccounts)
canManageAccounts - True if can manage other accounts. public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
The two accounts are equal if their usernames are equal.
equals in class java.lang.Objectobj - The other object.
public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.Object clone()
clone in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||