|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.ramapuram.thomas.dao.hibernate.GenericDaoHibernate<User,java.lang.Long>
net.ramapuram.thomas.dao.hibernate.UserDaoHibernate
@Repository(value="userDao") public class UserDaoHibernate
This class interacts with Spring's HibernateTemplate to save/delete and retrieve User objects.
| Field Summary |
|---|
| Fields inherited from class net.ramapuram.thomas.dao.hibernate.GenericDaoHibernate |
|---|
log |
| Constructor Summary | |
|---|---|
UserDaoHibernate()
Constructor that sets the entity to User.class. |
|
| 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.core.userdetails.UserDetails |
loadUserByUsername(java.lang.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. |
| Methods inherited from class net.ramapuram.thomas.dao.hibernate.GenericDaoHibernate |
|---|
exists, findByNamedQuery, get, getAll, getAllDistinct, getHibernateTemplate, getSessionFactory, remove, setSessionFactory |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface net.ramapuram.thomas.dao.GenericDao |
|---|
exists, findByNamedQuery, get, getAll, getAllDistinct, remove |
| Constructor Detail |
|---|
public UserDaoHibernate()
| Method Detail |
|---|
public java.util.List<User> getUsers()
getUsers in interface UserDaopublic User saveUser(User user)
saveUser in interface UserDaouser - the object to be saved
public User save(User user)
save in interface GenericDao<User,java.lang.Long>save in class GenericDaoHibernate<User,java.lang.Long>user - the user to save
public org.springframework.security.core.userdetails.UserDetails loadUserByUsername(java.lang.String username)
throws org.springframework.security.core.userdetails.UsernameNotFoundException
loadUserByUsername in interface UserDaoloadUserByUsername in interface org.springframework.security.core.userdetails.UserDetailsServiceusername - the user's username
org.springframework.security.core.userdetails.UsernameNotFoundException - thrown when user not
found in databasepublic java.lang.String getUserPassword(java.lang.String username)
getUserPassword in interface UserDaousername - the user's username
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||