Class TaskDao


  • @Service
    public class TaskDao
    extends AbstractDao
    Task dao.
    Author:
    jabad
    • Constructor Detail

      • TaskDao

        public TaskDao()
    • Method Detail

      • insertTaskExecutionEvent

        public void insertTaskExecutionEvent​(long taskExecutionId,
                                             String description,
                                             String type)
                                      throws SQLException
        Insert task execution event.
        Parameters:
        taskExecutionId - task execution id
        type - type
        Throws:
        SQLException
      • updateTaskExecution

        public void updateTaskExecution​(long taskId,
                                        String state)
                                 throws SQLException
        Update task execution.
        Parameters:
        taskId - task id
        state - execution state
        Throws:
        SQLException
      • insertTaskExecution

        public long insertTaskExecution​(long taskId)
                                 throws SQLException
        Insert task execution.
        Parameters:
        taskId - task id
        Returns:
        the id for the new value stored
        Throws:
        SQLException - exception
      • getExecutionEvents

        public List<TaskExecutionEvent> getExecutionEvents​(long taskExecutionId)
                                                    throws SQLException
        Get execution events.
        Parameters:
        taskExecutionId - execution id
        Returns:
        a list of events for an execution
        Throws:
        SQLException
      • updateTaskRunningState

        public void updateTaskRunningState​(long id,
                                           boolean running)
                                    throws SQLException
        Update task running state.
        Parameters:
        id - task id
        running - running state
        Throws:
        SQLException
      • updateTaskScheduledState

        public void updateTaskScheduledState​(long id,
                                             boolean scheduled)
                                      throws SQLException
        Update task scheduled state.
        Parameters:
        id - task id
        scheduled - scheduled state
        Throws:
        SQLException - exception
      • markAsRevised

        public void markAsRevised​(String id)
                           throws SQLException
        Mark an execution as revised.
        Parameters:
        id - execution id
        Throws:
        SQLException
      • findExecutionWithErrorsNotRevised

        public Set<Long> findExecutionWithErrorsNotRevised()
                                                    throws SQLException
        Find all executions not revised.
        Returns:
        a list of executions
        Throws:
        SQLException
      • markAllAsRevised

        public void markAllAsRevised​(String id)
                              throws SQLException
        Mark every execution of a task as revised.
        Parameters:
        id - task id
        Throws:
        SQLException
      • deleteTask

        public void deleteTask​(long id)
                        throws SQLException
        Delete task method.
        Parameters:
        id - task id
        Throws:
        SQLException
      • deleteExecutionEvents

        public void deleteExecutionEvents​(long id)
                                   throws SQLException
        Delete execution events method.
        Parameters:
        id - task id
        Throws:
        SQLException