| Constructor and Description |
|---|
JdbcUserDao() |
| Modifier and Type | Method and Description |
|---|---|
void |
createUser(User user)
Creates a new user.
|
void |
deleteUser(int userId)
Finds and removes the user from the persistence mechanism.
|
void |
deleteUser(String userName)
Finds and removes the user from the persistence mechanism.
|
int |
getUserCount()
Queries the persistence mechanism and returns the number of users.
|
List<User> |
getUserList()
Requests a List of all users from the persistence mechanism.
|
User |
lookupUser(int userId)
Looks up and retrieves a user from the persistence mechanism using the userId.
|
User |
lookupUser(String userName)
Looks up and retrieves a user from the persistence mechanism using the userName.
|
void |
updatePassword(User user)
Updates the User's Password
|
void |
updateUser(User user)
Saves changes made to an existing user.
|
public User lookupUser(int userId)
lookupUser in interface UserDaouserId - The id of the user we are trying to locate (will be unique for each user).org.springframework.dao.RecoverableDataAccessException - If unable to lookup table with the given user id.public User lookupUser(String userName)
lookupUser in interface UserDaouserName - The userName of the user we are trying to locate (will be unique for each user).org.springframework.dao.RecoverableDataAccessException - If unable to lookup table with the given user id.public List<User> getUserList()
getUserList in interface UserDaopublic int getUserCount()
getUserCount in interface UserDaopublic void deleteUser(int userId)
deleteUser in interface UserDaouserId - The userId in the persistence mechanism.org.springframework.dao.RecoverableDataAccessException - If unable to find and delete the user.public void deleteUser(String userName)
deleteUser in interface UserDaouserName - The userName in the persistence mechanismorg.springframework.dao.RecoverableDataAccessException - If unable to find and delete the user.public void createUser(User user)
createUser in interface UserDaouser - The user to be created.org.springframework.dao.RecoverableDataAccessException - If the user we are trying to create already exists.public void updateUser(User user)
updateUser in interface UserDaouser - The existing user with changes that needs to be saved.org.springframework.dao.RecoverableDataAccessException - If unable to find the user to update.public void updatePassword(User user)
updatePassword in interface UserDaouser - The user to whose password we need to update.org.springframework.dao.RecoverableDataAccessException - If unable to find the user to update.Copyright © 1999–2013 UCAR/Unidata. All rights reserved.