public class AccountDaoJdbc extends JdbcBaseClass implements AccountDao
Modifier and Type | Class and Description |
---|---|
protected class |
AccountDaoJdbc.AccountCount |
protected class |
AccountDaoJdbc.AccountInsert
Owner Insert Object. |
protected class |
AccountDaoJdbc.AccountPasswordUpdate
Account Password Update Object. |
protected class |
AccountDaoJdbc.AccountUpdate
Account Update Object. |
autoincrement, dbType, DEBUG, ds, logger
Constructor and Description |
---|
AccountDaoJdbc() |
Modifier and Type | Method and Description |
---|---|
BSAccount |
getAccount(int userid)
Get a BSAccount based on a numeric userid
|
BSAccount |
getAccount(java.lang.String username) |
BSAccount |
getAccount(java.lang.String username,
java.lang.String password)
Get an Account based on username and password.
|
BSAccount |
getAccountByEmail(java.lang.String email) |
BSAccount |
getAccountByToken(int token) |
int |
getUserCount() |
void |
insertAccount(BSAccount account) |
void |
resetTable()
unused in jdbc implementation
|
void |
updateAccount(BSAccount account) |
void |
updateAccountPassword(BSAccount account,
java.lang.String newPassword)
Change the user's password
|
setAutoincrement, setDataSource, setDbType
public BSAccount getAccount(java.lang.String username) throws DataAccessException
getAccount
in interface AccountDao
DataAccessException
public BSAccount getAccount(int userid) throws DataAccessException
AccountDao
getAccount
in interface AccountDao
userid
- The useridDataAccessException
public BSAccount getAccountByToken(int token)
getAccountByToken
in interface AccountDao
public BSAccount getAccountByEmail(java.lang.String email) throws DataAccessException
getAccountByEmail
in interface AccountDao
DataAccessException
public BSAccount getAccount(java.lang.String username, java.lang.String password) throws DataAccessException
AccountDao
getAccount
in interface AccountDao
username
- His typed in usernamepassword
- His typed in passwordDataAccessException
public void insertAccount(BSAccount account) throws DataAccessException
insertAccount
in interface AccountDao
DataAccessException
public void updateAccount(BSAccount account) throws DataAccessException
updateAccount
in interface AccountDao
DataAccessException
public void updateAccountPassword(BSAccount account, java.lang.String newPassword) throws DataAccessException
AccountDao
updateAccountPassword
in interface AccountDao
account
- His BSAccountnewPassword
- His new passwordDataAccessException
public int getUserCount()
getUserCount
in interface AccountDao
public void resetTable()
resetTable
in interface AccountDao
AccountDao.resetTable()