public class HibernateSchedulerDAO extends java.lang.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(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
|
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(java.lang.Integer taskId) throws DAOException
getTask
in interface SchedulerDAO
taskId
- internal task identifierDAOException
public TaskDefinition getTaskByName(java.lang.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 java.util.List<TaskDefinition> getTasks() throws DAOException
getTasks
in interface SchedulerDAO
List
of all tasksDAOException
public void deleteTask(java.lang.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(java.lang.Integer scheduleId) throws DAOException
getSchedule
in interface SchedulerDAO
scheduleId
- internal schedule identifierDAOException
Copyright © 2018 OpenMRS Inc.. All Rights Reserved.