org.springframework.batch.core.job.builder

## Class SimpleJobBuilder

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

-     public class SimpleJobBuilder
      extends JobBuilderHelper<SimpleJobBuilder>

  Since:
    2.2
  Author:
    Dave Syer

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.springframework.batch.core.job.builder.JobBuilderHelper

      `JobBuilderHelper.CommonJobProperties`

  - ### Field Summary

    - ### Fields inherited from class org.springframework.batch.core.job.builder.JobBuilderHelper

      `logger`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SimpleJobBuilder(JobBuilderHelper<?> parent)` Create a new builder initialized with any properties in the parent.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Job` | `build()`
    `JobFlowBuilder` | `next(JobExecutionDecider decider)` Continue with this decider if the previous step was successful.
    `SimpleJobBuilder` | `next(Step step)` Continue or end a job with this step if the previous step was successful.
    `FlowBuilder.TransitionBuilder<FlowJobBuilder>` | `on(java.lang.String pattern)` Branch into a flow conditional on the outcome of the current step.
    `FlowBuilder.SplitBuilder<FlowJobBuilder>` | `split(org.springframework.core.task.TaskExecutor executor)`
    `JobFlowBuilder` | `start(JobExecutionDecider decider)` Start with this decider.
    `SimpleJobBuilder` | `start(Step step)` Start the job with this step.

    - ### Methods inherited from class org.springframework.batch.core.job.builder.JobBuilderHelper

      `enhance, getJobRepository, getName, incrementer, isRestartable, listener, preventRestart, repository, validator`

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

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

- - ### Constructor Detail

    - #### SimpleJobBuilder

          public SimpleJobBuilder(JobBuilderHelper<?> parent)

      Create a new builder initialized with any properties in the parent. The parent is copied, so it can be re-used.
      Parameters:
        `parent` - the parent to use

  - ### Method Detail

    - #### build

          public Job build()

    - #### start

          public SimpleJobBuilder start(Step step)

      Start the job with this step.
      Parameters:
        `step` - a step to start with
      Returns:
        this for fluent chaining

    - #### on

          public FlowBuilder.TransitionBuilder<FlowJobBuilder> on(java.lang.String pattern)

      Branch into a flow conditional on the outcome of the current step.
      Parameters:
        `pattern` - a pattern for the exit status of the current step
      Returns:
        a builder for fluent chaining

    - #### start

          public JobFlowBuilder start(JobExecutionDecider decider)

      Start with this decider. Returns a flow builder and when the flow is ended a job builder will be returned to continue the job configuration if needed.
      Parameters:
        `decider` - a decider to execute first
      Returns:
        builder for fluent chaining

    - #### next

          public JobFlowBuilder next(JobExecutionDecider decider)

      Continue with this decider if the previous step was successful. Returns a flow builder and when the flow is ended a job builder will be returned to continue the job configuration if needed.
      Parameters:
        `decider` - a decider to execute next
      Returns:
        builder for fluent chaining

    - #### next

          public SimpleJobBuilder next(Step step)

      Continue or end a job with this step if the previous step was successful.
      Parameters:
        `step` - a step to execute next
      Returns:
        this for fluent chaining

    - #### split

          public FlowBuilder.SplitBuilder<FlowJobBuilder> split(org.springframework.core.task.TaskExecutor executor)

      Parameters:
        `executor` - instance of `TaskExecutor` to be used.
      Returns:
        builder for fluent chaining