|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.openmrs.api.db.hibernate.HibernateContextDAO
public class HibernateContextDAO
Hibernate specific implementation of the ContextDAO
. These methods should not be used
directly, instead, the methods on the static Context
file should be used.
ContextDAO
,
Context
Constructor Summary | |
---|---|
HibernateContextDAO()
|
Method Summary | |
---|---|
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HibernateContextDAO()
Method Detail |
---|
public void setSessionFactory(org.hibernate.SessionFactory sessionFactory)
sessionFactory
- public User authenticate(java.lang.String login, java.lang.String password) throws ContextAuthenticationException
ContextDAO
authenticate
in interface ContextDAO
login
- user's username or systemIdpassword
- user's password
ContextAuthenticationException
ContextDAO.authenticate(java.lang.String, java.lang.String)
public User getUserByUuid(java.lang.String uuid)
ContextDAO
Context.getAuthenticatedUser()
method.
getUserByUuid
in interface ContextDAO
uuid
- uuid of user to fetch
ContextDAO.getUserByUuid(java.lang.String)
public void openSession()
ContextDAO
openSession
in interface ContextDAO
public void closeSession()
ContextDAO
closeSession
in interface ContextDAO
Context.closeSession()
public void clearSession()
clearSession
in interface ContextDAO
ContextDAO.clearSession()
public void evictFromSession(java.lang.Object obj)
ContextDAO
evictFromSession
in interface ContextDAO
obj
- The object to evict/remove from the sessionContextDAO.evictFromSession(java.lang.Object)
public void flushSession()
flushSession
in interface ContextDAO
ContextDAO.flushSession()
public void startup(java.util.Properties properties)
ContextDAO
Should be called prior to any kind of activity
startup
in interface ContextDAO
properties
- PropertiesContext.startup(Properties)
public void shutdown()
ContextDAO
shutdown
in interface ContextDAO
Context.shutdown()
public void mergeDefaultRuntimeProperties(java.util.Properties runtimeProperties)
mergeDefaultRuntimeProperties
in interface ContextDAO
runtimeProperties
- The current user specific runtime propertiesContextDAO.mergeDefaultRuntimeProperties(java.util.Properties)
|
OpenMRS-1.7.x | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |