Constructor and Description |
---|
HibernateUserDAO() |
public void setSessionFactory(org.hibernate.SessionFactory sessionFactory)
sessionFactory
- public User getUserByUsername(String username)
getUserByUsername
in interface UserDAO
UserService.getUserByUsername(java.lang.String)
public User getUserByEmail(String email)
getUserByEmail
in interface UserDAO
org.openmrs.api.UserService#getUserByEmail(java.lang.String)
public LoginCredential getLoginCredentialByActivationKey(String activationKey)
UserDAO
getLoginCredentialByActivationKey
in interface UserDAO
activationKey
- User's activation key for password resetUserDAO.getLoginCredentialByActivationKey(java.lang.String)
public boolean hasDuplicateUsername(String username, String systemId, Integer userId)
hasDuplicateUsername
in interface UserDAO
UserService.hasDuplicateUsername(org.openmrs.User)
public User getUser(Integer userId)
getUser
in interface UserDAO
UserService.getUser(java.lang.Integer)
public List<User> getAllUsers() throws DAOException
getAllUsers
in interface UserDAO
DAOException
UserService.getAllUsers()
public void deleteUser(User user)
deleteUser
in interface UserDAO
org.openmrs.api.UserService#deleteUser(org.openmrs.User)
public List<Privilege> getAllPrivileges() throws DAOException
getAllPrivileges
in interface UserDAO
DAOException
UserService.getAllPrivileges()
public Privilege getPrivilege(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 List<Role> getAllRoles() throws DAOException
getAllRoles
in interface UserDAO
DAOException
UserService.getAllRoles()
public Role getRole(String r) throws DAOException
getRole
in interface UserDAO
DAOException
UserService.getRole(String)
public void changePassword(User u, String pw) throws DAOException
changePassword
in interface UserDAO
DAOException
UserDAO.changePassword(org.openmrs.User, java.lang.String)
public void changeHashedPassword(User user, String hashedPassword, String salt) throws DAOException
changeHashedPassword
in interface UserDAO
DAOException
UserDAO.changeHashedPassword(User, String, String)
public void changePassword(String oldPassword, String newPassword) throws DAOException
changePassword
in interface UserDAO
DAOException
UserService.changePassword(java.lang.String, java.lang.String)
public void changeQuestionAnswer(String pw, String question, 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, String question, String answer) throws DAOException
changeQuestionAnswer
in interface UserDAO
DAOException
UserService.changeQuestionAnswer(User, String, String)
public boolean isSecretAnswer(User u, String answer) throws DAOException
isSecretAnswer
in interface UserDAO
DAOException
UserService.isSecretAnswer(User, java.lang.String)
public List<User> getUsers(String name, List<Role> roles, boolean includeRetired, Integer start, Integer length)
getUsers
in interface UserDAO
UserDAO.getUsers(String, List, boolean, Integer, Integer)
public Integer generateSystemId()
generateSystemId
in interface UserDAO
UserService.generateSystemId()
public List<User> getUsersByName(String givenName, String familyName, boolean includeRetired)
getUsersByName
in interface UserDAO
UserService.getUsersByName(java.lang.String, java.lang.String, boolean)
public Privilege getPrivilegeByUuid(String uuid)
getPrivilegeByUuid
in interface UserDAO
UserDAO.getPrivilegeByUuid(java.lang.String)
public Role getRoleByUuid(String uuid)
getRoleByUuid
in interface UserDAO
UserDAO.getRoleByUuid(java.lang.String)
public User getUserByUuid(String uuid)
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(String uuid)
getLoginCredentialByUuid
in interface UserDAO
UserDAO.getLoginCredential(org.openmrs.User)
public void updateLoginCredential(LoginCredential credential)
UserDAO
updateLoginCredential
in interface UserDAO
UserDAO.updateLoginCredential(LoginCredential)
public List<User> getUsersByPerson(Person person, boolean includeRetired)
getUsersByPerson
in interface UserDAO
UserDAO.getUsersByPerson(org.openmrs.Person, boolean)
public Integer getCountOfUsers(String name, List<Role> roles, boolean includeRetired)
getCountOfUsers
in interface UserDAO
UserDAO.getCountOfUsers(String, List, boolean)
public void setUserActivationKey(LoginCredential credentials)
setUserActivationKey
in interface UserDAO
org.openmrs.api.db.UserDAO#createActivationKey(org.openmrs.User)
public String getLastLoginTime(User user)
getLastLoginTime
in interface UserDAO
UserDAO.getLastLoginTime(org.openmrs.User)
Copyright © 2024 OpenMRS Inc.. All rights reserved.