@Repository(value="userDao") public class UserDaoHibernate extends GenericDaoHibernate<User,Long> implements UserDao, org.springframework.security.core.userdetails.UserDetailsService
log| Constructor and Description |
|---|
UserDaoHibernate()
Constructor that sets the entity to User.class.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getUserPassword(Long userId)
Retrieves the password in DB for a user
|
List<User> |
getUsers()
Gets a list of users ordered by the uppercase version of their username.
|
org.springframework.security.core.userdetails.UserDetails |
loadUserByUsername(String username)
Gets users information based on login name.
|
User |
save(User user)
Overridden simply to call the saveUser method.
|
User |
saveUser(User user)
Saves a user's information.
|
exists, findByNamedQuery, get, getAll, getAllDistinct, getSession, getSessionFactory, reindex, reindexAll, remove, remove, search, setSessionFactoryclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexists, findByNamedQuery, get, getAll, getAllDistinct, reindex, reindexAll, remove, remove, searchpublic UserDaoHibernate()
public List<User> getUsers()
public User save(User user)
save in interface GenericDao<User,Long>save in class GenericDaoHibernate<User,Long>user - the user to savepublic org.springframework.security.core.userdetails.UserDetails loadUserByUsername(String username) throws org.springframework.security.core.userdetails.UsernameNotFoundException
loadUserByUsername in interface UserDaoloadUserByUsername in interface org.springframework.security.core.userdetails.UserDetailsServiceusername - the user's usernameorg.springframework.security.core.userdetails.UsernameNotFoundException - thrown when user not
found in databasepublic String getUserPassword(Long userId)
getUserPassword in interface UserDaouserId - the user's idCopyright © 2003–2013. All rights reserved.