public interface Database
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 |
updateAccount(BSAccount account) |
void |
updateAccountPassword(BSAccount account,
java.lang.String newPassword)
Change the user's password
|
BSAccount getAccount(java.lang.String username, java.lang.String password)
BSAccount getAccount(java.lang.String username)
BSAccount getAccount(int userid)
userid
- The user's unique numeric idnull
if no accountBSAccount getAccountByEmail(java.lang.String email)
BSAccount getAccountByToken(int token)
token
- The token that was emailed to the user.void insertAccount(BSAccount account)
void updateAccount(BSAccount account)
void updateAccountPassword(BSAccount account, java.lang.String newPassword)
account
- His BSAccountnewPassword
- His new passwordint getUserCount()