Class JobBuilder

java.lang.Object
org.springframework.batch.core.job.builder.JobBuilderHelper<JobBuilder>
org.springframework.batch.core.job.builder.JobBuilder

public class JobBuilder extends JobBuilderHelper<JobBuilder>
Convenience for building jobs of various kinds.
Since:
2.2
Author:
Dave Syer, Mahmoud Ben Hassine
  • Constructor Details

    • JobBuilder

      @Deprecated(since="5.0", forRemoval=true) public JobBuilder(String name)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Create a new builder for a job with the given name.
      Parameters:
      name - the name of the job
    • JobBuilder

      public JobBuilder(String name, JobRepository jobRepository)
      Create a new builder for a job with the given name.
      Parameters:
      name - the name of the job
      jobRepository - the job repository to which the job should report to
      Since:
      5.0
  • Method Details

    • start

      public SimpleJobBuilder start(Step step)
      Create a new job builder that will execute a step or sequence of steps.
      Parameters:
      step - a step to execute
      Returns:
      a SimpleJobBuilder
    • start

      public JobFlowBuilder start(Flow flow)
      Create a new job builder that will execute a flow.
      Parameters:
      flow - a flow to execute
      Returns:
      a JobFlowBuilder
    • start

      public JobFlowBuilder start(JobExecutionDecider decider)
      Create a new job builder that will start with a decider.
      Parameters:
      decider - a decider to start with
      Returns:
      a JobFlowBuilder
      Since:
      5.1
    • flow

      public JobFlowBuilder flow(Step step)
      Create a new job builder that will execute a step or sequence of steps.
      Parameters:
      step - a step to execute
      Returns:
      a JobFlowBuilder