org.openmrs.scheduler.db.hibernate
Class HibernateSchedulerDAO

java.lang.Object
  extended by org.openmrs.scheduler.db.hibernate.HibernateSchedulerDAO
All Implemented Interfaces:
SchedulerDAO

public class HibernateSchedulerDAO
extends java.lang.Object
implements SchedulerDAO


Constructor Summary
HibernateSchedulerDAO()
          Default Public constructor
 
Method Summary
 void createTask(TaskDefinition task)
          Creates a new task.
 void deleteTask(java.lang.Integer taskId)
          Delete task from database.
 void deleteTask(TaskDefinition taskConfig)
          Delete task from database.
 Schedule getSchedule(java.lang.Integer scheduleId)
          Get schedule by internal identifier
 TaskDefinition getTask(java.lang.Integer taskId)
          Get task by internal identifier
 TaskDefinition getTaskByName(java.lang.String name)
          Get task by public name.
 java.util.List<TaskDefinition> getTasks()
          Find all tasks in the database
 void setSessionFactory(org.hibernate.SessionFactory sessionFactory)
          Set session factory
 void updateTask(TaskDefinition task)
          Update task
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HibernateSchedulerDAO

public HibernateSchedulerDAO()
Default Public constructor

Method Detail

setSessionFactory

public void setSessionFactory(org.hibernate.SessionFactory sessionFactory)
Set session factory

Parameters:
sessionFactory -

createTask

public void createTask(TaskDefinition task)
                throws DAOException
Creates a new task.

Specified by:
createTask in interface SchedulerDAO
Parameters:
task - to be created
Throws:
DAOException

getTask

public TaskDefinition getTask(java.lang.Integer taskId)
                       throws DAOException
Get task by internal identifier

Specified by:
getTask in interface SchedulerDAO
Parameters:
taskId - internal task identifier
Returns:
task with given internal identifier
Throws:
DAOException

getTaskByName

public TaskDefinition getTaskByName(java.lang.String name)
                             throws DAOException
Get task by public name.

Specified by:
getTaskByName in interface SchedulerDAO
Parameters:
name - public task name
Returns:
task with given public name
Throws:
DAOException

updateTask

public void updateTask(TaskDefinition task)
                throws DAOException
Update task

Specified by:
updateTask in interface SchedulerDAO
Parameters:
task - to be updated
Throws:
DAOException

getTasks

public java.util.List<TaskDefinition> getTasks()
                                        throws DAOException
Find all tasks in the database

Specified by:
getTasks in interface SchedulerDAO
Returns:
List of all tasks
Throws:
DAOException

deleteTask

public void deleteTask(java.lang.Integer taskId)
                throws DAOException
Delete task from database.

Specified by:
deleteTask in interface SchedulerDAO
Parameters:
taskId - Integer identifier of task to be deleted
Throws:
DAOException

deleteTask

public void deleteTask(TaskDefinition taskConfig)
                throws DAOException
Delete task from database.

Specified by:
deleteTask in interface SchedulerDAO
Parameters:
taskConfig - TaskDefinition of task to be deleted
Throws:
DAOException

getSchedule

public Schedule getSchedule(java.lang.Integer scheduleId)
                     throws DAOException
Get schedule by internal identifier

Specified by:
getSchedule in interface SchedulerDAO
Parameters:
scheduleId - internal schedule identifier
Returns:
schedule with given internal identifier
Throws:
DAOException

OpenMRS-1.7.x

Generated Apr 27 2012 10:06 PM. NOTE - these libraries are in active development and subject to change