@Service public class TaskDao extends AbstractDao
connection, dateFormat| Constructor and Description |
|---|
TaskDao() |
| Modifier and Type | Method and Description |
|---|---|
void |
deleteExecutionEvents(long id)
Delete execution events method.
|
void |
deleteTask(long id)
Delete task method.
|
Set<Long> |
findExecutionWithErrorsNotRevised()
Find all executions not revised.
|
List<TaskExecutionEvent> |
getExecutionEvents(long taskExecutionId)
Get execution events.
|
List<TaskExecution> |
getExecutions(long taskId)
Get executions for a task.
|
TaskExecution |
getTaskExecutionById(String taskExecutionId)
Get task execution by id.
|
long |
insertTask(FormProperties taskProperties)
Insert task.
|
long |
insertTaskExecution(long taskId)
Insert task execution.
|
void |
insertTaskExecutionEvent(long taskExecutionId,
String description,
String type)
Insert task execution event.
|
List<FormProperties> |
loadAllTasks()
Load all tasks from database.
|
FormProperties |
loadTaskById(long id)
Load task by id
|
void |
markAllAsRevised(String id)
Mark every execution of a task as revised.
|
void |
markAsRevised(String id)
Mark an execution as revised.
|
void |
stopAllTasks()
Stop all tasks.
|
void |
updateTask(FormProperties taskProperties)
Update task data.
|
void |
updateTaskExecution(long taskId,
String state)
Update task execution.
|
void |
updateTaskRunningState(long id,
boolean running)
Update task running state.
|
void |
updateTaskScheduledState(long id,
boolean scheduled)
Update task scheduled state.
|
public long insertTask(FormProperties taskProperties) throws SQLException
taskProperties - task propertiesSQLException - exceptionpublic void insertTaskExecutionEvent(long taskExecutionId,
String description,
String type)
throws SQLException
taskExecutionId - task execution idtype - typeSQLException - exceptionpublic List<FormProperties> loadAllTasks() throws SQLException
SQLException - exceptionpublic FormProperties loadTaskById(long id) throws SQLException
id - task idSQLException - exceptionpublic void updateTaskExecution(long taskId,
String state)
throws SQLException
taskId - task idstate - execution stateSQLException - exceptionpublic void stopAllTasks()
throws SQLException
SQLException - exceptionpublic long insertTaskExecution(long taskId)
throws SQLException
taskId - task idSQLException - exceptionpublic List<TaskExecution> getExecutions(long taskId) throws SQLException, ParseException
taskId - task idSQLException - exceptionParseException - exceptionpublic TaskExecution getTaskExecutionById(String taskExecutionId) throws SQLException, ParseException
taskExecutionId - task execution idSQLException - exceptionParseException - exceptionpublic List<TaskExecutionEvent> getExecutionEvents(long taskExecutionId) throws SQLException
taskExecutionId - execution idSQLException - exceptionpublic void updateTaskRunningState(long id,
boolean running)
throws SQLException
id - task idrunning - running stateSQLException - exceptionpublic void updateTaskScheduledState(long id,
boolean scheduled)
throws SQLException
id - task idscheduled - scheduled stateSQLException - exceptionpublic void updateTask(FormProperties taskProperties) throws SQLException
taskProperties - task propertiesSQLException - exceptionpublic void markAsRevised(String id) throws SQLException
id - execution idSQLException - exceptionpublic Set<Long> findExecutionWithErrorsNotRevised() throws ParseException, SQLException
ParseException - exceptionSQLException - exceptionpublic void markAllAsRevised(String id) throws SQLException
id - task idSQLException - exceptionpublic void deleteTask(long id)
throws SQLException
id - task idSQLException - exceptionpublic void deleteExecutionEvents(long id)
throws SQLException
id - task idSQLException - exceptionCopyright © 2021 Pivotal Software, Inc.. All rights reserved.