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.
|
TaskDefinition |
getTask(Integer taskId)
Get task by internal identifier
|
TaskDefinition |
getTaskByName(String name)
Get task by public name.
|
TaskDefinition |
getTaskByUuid(String uuid) |
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<TaskDefinition>
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 TaskDefinition getTaskByUuid(String uuid) throws DAOException
getTaskByUuid
in interface SchedulerDAO
DAOException
SchedulerDAO.getTaskByUuid(java.lang.String)
Copyright © 2024 OpenMRS Inc.. All rights reserved.