| Constructor and Description |
|---|
DatabaseImpl() |
| Modifier and Type | Method and Description |
|---|---|
BSAccount |
getAccount(int userid)
Get an account via the numeric userid
|
BSAccount |
getAccount(java.lang.String username) |
BSAccount |
getAccount(java.lang.String username,
java.lang.String password) |
BSAccount |
getAccountByEmail(java.lang.String email) |
BSAccount |
getAccountByToken(int token)
Get an account by the recovery token.
|
int |
getUserCount()
Get the number of users in the database.
|
void |
insertAccount(BSAccount account) |
void |
setAccountDao(AccountDao accountDao) |
void |
updateAccount(BSAccount account) |
void |
updateAccountPassword(BSAccount account,
java.lang.String newPassword)
Change the user's password
|
public void setAccountDao(AccountDao accountDao)
accountDao - the accountDao to setpublic BSAccount getAccount(java.lang.String username,
java.lang.String password)
getAccount in interface Databasepublic BSAccount getAccount(java.lang.String username)
getAccount in interface Databasepublic BSAccount getAccount(int userid)
DatabasegetAccount in interface Databaseuserid - The user's unique numeric idnull if no accountpublic BSAccount getAccountByToken(int token)
DatabasegetAccountByToken in interface Databasetoken - The token that was emailed to the user.public BSAccount getAccountByEmail(java.lang.String email)
getAccountByEmail in interface Databasepublic void insertAccount(BSAccount account)
insertAccount in interface Databasepublic void updateAccount(BSAccount account)
updateAccount in interface Databasepublic void updateAccountPassword(BSAccount account,
java.lang.String newPassword)
DatabaseupdateAccountPassword in interface Databaseaccount - His BSAccountnewPassword - His new passwordpublic int getUserCount()
DatabasegetUserCount in interface Database