类 JdbcJobInstanceDao

  • 所有已实现的接口:
    JobInstanceDao, org.springframework.beans.factory.InitializingBean

    public class JdbcJobInstanceDao
    extends AbstractJdbcBatchMetadataDao
    implements JobInstanceDao, org.springframework.beans.factory.InitializingBean
    JDBC implementation of JobInstanceDao. Uses sequences (via Spring's DataFieldMaxValueIncrementer abstraction) to create all primary keys before inserting a new row. Objects are checked to ensure all mandatory fields to be stored are not null. If any are found to be null, an IllegalArgumentException will be thrown. This could be left to JdbcTemplate, however, the exception will be fairly vague, and fails to highlight which field caused the exception.
    作者:
    Lucas Ward, Dave Syer, Robert Kasanicky, Michael Minella, Will Schipp, Mahmoud Ben Hassine
    • 方法详细资料

      • getJobInstance

        @Nullable
        public JobInstance getJobInstance​(@Nullable
                                          java.lang.Long instanceId)
        从接口复制的说明: JobInstanceDao
        Fetch the job instance with the provided identifier.
        指定者:
        getJobInstance 在接口中 JobInstanceDao
        参数:
        instanceId - the job identifier
        返回:
        the job instance with this identifier or null if it doesn't exist
      • getJobNames

        public java.util.List<java.lang.String> getJobNames()
        从接口复制的说明: JobInstanceDao
        Retrieve the names of all job instances sorted alphabetically - i.e. jobs that have ever been executed.
        指定者:
        getJobNames 在接口中 JobInstanceDao
        返回:
        the names of all job instances
      • getJobInstances

        public java.util.List<JobInstancegetJobInstances​(java.lang.String jobName,
                                                           int start,
                                                           int count)
        从接口复制的说明: JobInstanceDao
        Fetch the last job instances with the provided name, sorted backwards by primary key. if using the JdbcJobInstance, you can provide the jobName with a wildcard (e.g. *Job) to return 'like' job names. (e.g. *Job will return 'someJob' and 'otherJob')
        指定者:
        getJobInstances 在接口中 JobInstanceDao
        参数:
        jobName - the job name
        start - the start index of the instances to return
        count - the maximum number of objects to return
        返回:
        the job instances with this name or empty if none
      • setJobIncrementer

        public void setJobIncrementer​(org.springframework.jdbc.support.incrementer.DataFieldMaxValueIncrementer jobIncrementer)
        Setter for DataFieldMaxValueIncrementer to be used when generating primary keys for JobInstance instances.
        参数:
        jobIncrementer - the DataFieldMaxValueIncrementer
      • findJobInstancesByName

        public java.util.List<JobInstancefindJobInstancesByName​(java.lang.String jobName,
                                                                  int start,
                                                                  int count)
        从接口复制的说明: JobInstanceDao
        Fetch the last job instances with the provided name, sorted backwards by primary key, using a 'like' criteria
        指定者:
        findJobInstancesByName 在接口中 JobInstanceDao
        参数:
        jobName - String containing the name of the job.
        start - int containing the offset of where list of job instances results should begin.
        count - int containing the number of job instances to return.
        返回:
        a list of JobInstance for the job name requested.