|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.openmrs.api.db.hibernate.HibernateUserDAO
public class HibernateUserDAO
Hibernate specific database methods for the UserService
Context
,
UserDAO
,
UserService
Field Summary | |
---|---|
protected org.apache.commons.logging.Log |
log
|
Constructor Summary | |
---|---|
HibernateUserDAO()
|
Method Summary | |
---|---|
void |
changeHashedPassword(User user,
java.lang.String hashedPassword,
java.lang.String salt)
|
void |
changePassword(java.lang.String pw,
java.lang.String pw2)
|
void |
changePassword(User u,
java.lang.String pw)
|
void |
changeQuestionAnswer(java.lang.String pw,
java.lang.String question,
java.lang.String answer)
|
void |
changeQuestionAnswer(User u,
java.lang.String question,
java.lang.String answer)
|
void |
deletePrivilege(Privilege privilege)
|
void |
deleteRole(Role role)
|
void |
deleteUser(User user)
|
java.lang.Integer |
generateSystemId()
|
java.util.List<Privilege> |
getAllPrivileges()
|
java.util.List<Role> |
getAllRoles()
|
java.util.List<User> |
getAllUsers()
|
LoginCredential |
getLoginCredential(User user)
|
LoginCredential |
getLoginCredentialByUuid(java.lang.String uuid)
Auto generated method comment |
Privilege |
getPrivilege(java.lang.String p)
|
Privilege |
getPrivilegeByUuid(java.lang.String uuid)
Auto generated method comment |
Role |
getRole(java.lang.String r)
|
Role |
getRoleByUuid(java.lang.String uuid)
Auto generated method comment |
User |
getUser(java.lang.Integer userId)
|
User |
getUserByUsername(java.lang.String username)
|
User |
getUserByUuid(java.lang.String uuid)
Auto generated method comment |
java.util.List<User> |
getUsers(java.lang.String name,
java.util.List<Role> roles,
boolean includeRetired)
|
java.util.List<User> |
getUsersByName(java.lang.String givenName,
java.lang.String familyName,
boolean includeRetired)
|
java.util.List<User> |
getUsersByPerson(Person person,
boolean includeRetired)
|
java.util.List<User> |
getUsersByRole(Role role)
|
boolean |
hasDuplicateUsername(java.lang.String username,
java.lang.String systemId,
java.lang.Integer userId)
|
boolean |
isSecretAnswer(User u,
java.lang.String answer)
|
Privilege |
savePrivilege(Privilege privilege)
|
Role |
saveRole(Role role)
|
User |
saveUser(User user,
java.lang.String password)
|
void |
setSessionFactory(org.hibernate.SessionFactory sessionFactory)
Set session factory |
void |
updateLoginCredential(LoginCredential credential)
Updates a user's login credentials. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final org.apache.commons.logging.Log log
Constructor Detail |
---|
public HibernateUserDAO()
Method Detail |
---|
public void setSessionFactory(org.hibernate.SessionFactory sessionFactory)
sessionFactory
- public User saveUser(User user, java.lang.String password)
saveUser
in interface UserDAO
UserService.saveUser(org.openmrs.User, java.lang.String)
public User getUserByUsername(java.lang.String username)
getUserByUsername
in interface UserDAO
UserService.getUserByUsername(java.lang.String)
public boolean hasDuplicateUsername(java.lang.String username, java.lang.String systemId, java.lang.Integer userId)
hasDuplicateUsername
in interface UserDAO
UserService.hasDuplicateUsername(org.openmrs.User)
public User getUser(java.lang.Integer userId)
getUser
in interface UserDAO
UserService.getUser(java.lang.Integer)
public java.util.List<User> getAllUsers() throws DAOException
getAllUsers
in interface UserDAO
DAOException
UserService.getAllUsers()
public void deleteUser(User user)
deleteUser
in interface UserDAO
UserService.deleteUser(org.openmrs.User)
public java.util.List<User> getUsersByRole(Role role) throws DAOException
DAOException
UserService.getUsersByRole(org.openmrs.Role)
public java.util.List<Privilege> getAllPrivileges() throws DAOException
getAllPrivileges
in interface UserDAO
DAOException
UserService.getAllPrivileges()
public Privilege getPrivilege(java.lang.String p) throws DAOException
getPrivilege
in interface UserDAO
DAOException
UserService.getPrivilege(String)
public void deletePrivilege(Privilege privilege) throws DAOException
deletePrivilege
in interface UserDAO
DAOException
UserDAO.deletePrivilege(org.openmrs.Privilege)
public Privilege savePrivilege(Privilege privilege) throws DAOException
savePrivilege
in interface UserDAO
DAOException
UserDAO.savePrivilege(org.openmrs.Privilege)
public void deleteRole(Role role) throws DAOException
deleteRole
in interface UserDAO
DAOException
UserService.purgeRole(org.openmrs.Role)
public Role saveRole(Role role) throws DAOException
saveRole
in interface UserDAO
DAOException
UserService.saveRole(org.openmrs.Role)
public java.util.List<Role> getAllRoles() throws DAOException
getAllRoles
in interface UserDAO
DAOException
UserService.getAllRoles()
public Role getRole(java.lang.String r) throws DAOException
getRole
in interface UserDAO
DAOException
UserService.getRole(String)
public void changePassword(User u, java.lang.String pw) throws DAOException
changePassword
in interface UserDAO
DAOException
UserDAO.changePassword(org.openmrs.User, java.lang.String)
public void changeHashedPassword(User user, java.lang.String hashedPassword, java.lang.String salt) throws DAOException
changeHashedPassword
in interface UserDAO
DAOException
UserDAO.changeHashedPassword(User, String, String)
public void changePassword(java.lang.String pw, java.lang.String pw2) throws DAOException
changePassword
in interface UserDAO
DAOException
UserService.changePassword(java.lang.String, java.lang.String)
public void changeQuestionAnswer(java.lang.String pw, java.lang.String question, java.lang.String answer) throws DAOException
changeQuestionAnswer
in interface UserDAO
DAOException
UserService.changeQuestionAnswer(java.lang.String, java.lang.String,
java.lang.String)
public void changeQuestionAnswer(User u, java.lang.String question, java.lang.String answer) throws DAOException
changeQuestionAnswer
in interface UserDAO
DAOException
UserService.changeQuestionAnswer(User, String, String)
public boolean isSecretAnswer(User u, java.lang.String answer) throws DAOException
isSecretAnswer
in interface UserDAO
DAOException
UserService.isSecretAnswer(User, java.lang.String)
public java.util.List<User> getUsers(java.lang.String name, java.util.List<Role> roles, boolean includeRetired)
getUsers
in interface UserDAO
UserService.getUsers(java.lang.String, java.util.List, boolean)
public java.lang.Integer generateSystemId()
generateSystemId
in interface UserDAO
UserService.generateSystemId()
public java.util.List<User> getUsersByName(java.lang.String givenName, java.lang.String familyName, boolean includeRetired)
getUsersByName
in interface UserDAO
UserService.getUsersByName(java.lang.String, java.lang.String, boolean)
public Privilege getPrivilegeByUuid(java.lang.String uuid)
UserDAO
getPrivilegeByUuid
in interface UserDAO
UserDAO.getPrivilegeByUuid(java.lang.String)
public Role getRoleByUuid(java.lang.String uuid)
UserDAO
getRoleByUuid
in interface UserDAO
UserDAO.getRoleByUuid(java.lang.String)
public User getUserByUuid(java.lang.String uuid)
UserDAO
getUserByUuid
in interface UserDAO
UserDAO.getUserByUuid(java.lang.String)
public LoginCredential getLoginCredential(User user)
getLoginCredential
in interface UserDAO
UserDAO.getLoginCredential(org.openmrs.User)
public LoginCredential getLoginCredentialByUuid(java.lang.String uuid)
UserDAO
getLoginCredentialByUuid
in interface UserDAO
UserDAO.getLoginCredential(org.openmrs.User)
public void updateLoginCredential(LoginCredential credential)
UserDAO
updateLoginCredential
in interface UserDAO
org.openmrs.api.db.UserDAO#updateLoginCredential(org.openmrs.LoginCredential)
public java.util.List<User> getUsersByPerson(Person person, boolean includeRetired)
getUsersByPerson
in interface UserDAO
UserDAO.getUsersByPerson(org.openmrs.Person, boolean)
|
OpenMRS-1.7.x | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |