org.springframework.cloud.dataflow.server.repository

## Class JdbcDataflowTaskExecutionDao

- java.lang.Object
- - org.springframework.cloud.dataflow.server.repository.JdbcDataflowTaskExecutionDao

- All Implemented Interfaces:
    DataflowTaskExecutionDao

      public class JdbcDataflowTaskExecutionDao
      extends Object
      implements DataflowTaskExecutionDao

  Manages Task Execution information using a JDBC DataSource. Mirrors the `JdbcTaskExecutionDao` but contains Spring Cloud Data Flow specific operations. This functionality might be migrated to Spring Cloud Task itself eventually.
  Author:
    Gunnar Hillert, Glenn Renfro, Ilayaperumal Gopinathan

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `JdbcDataflowTaskExecutionDao(DataSource dataSource, org.springframework.cloud.task.configuration.TaskProperties taskProperties)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `deleteTaskExecutionParamsByTaskExecutionIds(Set<Long> taskExecutionIds)` Deletes 1 or more task execution parameter records.
    `int` | `deleteTaskExecutionsByTaskExecutionIds(Set<Long> taskExecutionIds)` Deletes 1 or more task executions
    `int` | `deleteTaskTaskBatchRelationshipsByTaskExecutionIds(Set<Long> taskExecutionIds)` Deletes 1 or more task batch relationship records that links batch executions to task executions.
    `Set<Long>` | `findChildTaskExecutionIds(Set<Long> taskExecutionIds)` Finds all the child tasks for the taskExecution that is provided.
    `Set<Long>` | `getAllTaskExecutionIds(boolean onlyCompleted, String taskName)` Returns all the task execution IDs of the completed task executions.
    `Integer` | `getAllTaskExecutionsCount(boolean onlyCompleted, String taskName)` Returns the size of all the task executions with the option to include only the completed executions.
    `Set<Long>` | `getTaskExecutionIdsByTaskName(String taskName)` Returns the Set of task execution IDs by the given task name.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### JdbcDataflowTaskExecutionDao

          public JdbcDataflowTaskExecutionDao(DataSource dataSource,
                                              org.springframework.cloud.task.configuration.TaskProperties taskProperties)

      Parameters:
        `dataSource` - used by the dao to execute queries and updates the tables.
        `taskProperties` - the `TaskProperties` to use for this dao.

  - ### Method Detail

    - #### deleteTaskExecutionsByTaskExecutionIds

          public int deleteTaskExecutionsByTaskExecutionIds(Set<Long> taskExecutionIds)

      Description copied from interface: `DataflowTaskExecutionDao`
      Deletes 1 or more task executions
      Specified by:
        `deleteTaskExecutionsByTaskExecutionIds` in interface `DataflowTaskExecutionDao`
      Parameters:
        `taskExecutionIds` - Must contain at least 1 taskExecutionId
      Returns:
        The number of affected records

    - #### deleteTaskExecutionParamsByTaskExecutionIds

          public int deleteTaskExecutionParamsByTaskExecutionIds(Set<Long> taskExecutionIds)

      Description copied from interface: `DataflowTaskExecutionDao`
      Deletes 1 or more task execution parameter records.
      Specified by:
        `deleteTaskExecutionParamsByTaskExecutionIds` in interface `DataflowTaskExecutionDao`
      Parameters:
        `taskExecutionIds` - Must contain at least 1 taskExecutionId
      Returns:
        The number of affected records

    - #### deleteTaskTaskBatchRelationshipsByTaskExecutionIds

          public int deleteTaskTaskBatchRelationshipsByTaskExecutionIds(Set<Long> taskExecutionIds)

      Description copied from interface: `DataflowTaskExecutionDao`
      Deletes 1 or more task batch relationship records that links batch executions to task executions.
      Specified by:
        `deleteTaskTaskBatchRelationshipsByTaskExecutionIds` in interface `DataflowTaskExecutionDao`
      Parameters:
        `taskExecutionIds` - Must contain at least 1 taskExecutionId
      Returns:
        The number of affected records

    - #### findChildTaskExecutionIds

          public Set<Long> findChildTaskExecutionIds(Set<Long> taskExecutionIds)

      Description copied from interface: `DataflowTaskExecutionDao`
      Finds all the child tasks for the taskExecution that is provided.
      Specified by:
        `findChildTaskExecutionIds` in interface `DataflowTaskExecutionDao`
      Parameters:
        `taskExecutionIds` - The ids to the`TaskExecution`s to be searched
      Returns:
        a list of child `TaskExecution`s that correspond to the `TaskExecution`s passed.

    - #### getTaskExecutionIdsByTaskName

          public Set<Long> getTaskExecutionIdsByTaskName(String taskName)

      Description copied from interface: `DataflowTaskExecutionDao`
      Returns the Set of task execution IDs by the given task name.
      Specified by:
        `getTaskExecutionIdsByTaskName` in interface `DataflowTaskExecutionDao`
      Parameters:
        `taskName` - the task name
      Returns:
        the Set of task execution IDs

    - #### getAllTaskExecutionsCount

          public Integer getAllTaskExecutionsCount(boolean onlyCompleted,
                                                   String taskName)

      Description copied from interface: `DataflowTaskExecutionDao`
      Returns the size of all the task executions with the option to include only the completed executions.
      Specified by:
        `getAllTaskExecutionsCount` in interface `DataflowTaskExecutionDao`
      Parameters:
        `onlyCompleted` - filter by completed task executions
        `taskName` - the task name, if null then retrieve all the tasks

    - #### getAllTaskExecutionIds

          public Set<Long> getAllTaskExecutionIds(boolean onlyCompleted,
                                                  String taskName)

      Description copied from interface: `DataflowTaskExecutionDao`
      Returns all the task execution IDs of the completed task executions.
      Specified by:
        `getAllTaskExecutionIds` in interface `DataflowTaskExecutionDao`
      Parameters:
        `onlyCompleted` - filter by completed task executions
        `taskName` - the task name, if null then retrieve all the tasks

Copyright © 2021 Pivotal Software, Inc.. All rights reserved.