public class HibernateSchedulerDAO extends Object implements SchedulerDAO
Constructor and Description |
---|
HibernateSchedulerDAO()
Default Public constructor
|
Modifier and Type | Method and Description |
---|---|
void |
createTask(TaskDefinition task)
Creates a new task.
|
void |
deleteTask(Integer taskId)
Delete task from database.
|
void |
deleteTask(TaskDefinition taskConfig)
Delete task from database.
|
Schedule |
getSchedule(Integer scheduleId)
Get schedule by internal identifier
|
TaskDefinition |
getTask(Integer taskId)
Get task by internal identifier
|
TaskDefinition |
getTaskByName(String name)
Get task by public name.
|
List<TaskDefinition> |
getTasks()
Find all tasks in the database
|
void |
setSessionFactory(org.hibernate.SessionFactory sessionFactory)
Set session factory
|
void |
updateTask(TaskDefinition task)
Update task
|
public void setSessionFactory(org.hibernate.SessionFactory sessionFactory)
sessionFactory
- public void createTask(TaskDefinition task) throws DAOException
createTask
in interface SchedulerDAO
task
- to be createdDAOException
public TaskDefinition getTask(Integer taskId) throws DAOException
getTask
in interface SchedulerDAO
taskId
- internal task identifierDAOException
public TaskDefinition getTaskByName(String name) throws DAOException
getTaskByName
in interface SchedulerDAO
name
- public task nameDAOException
public void updateTask(TaskDefinition task) throws DAOException
updateTask
in interface SchedulerDAO
task
- to be updatedDAOException
public List<TaskDefinition> getTasks() throws DAOException
getTasks
in interface SchedulerDAO
List
of all tasksDAOException
public void deleteTask(Integer taskId) throws DAOException
deleteTask
in interface SchedulerDAO
taskId
- Integer
identifier of task to be deletedDAOException
public void deleteTask(TaskDefinition taskConfig) throws DAOException
deleteTask
in interface SchedulerDAO
taskConfig
- TaskDefinition
of task to be deletedDAOException
public Schedule getSchedule(Integer scheduleId) throws DAOException
getSchedule
in interface SchedulerDAO
scheduleId
- internal schedule identifierDAOException
Copyright © 2018 OpenMRS LLC.. All Rights Reserved.