org.springframework.cloud.dataflow.server.batch

## Class JdbcSearchableJobExecutionDao

- java.lang.Object
- - org.springframework.batch.core.repository.dao.AbstractJdbcBatchMetadataDao
  - - org.springframework.batch.core.repository.dao.JdbcJobExecutionDao
    - - org.springframework.cloud.dataflow.server.batch.JdbcSearchableJobExecutionDao

- All Implemented Interfaces:
    org.springframework.batch.core.repository.dao.JobExecutionDao, org.springframework.beans.factory.InitializingBean, SearchableJobExecutionDao

      public class JdbcSearchableJobExecutionDao
      extends org.springframework.batch.core.repository.dao.JdbcJobExecutionDao
      implements SearchableJobExecutionDao

  Author:
    Dave Syer, Michael Minella, Glenn Renfro

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `protected class` | `JdbcSearchableJobExecutionDao.JobExecutionRowMapper` Re-usable mapper for `JobExecution` instances.
    `protected class` | `JdbcSearchableJobExecutionDao.JobExecutionStepCountRowMapper` Re-usable mapper for `JobExecutionWithStepCount` instances.

  - ### Field Summary

    - ### Fields inherited from class org.springframework.batch.core.repository.dao.AbstractJdbcBatchMetadataDao

      `DEFAULT_EXIT_MESSAGE_LENGTH, DEFAULT_TABLE_PREFIX`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JdbcSearchableJobExecutionDao()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `afterPropertiesSet()`
    `int` | `countJobExecutions()`
    `int` | `countJobExecutions(org.springframework.batch.core.BatchStatus status)` Gets count of job executions.
    `int` | `countJobExecutions(String jobName)` Gets count of job executions.
    `int` | `countJobExecutions(String jobName, org.springframework.batch.core.BatchStatus status)` Gets count of job executions.
    `List<org.springframework.batch.core.JobExecution>` | `getJobExecutions(org.springframework.batch.core.BatchStatus status, int start, int count)` Get the `JobExecutions` for a specific status in reverse order of creation (so normally of execution).
    `List<org.springframework.batch.core.JobExecution>` | `getJobExecutions(int start, int count)` Get the `JobExecutions` in reverse order of creation (so normally of execution).
    `List<org.springframework.batch.core.JobExecution>` | `getJobExecutions(String jobName, org.springframework.batch.core.BatchStatus status, int start, int count)` Get the `JobExecutions` for a specific job name in reverse order of creation (so normally of execution).
    `List<org.springframework.batch.core.JobExecution>` | `getJobExecutions(String jobName, int start, int count)` Get the `JobExecutions` for a specific job name in reverse order of creation (so normally of execution).
    `List<JobExecutionWithStepCount>` | `getJobExecutionsWithStepCount(Date fromDate, Date toDate, int start, int count)` Get the `JobExecutions` for a specific date range in reverse order of creation (so normally of execution).
    `List<JobExecutionWithStepCount>` | `getJobExecutionsWithStepCount(int start, int count)` Get the `JobExecutions` in reverse order of creation (so normally of execution) without StepExecution.
    `List<JobExecutionWithStepCount>` | `getJobExecutionsWithStepCount(String jobName, int start, int count)` Get the `JobExecutions` for a specific job name in reverse order of creation (so normally of execution).
    `List<JobExecutionWithStepCount>` | `getJobExecutionsWithStepCountFilteredByJobInstanceId(int jobInstanceId, int start, int count)` Get the `JobExecutions` for a specific job instance id in reverse order of creation (so normally of execution).
    `List<JobExecutionWithStepCount>` | `getJobExecutionsWithStepCountFilteredByTaskExecutionId(int taskExecutionId, int start, int count)` Get the `JobExecutions` for a specific task execution id in reverse order of creation (so normally of execution).
    `Collection<org.springframework.batch.core.JobExecution>` | `getRunningJobExecutions()` Find all the running executions (status less than STOPPING).
    `void` | `saveJobExecution(org.springframework.batch.core.JobExecution jobExecution)`
    `void` | `setDataSource(DataSource dataSource)`
    `void` | `synchronizeStatus(org.springframework.batch.core.JobExecution jobExecution)`
    `void` | `updateJobExecution(org.springframework.batch.core.JobExecution jobExecution)`

    - ### Methods inherited from class org.springframework.batch.core.repository.dao.JdbcJobExecutionDao

      `findJobExecutions, findRunningJobExecutions, getJobExecution, getJobParameters, getLastJobExecution, setExitMessageLength, setJobExecutionIncrementer`

    - ### Methods inherited from class org.springframework.batch.core.repository.dao.AbstractJdbcBatchMetadataDao

      `getClobTypeToUse, getJdbcTemplate, getQuery, getTablePrefix, setClobTypeToUse, setJdbcTemplate, setTablePrefix`

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

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

    - ### Methods inherited from interface org.springframework.batch.core.repository.dao.JobExecutionDao

      `findJobExecutions, findRunningJobExecutions, getJobExecution, getLastJobExecution`

