@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 propertiesSQLExceptionpublic void insertTaskExecutionEvent(long taskExecutionId,
String description,
String type)
throws SQLException
taskExecutionId - task execution idtype - typeSQLExceptionpublic List<FormProperties> loadAllTasks() throws SQLException
SQLExceptionpublic FormProperties loadTaskById(long id) throws SQLException
id - task idSQLExceptionpublic void updateTaskExecution(long taskId,
String state)
throws SQLException
taskId - task idstate - execution stateSQLExceptionpublic void stopAllTasks()
throws SQLException
SQLExceptionpublic long insertTaskExecution(long taskId)
throws SQLException
taskId - task idSQLException - exceptionpublic List<TaskExecution> getExecutions(long taskId) throws SQLException, ParseException
taskId - task idSQLExceptionParseExceptionpublic TaskExecution getTaskExecutionById(String taskExecutionId) throws SQLException, ParseException
taskExecutionId - task execution idSQLExceptionParseExceptionpublic List<TaskExecutionEvent> getExecutionEvents(long taskExecutionId) throws SQLException
taskExecutionId - execution idSQLExceptionpublic void updateTaskRunningState(long id,
boolean running)
throws SQLException
id - task idrunning - running stateSQLExceptionpublic void updateTaskScheduledState(long id,
boolean scheduled)
throws SQLException
id - task idscheduled - scheduled stateSQLException - exceptionpublic void updateTask(FormProperties taskProperties) throws SQLException
taskProperties - task propertiesSQLExceptionpublic void markAsRevised(String id) throws SQLException
id - execution idSQLExceptionpublic Set<Long> findExecutionWithErrorsNotRevised() throws SQLException
SQLExceptionpublic void markAllAsRevised(String id) throws SQLException
id - task idSQLExceptionpublic void deleteTask(long id)
throws SQLException
id - task idSQLExceptionpublic void deleteExecutionEvents(long id)
throws SQLException
id - task idSQLExceptionCopyright © 2021 Pivotal Software, Inc.. All rights reserved.