org.appfuse.dao
Interface UserDao

All Superinterfaces:
GenericDao<User,java.lang.Long>
All Known Implementing Classes:
UserDaoJpa

public interface UserDao
extends GenericDao<User,java.lang.Long>

User Data Access Object (GenericDao) interface.

Author:
Matt Raible

Method Summary
 java.lang.String getUserPassword(java.lang.String username)
          Retrieves the password in DB for a user
 java.util.List<User> getUsers()
          Gets a list of users ordered by the uppercase version of their username.
 org.springframework.security.userdetails.UserDetails loadUserByUsername(java.lang.String username)
          Gets users information based on login name.
 User saveUser(User user)
          Saves a user's information.
 
Methods inherited from interface org.appfuse.dao.GenericDao
exists, get, getAll, getAllDistinct, remove, save
 

Method Detail

loadUserByUsername

@Transactional
org.springframework.security.userdetails.UserDetails loadUserByUsername(java.lang.String username)
                                                                        throws org.springframework.security.userdetails.UsernameNotFoundException
Gets users information based on login name.

Parameters:
username - the user's username
Returns:
userDetails populated userDetails object
Throws:
org.springframework.security.userdetails.UsernameNotFoundException - thrown when user not found in database

getUsers

java.util.List<User> getUsers()
Gets a list of users ordered by the uppercase version of their username.

Returns:
List populated list of users

saveUser

User saveUser(User user)
Saves a user's information.

Parameters:
user - the object to be saved
Returns:
the persisted User object

getUserPassword

@Transactional(propagation=NOT_SUPPORTED)
java.lang.String getUserPassword(java.lang.String username)
Retrieves the password in DB for a user

Parameters:
username - the user's username
Returns:
the password in DB, if the user is already persisted


Copyright © 2003-2009. All Rights Reserved.