@Repository(value="userDao") public class UserDaoJpa extends GenericDaoJpa<User,Long> implements UserDao, org.springframework.security.core.userdetails.UserDetailsService
log, PERSISTENCE_UNIT_NAME| Constructor and Description |
|---|
UserDaoJpa()
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 |
saveUser(User user)
Save user and flush entityManager
|
exists, get, getAll, getAllDistinct, getEntityManager, reindex, reindexAll, remove, remove, save, searchclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitexists, get, getAll, getAllDistinct, reindex, reindexAll, remove, remove, save, searchpublic List<User> getUsers()
@Transactional public 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-2012. All Rights Reserved.