public class HibernateContextDAO extends java.lang.Object implements ContextDAO
ContextDAO. These methods should not be used
directly, instead, the methods on the static Context file should be used.ContextDAO,
Context| Constructor and Description |
|---|
HibernateContextDAO() |
| Modifier and Type | Method and Description |
|---|---|
User |
authenticate(java.lang.String login,
java.lang.String password)
Authenticate user with the given username and password.
|
void |
clearSession() |
void |
closeSession()
Close session.
|
void |
evictFromSession(java.lang.Object obj)
Used to clear a cached object out of a session in the middle of a unit of work.
|
void |
flushSession() |
User |
getUserByUuid(java.lang.String uuid)
Gets a user given the uuid.
|
void |
mergeDefaultRuntimeProperties(java.util.Properties runtimeProperties)
Takes the default properties defined in /metadata/api/hibernate/hibernate.default.properties
and merges it into the user-defined runtime properties
|
void |
openSession()
Open session.
|
void |
setSessionFactory(org.hibernate.SessionFactory sessionFactory)
Session factory to use for this DAO.
|
void |
shutdown()
Stops the OpenMRS System Should be called after all activity has ended and application is
closing
|
void |
startup(java.util.Properties properties)
Starts the OpenMRS System
|
public void setSessionFactory(org.hibernate.SessionFactory sessionFactory)
sessionFactory - public User authenticate(java.lang.String login, java.lang.String password) throws ContextAuthenticationException
ContextDAOauthenticate in interface ContextDAOlogin - user's username or systemIdpassword - user's passwordContextAuthenticationExceptionContextDAO.authenticate(java.lang.String, java.lang.String)public User getUserByUuid(java.lang.String uuid)
ContextDAOContext.getAuthenticatedUser() method.getUserByUuid in interface ContextDAOuuid - uuid of user to fetchContextDAO.getUserByUuid(java.lang.String)public void openSession()
ContextDAOopenSession in interface ContextDAOpublic void closeSession()
ContextDAOcloseSession in interface ContextDAOContext.closeSession()public void clearSession()
clearSession in interface ContextDAOContextDAO.clearSession()public void evictFromSession(java.lang.Object obj)
ContextDAOevictFromSession in interface ContextDAOobj - The object to evict/remove from the sessionContextDAO.evictFromSession(java.lang.Object)public void flushSession()
flushSession in interface ContextDAOContextDAO.flushSession()public void startup(java.util.Properties properties)
ContextDAOShould be called prior to any kind of activity
startup in interface ContextDAOproperties - PropertiesContext.startup(Properties)public void shutdown()
ContextDAOshutdown in interface ContextDAOContext.shutdown()public void mergeDefaultRuntimeProperties(java.util.Properties runtimeProperties)
mergeDefaultRuntimeProperties in interface ContextDAOruntimeProperties - The current user specific runtime propertiesContextDAO.mergeDefaultRuntimeProperties(java.util.Properties)Copyright © 2018 OpenMRS Inc.. All Rights Reserved.