org.springframework.cloud.dataflow.server.repository

## Class JdbcDataflowJobExecutionDao

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

- All Implemented Interfaces:
    DataflowJobExecutionDao

      public class JdbcDataflowJobExecutionDao
      extends Object
      implements DataflowJobExecutionDao

  Stores job execution information to a JDBC DataSource. Mirrors the `JdbcJobExecutionDao` but contains Spring Cloud Data Flow specific operations. This functionality might be migrated to Spring Batch itself eventually.
  Author:
    Gunnar Hillert

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `JdbcDataflowJobExecutionDao(DataSource dataSource, String tablePrefix)` Initializes the JdbcDataflowJobExecutionDao.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `deleteBatchJobExecutionByJobExecutionIds(Set<Long> jobExecutionIds)` Delete the batch job execution records from the persistence store for the provided job execution ids.
    `int` | `deleteBatchJobExecutionContextByJobExecutionIds(Set<Long> jobExecutionIds)` Delete the batch job execution context records from the persistence store for the provided job execution ids.
    `int` | `deleteBatchJobExecutionParamsByJobExecutionIds(Set<Long> jobExecutionIds)` Delete the batch job execution parameter records from the persistence store for the provided job execution ids.
    `int` | `deleteBatchStepExecutionContextByStepExecutionIds(Set<Long> stepExecutionIds)` Delete the batch step execution context records from the persistence store for the provided step execution ids.
    `int` | `deleteBatchStepExecutionsByJobExecutionIds(Set<Long> jobExecutionIds)`
    `int` | `deleteUnusedBatchJobInstances()` Will delete any unused job instance records from the persistence store.
    `Set<Long>` | `findStepExecutionIds(Set<Long> jobExecutionIds)` Retrieve the step execution ids for 1 or more job execution ids.

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

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

- - ### Constructor Detail

    - #### JdbcDataflowJobExecutionDao

          public JdbcDataflowJobExecutionDao(DataSource dataSource,
                                             String tablePrefix)

      Initializes the JdbcDataflowJobExecutionDao.
      Parameters:
        `dataSource` - used by the dao to execute queries and update the tables. Must not be null.
        `tablePrefix` - Must not be null or empty.

  - ### Method Detail

    - #### deleteBatchStepExecutionContextByStepExecutionIds

          public int deleteBatchStepExecutionContextByStepExecutionIds(Set<Long> stepExecutionIds)

      Description copied from interface: `DataflowJobExecutionDao`
      Delete the batch step execution context records from the persistence store for the provided step execution ids.
      Specified by:
        `deleteBatchStepExecutionContextByStepExecutionIds` in interface `DataflowJobExecutionDao`
      Parameters:
        `stepExecutionIds` - Must contain at least 1 value
      Returns:
        The number of affected records

    - #### deleteBatchStepExecutionsByJobExecutionIds

          public int deleteBatchStepExecutionsByJobExecutionIds(Set<Long> jobExecutionIds)

      Specified by:
        `deleteBatchStepExecutionsByJobExecutionIds` in interface `DataflowJobExecutionDao`
      Parameters:
        `jobExecutionIds` - Must contain at least 1 value
      Returns:
        The number of affected records

    - #### deleteBatchJobExecutionContextByJobExecutionIds

          public int deleteBatchJobExecutionContextByJobExecutionIds(Set<Long> jobExecutionIds)

      Description copied from interface: `DataflowJobExecutionDao`
      Delete the batch job execution context records from the persistence store for the provided job execution ids.
      Specified by:
        `deleteBatchJobExecutionContextByJobExecutionIds` in interface `DataflowJobExecutionDao`
      Parameters:
        `jobExecutionIds` - Must contain at least 1 value
      Returns:
        The number of affected records

    - #### deleteBatchJobExecutionParamsByJobExecutionIds

          public int deleteBatchJobExecutionParamsByJobExecutionIds(Set<Long> jobExecutionIds)

      Description copied from interface: `DataflowJobExecutionDao`
      Delete the batch job execution parameter records from the persistence store for the provided job execution ids.
      Specified by:
        `deleteBatchJobExecutionParamsByJobExecutionIds` in interface `DataflowJobExecutionDao`
      Parameters:
        `jobExecutionIds` - Must contain at least 1 value
      Returns:
        The number of affected records

    - #### deleteBatchJobExecutionByJobExecutionIds

          public int deleteBatchJobExecutionByJobExecutionIds(Set<Long> jobExecutionIds)

      Description copied from interface: `DataflowJobExecutionDao`
      Delete the batch job execution records from the persistence store for the provided job execution ids.
      Specified by:
        `deleteBatchJobExecutionByJobExecutionIds` in interface `DataflowJobExecutionDao`
      Parameters:
        `jobExecutionIds` - Must contain at least 1 value
      Returns:
        The number of affected records

    - #### deleteUnusedBatchJobInstances

          public int deleteUnusedBatchJobInstances()

      Description copied from interface: `DataflowJobExecutionDao`
      Will delete any unused job instance records from the persistence store.
      Specified by:
        `deleteUnusedBatchJobInstances` in interface `DataflowJobExecutionDao`
      Returns:
        The number of affected records

    - #### findStepExecutionIds

          public Set<Long> findStepExecutionIds(Set<Long> jobExecutionIds)

      Description copied from interface: `DataflowJobExecutionDao`
      Retrieve the step execution ids for 1 or more job execution ids.
      Specified by:
        `findStepExecutionIds` in interface `DataflowJobExecutionDao`
      Parameters:
        `jobExecutionIds` - Must contain at least 1 value
      Returns:
        If no step execution ids are found, an empty collection is returned

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