org.openmrs.api.db
Interface ContextDAO

All Known Implementing Classes:
HibernateContextDAO

public interface ContextDAO

Defines the functions that the Context needs to access the database

Version:
1.1

Method Summary
 User authenticate(java.lang.String username, java.lang.String password)
          Authenticate user with the given username and password.
 void checkCoreDataset()
          Compares core data against the current database and inserts data into the database where necessary
 void clearSession()
          Clear session.
 void closeDatabaseConnection()
           
 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 openSession()
          Open session.
 void shutdown()
          Stops the OpenMRS System Should be called after all activity has ended and application is closing
 void startup(java.util.Properties props)
          Starts the OpenMRS System Should be called prior to any kind of activity
 

Method Detail

authenticate

@Transactional(readOnly=true)
User authenticate(java.lang.String username,
                                java.lang.String password)
                  throws ContextAuthenticationException
Authenticate user with the given username and password.

Parameters:
username -
password -
Returns:
Throws:
ContextAuthenticationException

openSession

void openSession()
Open session.


closeSession

void closeSession()
Close session.


clearSession

@Transactional
void clearSession()
Clear session.


evictFromSession

void evictFromSession(java.lang.Object obj)
Used to clear a cached object out of a session in the middle of a unit of work. Future updates to this object will not be saved. Future gets of this object will not fetch this cached copy

Parameters:
obj - The object to evict/remove from the session
See Also:
Context.evictFromSession(Object)

startup

@Transactional
void startup(java.util.Properties props)
Starts the OpenMRS System Should be called prior to any kind of activity

Parameters:
Properties -

shutdown

@Transactional
void shutdown()
Stops the OpenMRS System Should be called after all activity has ended and application is closing


checkCoreDataset

@Transactional
void checkCoreDataset()
Compares core data against the current database and inserts data into the database where necessary


closeDatabaseConnection

void closeDatabaseConnection()

OpenMRS-trunk

Generated May 29 2008 02:01 AM. NOTE - these libraries are in active development and subject to change