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, setDbTypepublic BSAccount getAccount(java.lang.String username)
throws DataAccessException
getAccount in interface AccountDaoDataAccessExceptionpublic BSAccount getAccount(int userid)
throws DataAccessException
AccountDaogetAccount in interface AccountDaouserid - The useridDataAccessExceptionpublic BSAccount getAccountByToken(int token)
getAccountByToken in interface AccountDaopublic BSAccount getAccountByEmail(java.lang.String email)
throws DataAccessException
getAccountByEmail in interface AccountDaoDataAccessExceptionpublic BSAccount getAccount(java.lang.String username,
java.lang.String password)
throws DataAccessException
AccountDaogetAccount in interface AccountDaousername - His typed in usernamepassword - His typed in passwordDataAccessExceptionpublic void insertAccount(BSAccount account)
throws DataAccessException
insertAccount in interface AccountDaoDataAccessExceptionpublic void updateAccount(BSAccount account)
throws DataAccessException
updateAccount in interface AccountDaoDataAccessExceptionpublic void updateAccountPassword(BSAccount account,
java.lang.String newPassword)
throws DataAccessException
AccountDaoupdateAccountPassword in interface AccountDaoaccount - His BSAccountnewPassword - His new passwordDataAccessExceptionpublic int getUserCount()
getUserCount in interface AccountDaopublic void resetTable()
resetTable in interface AccountDaoAccountDao.resetTable()