org.appfuse.dao.hibernate
Class UserDaoHibernate
java.lang.Object
org.springframework.dao.support.DaoSupport
org.springframework.orm.hibernate3.support.HibernateDaoSupport
org.appfuse.dao.hibernate.BaseDaoHibernate
org.appfuse.dao.hibernate.UserDaoHibernate
- All Implemented Interfaces:
- org.acegisecurity.userdetails.UserDetailsService, Dao, UserDao, InitializingBean
public class UserDaoHibernate
- extends BaseDaoHibernate
- implements UserDao, org.acegisecurity.userdetails.UserDetailsService
This class interacts with Spring's HibernateTemplate to save/delete and
retrieve User objects.
View Source
- Author:
- Matt Raible
Modified by Dan Kibler
Extended to implement Acegi UserDetailsService interface by David Carter [email protected]
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UserDaoHibernate
public UserDaoHibernate()
getUser
public User getUser(Long userId)
- Description copied from interface:
UserDao
- Gets users information based on user id.
- Specified by:
getUser
in interface UserDao
- Parameters:
userId
- the user's id
- Returns:
- user populated user object
- See Also:
UserDao.getUser(Long)
getUsers
public List getUsers(User user)
- Description copied from interface:
UserDao
- Gets a list of users based on parameters passed in.
- Specified by:
getUsers
in interface UserDao
- Returns:
- List populated list of users
- See Also:
UserDao.getUsers(org.appfuse.model.User)
saveUser
public void saveUser(User user)
- Description copied from interface:
UserDao
- Saves a user's information
- Specified by:
saveUser
in interface UserDao
- Parameters:
user
- the object to be saved- See Also:
UserDao.saveUser(org.appfuse.model.User)
removeUser
public void removeUser(Long userId)
- Description copied from interface:
UserDao
- Removes a user from the database by id
- Specified by:
removeUser
in interface UserDao
- Parameters:
userId
- the user's id- See Also:
UserDao.removeUser(Long)
loadUserByUsername
public org.acegisecurity.userdetails.UserDetails loadUserByUsername(String username)
throws org.acegisecurity.userdetails.UsernameNotFoundException
- Description copied from interface:
UserDao
- Gets users information based on login name.
- Specified by:
loadUserByUsername
in interface org.acegisecurity.userdetails.UserDetailsService
- Specified by:
loadUserByUsername
in interface UserDao
- Parameters:
username
- the user's username
- Returns:
- userDetails populated userDetails object
- Throws:
org.acegisecurity.userdetails.UsernameNotFoundException
- See Also:
UserDetailsService.loadUserByUsername(java.lang.String)
Copyright � 2002-2006