org.springframework.batch.core.repository.dao

## Class MapStepExecutionDao

- java.lang.Object
- - org.springframework.batch.core.repository.dao.MapStepExecutionDao

- All Implemented Interfaces:
    StepExecutionDao

      public class MapStepExecutionDao
      extends java.lang.Object
      implements StepExecutionDao

  In-memory implementation of `StepExecutionDao`.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MapStepExecutionDao()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addStepExecutions(JobExecution jobExecution)` Retrieve all the `StepExecution` for the parent `JobExecution`.
    `void` | `clear()`
    `StepExecution` | `getLastStepExecution(JobInstance jobInstance, java.lang.String stepName)` Retrieve the last `StepExecution` for a given `JobInstance` ordered by starting time and then id.
    `StepExecution` | `getStepExecution(JobExecution jobExecution, java.lang.Long stepExecutionId)` Retrieve a `StepExecution` from its id.
    `void` | `saveStepExecution(StepExecution stepExecution)` Save the given StepExecution.
    `void` | `saveStepExecutions(java.util.Collection<StepExecution> stepExecutions)` Save the given collection of StepExecution as a batch.
    `void` | `updateStepExecution(StepExecution stepExecution)` Update the given StepExecution Preconditions: Id must not be null.

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

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

- - ### Constructor Detail

    - #### MapStepExecutionDao

          public MapStepExecutionDao()

  - ### Method Detail

    - #### clear

          public void clear()

    - #### saveStepExecution

          public void saveStepExecution(StepExecution stepExecution)

      Description copied from interface: `StepExecutionDao`
      Save the given StepExecution. Preconditions: Id must be null. Postconditions: Id will be set to a unique Long.
      Specified by:
        `saveStepExecution` in interface `StepExecutionDao`
      Parameters:
        `stepExecution` - `StepExecution` instance to be saved.

    - #### updateStepExecution

          public void updateStepExecution(StepExecution stepExecution)

      Description copied from interface: `StepExecutionDao`
      Update the given StepExecution Preconditions: Id must not be null.
      Specified by:
        `updateStepExecution` in interface `StepExecutionDao`
      Parameters:
        `stepExecution` - `StepExecution` instance to be updated.

    - #### getStepExecution

          @Nullable
          public StepExecution getStepExecution(JobExecution jobExecution,
                                                          java.lang.Long stepExecutionId)

      Description copied from interface: `StepExecutionDao`
      Retrieve a `StepExecution` from its id.
      Specified by:
        `getStepExecution` in interface `StepExecutionDao`
      Parameters:
        `jobExecution` - the parent `JobExecution`
        `stepExecutionId` - the step execution id
      Returns:
        a `StepExecution`

    - #### getLastStepExecution

          public StepExecution getLastStepExecution(JobInstance jobInstance,
                                                    java.lang.String stepName)

      Description copied from interface: `StepExecutionDao`
      Retrieve the last `StepExecution` for a given `JobInstance` ordered by starting time and then id.
      Specified by:
        `getLastStepExecution` in interface `StepExecutionDao`
      Parameters:
        `jobInstance` - the parent `JobInstance`
        `stepName` - the name of the step
      Returns:
        a `StepExecution`

    - #### addStepExecutions

          public void addStepExecutions(JobExecution jobExecution)

      Description copied from interface: `StepExecutionDao`
      Retrieve all the `StepExecution` for the parent `JobExecution`.
      Specified by:
        `addStepExecutions` in interface `StepExecutionDao`
      Parameters:
        `jobExecution` - the parent job execution

    - #### saveStepExecutions

          public void saveStepExecutions(java.util.Collection<StepExecution> stepExecutions)

      Description copied from interface: `StepExecutionDao`
      Save the given collection of StepExecution as a batch. Preconditions: StepExecution Id must be null. Postconditions: StepExecution Id will be set to a unique Long.
      Specified by:
        `saveStepExecutions` in interface `StepExecutionDao`
      Parameters:
        `stepExecutions` - a collection of `JobExecution` instances to be saved.