- - ### Constructor Detail

    - #### JdbcSearchableJobExecutionDao

          public JdbcSearchableJobExecutionDao()

  - ### Method Detail

    - #### setDataSource

          public void setDataSource(DataSource dataSource)

      Parameters:
        `dataSource` - the dataSource to set

    - #### afterPropertiesSet

          public void afterPropertiesSet()
                                  throws Exception

      Specified by:
        `afterPropertiesSet` in interface `org.springframework.beans.factory.InitializingBean`
      Overrides:
        `afterPropertiesSet` in class `org.springframework.batch.core.repository.dao.JdbcJobExecutionDao`
      Throws:
        `Exception`
      See Also:
        `JdbcJobExecutionDao.afterPropertiesSet()`

    - #### countJobExecutions

          public int countJobExecutions()

      Specified by:
        `countJobExecutions` in interface `SearchableJobExecutionDao`
      Returns:
        the total number of `JobExecution` instances
      See Also:
        `SearchableJobExecutionDao.countJobExecutions()`

    - #### countJobExecutions

          public int countJobExecutions(String jobName)

      Description copied from interface: `SearchableJobExecutionDao`
      Gets count of job executions.
      Specified by:
        `countJobExecutions` in interface `SearchableJobExecutionDao`
      Parameters:
        `jobName` - the name of a job
      Returns:
        the number of `JobExecutions` belonging to this job
      See Also:
        `SearchableJobExecutionDao.countJobExecutions(String)`

    - #### countJobExecutions

          public int countJobExecutions(org.springframework.batch.core.BatchStatus status)

      Description copied from interface: `SearchableJobExecutionDao`
      Gets count of job executions.
      Specified by:
        `countJobExecutions` in interface `SearchableJobExecutionDao`
      Parameters:
        `status` - the job status
      Returns:
        the number of `JobExecutions` belonging to this job
      See Also:
        `SearchableJobExecutionDao.countJobExecutions(BatchStatus)`

    - #### countJobExecutions

          public int countJobExecutions(String jobName,
                                        org.springframework.batch.core.BatchStatus status)

      Description copied from interface: `SearchableJobExecutionDao`
      Gets count of job executions.
      Specified by:
        `countJobExecutions` in interface `SearchableJobExecutionDao`
      Parameters:
        `jobName` - the name of a job
        `status` - the job status
      Returns:
        the number of `JobExecutions` belonging to this job
      See Also:
        `SearchableJobExecutionDao.countJobExecutions(String, BatchStatus)`

    - #### getJobExecutionsWithStepCount

          public List<JobExecutionWithStepCount> getJobExecutionsWithStepCount(Date fromDate,
                                                                               Date toDate,
                                                                               int start,
                                                                               int count)

      Description copied from interface: `SearchableJobExecutionDao`
      Get the `JobExecutions` for a specific date range in reverse order of creation (so normally of execution).
      Specified by:
        `getJobExecutionsWithStepCount` in interface `SearchableJobExecutionDao`
      Parameters:
        `fromDate` - the date which start date must be greater than.
        `toDate` - the date which start date must be less than.
        `start` - the start index of the instances
        `count` - the maximum number of instances to return
      Returns:
        the `JobExecutionWithStepCount` instances requested
      See Also:
        `SearchableJobExecutionDao.getJobExecutionsWithStepCount(Date, Date, int, int)`

    - #### getJobExecutionsWithStepCountFilteredByJobInstanceId

          public List<JobExecutionWithStepCount> getJobExecutionsWithStepCountFilteredByJobInstanceId(int jobInstanceId,
                                                                                                      int start,
                                                                                                      int count)

      Description copied from interface: `SearchableJobExecutionDao`
      Get the `JobExecutions` for a specific job instance id in reverse order of creation (so normally of execution).
      Specified by:
        `getJobExecutionsWithStepCountFilteredByJobInstanceId` in interface `SearchableJobExecutionDao`
      Parameters:
        `jobInstanceId` - the job instance id associated with the execution.
        `start` - the start index of the instances
        `count` - the maximum number of instances to return
      Returns:
        the `JobExecutionWithStepCount` instances requested

    - #### getJobExecutionsWithStepCountFilteredByTaskExecutionId

          public List<JobExecutionWithStepCount> getJobExecutionsWithStepCountFilteredByTaskExecutionId(int taskExecutionId,
                                                                                                        int start,
                                                                                                        int count)

      Description copied from interface: `SearchableJobExecutionDao`
      Get the `JobExecutions` for a specific task execution id in reverse order of creation (so normally of execution).
      Specified by:
        `getJobExecutionsWithStepCountFilteredByTaskExecutionId` in interface `SearchableJobExecutionDao`
      Parameters:
        `taskExecutionId` - the task execution id associated with the execution.
        `start` - the start index of the instances
        `count` - the maximum number of instances to return
      Returns:
        the `JobExecutionWithStepCount` instances requested

    - #### getRunningJobExecutions

          public Collection<org.springframework.batch.core.JobExecution> getRunningJobExecutions()

      Description copied from interface: `SearchableJobExecutionDao`
      Find all the running executions (status less than STOPPING).
      Specified by:
        `getRunningJobExecutions` in interface `SearchableJobExecutionDao`
      Returns:
        all the `JobExecution` instances that are currently running
      See Also:
        `SearchableJobExecutionDao.getRunningJobExecutions()`

    - #### getJobExecutions

          public List<org.springframework.batch.core.JobExecution> getJobExecutions(String jobName,
                                                                                    org.springframework.batch.core.BatchStatus status,
                                                                                    int start,
                                                                                    int count)

      Description copied from interface: `SearchableJobExecutionDao`
      Get the `JobExecutions` for a specific job name in reverse order of creation (so normally of execution).
      Specified by:
        `getJobExecutions` in interface `SearchableJobExecutionDao`
      Parameters:
        `jobName` - the name of the job
        `status` - the status of the job
        `start` - the start index of the instances
        `count` - the maximum number of instances to return
      Returns:
        the `JobExecution` instances requested
      See Also:
        `SearchableJobExecutionDao.getJobExecutions(String, BatchStatus, int, int)`

    - #### getJobExecutions

          public List<org.springframework.batch.core.JobExecution> getJobExecutions(String jobName,
                                                                                    int start,
                                                                                    int count)

      Description copied from interface: `SearchableJobExecutionDao`
      Get the `JobExecutions` for a specific job name in reverse order of creation (so normally of execution).
      Specified by:
        `getJobExecutions` in interface `SearchableJobExecutionDao`
      Parameters:
        `jobName` - the name of the job
        `start` - the start index of the instances
        `count` - the maximum number of instances to return
      Returns:
        the `JobExecution` instances requested
      See Also:
        `SearchableJobExecutionDao.getJobExecutions(String, int, int)`

    - #### getJobExecutions

          public List<org.springframework.batch.core.JobExecution> getJobExecutions(org.springframework.batch.core.BatchStatus status,
                                                                                    int start,
                                                                                    int count)

      Description copied from interface: `SearchableJobExecutionDao`
      Get the `JobExecutions` for a specific status in reverse order of creation (so normally of execution).
      Specified by:
        `getJobExecutions` in interface `SearchableJobExecutionDao`
      Parameters:
        `status` - the status of the job
        `start` - the start index of the instances
        `count` - the maximum number of instances to return
      Returns:
        the `JobExecution` instances requested

    - #### getJobExecutionsWithStepCount

          public List<JobExecutionWithStepCount> getJobExecutionsWithStepCount(String jobName,
                                                                               int start,
                                                                               int count)

      Description copied from interface: `SearchableJobExecutionDao`
      Get the `JobExecutions` for a specific job name in reverse order of creation (so normally of execution).
      Specified by:
        `getJobExecutionsWithStepCount` in interface `SearchableJobExecutionDao`
      Parameters:
        `jobName` - the name of the job
        `start` - the start index of the instances
        `count` - the maximum number of instances to return
      Returns:
        the `JobExecutionWithStepCount` instances requested
      See Also:
        `SearchableJobExecutionDao.getJobExecutionsWithStepCount(String, int, int)`

    - #### getJobExecutions

          public List<org.springframework.batch.core.JobExecution> getJobExecutions(int start,
                                                                                    int count)

      Description copied from interface: `SearchableJobExecutionDao`
      Get the `JobExecutions` in reverse order of creation (so normally of execution).
      Specified by:
        `getJobExecutions` in interface `SearchableJobExecutionDao`
      Parameters:
        `start` - the start index of the instances
        `count` - the maximum number of instances to return
      Returns:
        the `JobExecution` instances requested
      See Also:
        `SearchableJobExecutionDao.getJobExecutions(int, int)`

    - #### getJobExecutionsWithStepCount

          public List<JobExecutionWithStepCount> getJobExecutionsWithStepCount(int start,
                                                                               int count)

      Description copied from interface: `SearchableJobExecutionDao`
      Get the `JobExecutions` in reverse order of creation (so normally of execution) without StepExecution.
      Specified by:
        `getJobExecutionsWithStepCount` in interface `SearchableJobExecutionDao`
      Parameters:
        `start` - the start index of the instances
        `count` - the maximum number of instances to return
      Returns:
        the `JobExecutionWithStepCount` instances requested

    - #### saveJobExecution

          public void saveJobExecution(org.springframework.batch.core.JobExecution jobExecution)

      Specified by:
        `saveJobExecution` in interface `org.springframework.batch.core.repository.dao.JobExecutionDao`
      Overrides:
        `saveJobExecution` in class `org.springframework.batch.core.repository.dao.JdbcJobExecutionDao`

    - #### synchronizeStatus

          public void synchronizeStatus(org.springframework.batch.core.JobExecution jobExecution)

      Specified by:
        `synchronizeStatus` in interface `org.springframework.batch.core.repository.dao.JobExecutionDao`
      Overrides:
        `synchronizeStatus` in class `org.springframework.batch.core.repository.dao.JdbcJobExecutionDao`

    - #### updateJobExecution

          public void updateJobExecution(org.springframework.batch.core.JobExecution jobExecution)

      Specified by:
        `updateJobExecution` in interface `org.springframework.batch.core.repository.dao.JobExecutionDao`
      Overrides:
        `updateJobExecution` in class `org.springframework.batch.core.repository.dao.JdbcJobExecutionDao`

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