# Uses of Class
org.springframework.batch.core.JobExecution

Packages that use JobExecution
Package
Description
org.springframework.batch.core
Core domain context for Spring Batch covering jobs, steps, configuration and execution abstractions.
org.springframework.batch.core.configuration.support
Specific implementations of configuration concerns.
org.springframework.batch.core.explore
Interfaces and related classes to support meta data browsing.
org.springframework.batch.core.explore.support
Specific implementations of explorer concerns.
org.springframework.batch.core.job
Specific implementations of job concerns.
org.springframework.batch.core.job.flow
Flow related constructs including Flow interface, executors, and related exceptions
org.springframework.batch.core.launch
Interfaces and simple implementations of launch concerns.
org.springframework.batch.core.launch.support
Support classes for use in bootstrap and launch implementations or configurations.
org.springframework.batch.core.listener
Generic implementations of core batch listener interfaces.
org.springframework.batch.core.repository
Interfaces and generic implementations of repository concerns.
org.springframework.batch.core.repository.dao
Specific implementations of dao concerns.
org.springframework.batch.core.repository.support
Specific implementations of repository concerns.
org.springframework.batch.core.scope.context
Implementation of the contexts for each of the custom bean scopes in Spring Batch (Job and Step).
org.springframework.batch.integration.launch
Message based job launching components.
org.springframework.batch.test
Utility classes for batch job/step testing.

- ## Uses of JobExecution in org.springframework.batch.core

  Methods in org.springframework.batch.core that return JobExecution
  Modifier and Type
  Method
  Description
  `JobExecution`
  StepExecution.`getJobExecution()`
  Accessor for the execution context information of the enclosing job.
  Methods in org.springframework.batch.core with parameters of type JobExecution
  Modifier and Type
  Method
  Description
  `default void`
  JobExecutionListener.`afterJob(JobExecution jobExecution)`
  Callback after completion of a job.
  `default void`
  JobExecutionListener.`beforeJob(JobExecution jobExecution)`
  Callback before a job executes.
  `void`
  Job.`execute(JobExecution execution)`
  Run the `JobExecution` and update the meta information like status and statistics as necessary.
  Constructors in org.springframework.batch.core with parameters of type JobExecution
  Modifier
  Constructor
  Description
  ``
  `JobExecution(JobExecution original)`
  ``
  `StepExecution(String stepName, JobExecution jobExecution)`
  Constructor that substitutes in null for the execution id
  ``
  `StepExecution(String stepName, JobExecution jobExecution, Long id)`
  Constructor with mandatory properties.

- ## Uses of JobExecution in org.springframework.batch.core.configuration.support

  Methods in org.springframework.batch.core.configuration.support with parameters of type JobExecution
  Modifier and Type
  Method
  Description
  `void`
  GroupAwareJob.`execute(JobExecution execution)`

- ## Uses of JobExecution in org.springframework.batch.core.explore

  Methods in org.springframework.batch.core.explore that return JobExecution
  Modifier and Type
  Method
  Description
  `JobExecution`
  JobExplorer.`getJobExecution(Long executionId)`
  Retrieve a `JobExecution` by its id.
  `default JobExecution`
  JobExplorer.`getLastJobExecution(JobInstance jobInstance)`
  Find the last `JobExecution` that has been created for a given `JobInstance`.
  Methods in org.springframework.batch.core.explore that return types with arguments of type JobExecution
  Modifier and Type
  Method
  Description
  `Set<JobExecution>`
  JobExplorer.`findRunningJobExecutions(String jobName)`
  Retrieve running job executions.
  `List<JobExecution>`
  JobExplorer.`getJobExecutions(JobInstance jobInstance)`
  Retrieve job executions by their job instance.

- ## Uses of JobExecution in org.springframework.batch.core.explore.support

  Methods in org.springframework.batch.core.explore.support that return JobExecution
  Modifier and Type
  Method
  Description
  `JobExecution`
  SimpleJobExplorer.`getJobExecution(Long executionId)`
  `JobExecution`
  SimpleJobExplorer.`getLastJobExecution(JobInstance jobInstance)`
  Methods in org.springframework.batch.core.explore.support that return types with arguments of type JobExecution
  Modifier and Type
  Method
  Description
  `Set<JobExecution>`
  SimpleJobExplorer.`findRunningJobExecutions(String jobName)`
  `List<JobExecution>`
  SimpleJobExplorer.`getJobExecutions(JobInstance jobInstance)`

- ## Uses of JobExecution in org.springframework.batch.core.job

  Methods in org.springframework.batch.core.job with parameters of type JobExecution
  Modifier and Type
  Method
  Description
  `protected abstract void`
  AbstractJob.`doExecute(JobExecution execution)`
  Extension point for subclasses allowing them to concentrate on processing logic and ignore listeners and repository calls.
  `protected void`
  SimpleJob.`doExecute(JobExecution execution)`
  Handler of steps sequentially as provided, checking each one for success before moving to the next.
  `final void`
  AbstractJob.`execute(JobExecution execution)`
  Run the specified job, handling all listener and repository calls, and delegating the actual processing to `AbstractJob.doExecute(JobExecution)`.
  `protected ExitStatus`
  AbstractJob.`getDefaultExitStatusForFailure(Throwable ex, JobExecution execution)`
  Default mapping from throwable to `ExitStatus`.
  `protected final StepExecution`
  AbstractJob.`handleStep(Step step, JobExecution execution)`
  Convenience method for subclasses to delegate the handling of a specific step in the context of the current `JobExecution`.
  `StepExecution`
  SimpleStepHandler.`handleStep(Step step, JobExecution execution)`
  `StepExecution`
  StepHandler.`handleStep(Step step, JobExecution jobExecution)`
  Handle a step and return the execution for it.
  `protected boolean`
  SimpleStepHandler.`shouldStart(StepExecution lastStepExecution, JobExecution jobExecution, Step step)`
  Given a step and configuration, return true if the step should start, false if it should not, and throw an exception if the job should finish.

- ## Uses of JobExecution in org.springframework.batch.core.job.flow

  Methods in org.springframework.batch.core.job.flow that return JobExecution
  Modifier and Type
  Method
  Description
  `JobExecution`
  FlowExecutor.`getJobExecution()`
  `JobExecution`
  JobFlowExecutor.`getJobExecution()`
  Methods in org.springframework.batch.core.job.flow with parameters of type JobExecution
  Modifier and Type
  Method
  Description
  `FlowExecutionStatus`
  JobExecutionDecider.`decide(JobExecution jobExecution, StepExecution stepExecution)`
  Strategy for branching an execution based on the state of an ongoing `JobExecution`.
  `protected void`
  FlowJob.`doExecute(JobExecution execution)`
  Constructors in org.springframework.batch.core.job.flow with parameters of type JobExecution
  Modifier
  Constructor
  Description
  ``
  `JobFlowExecutor(JobRepository jobRepository, StepHandler stepHandler, JobExecution execution)`

- ## Uses of JobExecution in org.springframework.batch.core.launch

  Methods in org.springframework.batch.core.launch that return JobExecution
  Modifier and Type
  Method
  Description
  `JobExecution`
  JobOperator.`abandon(long jobExecutionId)`
  Mark the `JobExecution` as ABANDONED.
  `JobExecution`
  JobLauncher.`run(Job job, JobParameters jobParameters)`
  Start a job execution for the given `Job` and `JobParameters` .

- ## Uses of JobExecution in org.springframework.batch.core.launch.support

  Methods in org.springframework.batch.core.launch.support that return JobExecution
  Modifier and Type
  Method
  Description
  `JobExecution`
  SimpleJobOperator.`abandon(long jobExecutionId)`
  `JobExecution`
  SimpleJobLauncher.`run(Job job, JobParameters jobParameters)`
  Run the provided job with the given `JobParameters`.

- ## Uses of JobExecution in org.springframework.batch.core.listener

  Methods in org.springframework.batch.core.listener with parameters of type JobExecution
  Modifier and Type
  Method
  Description
  `void`
  CompositeJobExecutionListener.`afterJob(JobExecution jobExecution)`
  Call the registered listeners in reverse order, respecting and prioritising those that implement `Ordered`.
  `void`
  JobExecutionListenerSupport.`afterJob(JobExecution jobExecution)`
  Deprecated.
  `void`
  CompositeJobExecutionListener.`beforeJob(JobExecution jobExecution)`
  Call the registered listeners in order, respecting and prioritising those that implement `Ordered`.
  `void`
  JobExecutionListenerSupport.`beforeJob(JobExecution jobExecution)`
  Deprecated.

- ## Uses of JobExecution in org.springframework.batch.core.repository

  Methods in org.springframework.batch.core.repository that return JobExecution
  Modifier and Type
  Method
  Description
  `JobExecution`
  JobRepository.`createJobExecution(String jobName, JobParameters jobParameters)`
  Create a `JobExecution` for a given `Job` and `JobParameters`.
  `JobExecution`
  JobRepository.`getLastJobExecution(String jobName, JobParameters jobParameters)`
  Methods in org.springframework.batch.core.repository with parameters of type JobExecution
  Modifier and Type
  Method
  Description
  `void`
  JobRepository.`update(JobExecution jobExecution)`
  Update the `JobExecution` (but not its `ExecutionContext`).
  `void`
  JobRepository.`updateExecutionContext(JobExecution jobExecution)`
  Persist the updated `ExecutionContext` of the given `JobExecution`.

- ## Uses of JobExecution in org.springframework.batch.core.repository.dao

  Methods in org.springframework.batch.core.repository.dao that return JobExecution
  Modifier and Type
  Method
  Description
  `JobExecution`
  JdbcJobExecutionDao.`getJobExecution(Long executionId)`
  `JobExecution`
  JobExecutionDao.`getJobExecution(Long executionId)`
  `JobExecution`
  JdbcJobExecutionDao.`getLastJobExecution(JobInstance jobInstance)`
  `JobExecution`
  JobExecutionDao.`getLastJobExecution(JobInstance jobInstance)`
  Find the last `JobExecution` to have been created for a given `JobInstance`.
  Methods in org.springframework.batch.core.repository.dao that return types with arguments of type JobExecution
  Modifier and Type
  Method
  Description
  `List<JobExecution>`
  JdbcJobExecutionDao.`findJobExecutions(JobInstance job)`
  `List<JobExecution>`
  JobExecutionDao.`findJobExecutions(JobInstance jobInstance)`
  Return all `JobExecution`s for given `JobInstance`, sorted backwards by creation order (so the first element is the most recent).
  `Set<JobExecution>`
  JdbcJobExecutionDao.`findRunningJobExecutions(String jobName)`
  `Set<JobExecution>`
  JobExecutionDao.`findRunningJobExecutions(String jobName)`
  Methods in org.springframework.batch.core.repository.dao with parameters of type JobExecution
  Modifier and Type
  Method
  Description
  `void`
  JdbcStepExecutionDao.`addStepExecutions(JobExecution jobExecution)`
  `void`
  StepExecutionDao.`addStepExecutions(JobExecution jobExecution)`
  Retrieve all the `StepExecution` for the parent `JobExecution`.
  `ExecutionContext`
  ExecutionContextDao.`getExecutionContext(JobExecution jobExecution)`
  `ExecutionContext`
  JdbcExecutionContextDao.`getExecutionContext(JobExecution jobExecution)`
  `JobInstance`
  JdbcJobInstanceDao.`getJobInstance(JobExecution jobExecution)`
  `JobInstance`
  JobInstanceDao.`getJobInstance(JobExecution jobExecution)`
  Fetch the JobInstance for the provided JobExecution.
  `StepExecution`
  JdbcStepExecutionDao.`getStepExecution(JobExecution jobExecution, Long stepExecutionId)`
  `StepExecution`
  StepExecutionDao.`getStepExecution(JobExecution jobExecution, Long stepExecutionId)`
  Retrieve a `StepExecution` from its id.
  `void`
  ExecutionContextDao.`saveExecutionContext(JobExecution jobExecution)`
  Persist the execution context associated with the given jobExecution, persistent entry for the context should not exist yet.
  `void`
  JdbcExecutionContextDao.`saveExecutionContext(JobExecution jobExecution)`
  `void`
  JdbcJobExecutionDao.`saveJobExecution(JobExecution jobExecution)`
  SQL implementation using Sequences via the Spring incrementer abstraction.
  `void`
  JobExecutionDao.`saveJobExecution(JobExecution jobExecution)`
  Save a new JobExecution.
  `void`
  JdbcJobExecutionDao.`synchronizeStatus(JobExecution jobExecution)`
  `void`
  JobExecutionDao.`synchronizeStatus(JobExecution jobExecution)`
  Because it may be possible that the status of a JobExecution is updated while running, the following method will synchronize only the status and version fields.
  `void`
  ExecutionContextDao.`updateExecutionContext(JobExecution jobExecution)`
  Persist the updates of execution context associated with the given jobExecution.
  `void`
  JdbcExecutionContextDao.`updateExecutionContext(JobExecution jobExecution)`
  `void`
  JdbcJobExecutionDao.`updateJobExecution(JobExecution jobExecution)`
  Update given JobExecution using a SQL UPDATE statement.
  `void`
  JobExecutionDao.`updateJobExecution(JobExecution jobExecution)`
  Update and existing JobExecution.

- ## Uses of JobExecution in org.springframework.batch.core.repository.support

  Methods in org.springframework.batch.core.repository.support that return JobExecution
  Modifier and Type
  Method
  Description
  `JobExecution`
  SimpleJobRepository.`createJobExecution(String jobName, JobParameters jobParameters)`
  `JobExecution`
  SimpleJobRepository.`getLastJobExecution(String jobName, JobParameters jobParameters)`
  Methods in org.springframework.batch.core.repository.support with parameters of type JobExecution
  Modifier and Type
  Method
  Description
  `void`
  SimpleJobRepository.`update(JobExecution jobExecution)`
  `void`
  SimpleJobRepository.`updateExecutionContext(JobExecution jobExecution)`

- ## Uses of JobExecution in org.springframework.batch.core.scope.context

  Methods in org.springframework.batch.core.scope.context that return JobExecution
  Modifier and Type
  Method
  Description
  `JobExecution`
  JobContext.`getJobExecution()`
  The current `JobExecution` that is active in this context.
  Methods in org.springframework.batch.core.scope.context with parameters of type JobExecution
  Modifier and Type
  Method
  Description
  `void`
  JobScopeManager.`execute(Job job, JobExecution jobExecution)`
  `static JobContext`
  JobSynchronizationManager.`register(JobExecution JobExecution)`
  Register a context with the current thread - always put a matching `JobSynchronizationManager.close()` call in a finally block to ensure that the correct context is available in the enclosing block.
  Constructors in org.springframework.batch.core.scope.context with parameters of type JobExecution
  Modifier
  Constructor
  Description
  ``
  `JobContext(JobExecution jobExecution)`

- ## Uses of JobExecution in org.springframework.batch.integration.launch

  Methods in org.springframework.batch.integration.launch that return JobExecution
  Modifier and Type
  Method
  Description
  `JobExecution`
  JobLaunchingMessageHandler.`launch(JobLaunchRequest request)`
  `JobExecution`
  JobLaunchRequestHandler.`launch(JobLaunchRequest request)`

- ## Uses of JobExecution in org.springframework.batch.test

  Methods in org.springframework.batch.test that return JobExecution
  Modifier and Type
  Method
  Description
  `static JobExecution`
  MetaDataInstanceFactory.`createJobExecution()`
  Create a `JobExecution` with default parameters.
  `static JobExecution`
  MetaDataInstanceFactory.`createJobExecution(Long executionId)`
  Create a `JobExecution` with the parameters provided.
  `static JobExecution`
  MetaDataInstanceFactory.`createJobExecution(String jobName, Long instanceId, Long executionId)`
  Create a `JobExecution` with the parameters provided.
  `static JobExecution`
  MetaDataInstanceFactory.`createJobExecution(String jobName, Long instanceId, Long executionId, String jobParameters)`
  Create a `JobExecution` with the parameters provided.
  `static JobExecution`
  MetaDataInstanceFactory.`createJobExecution(String jobName, Long instanceId, Long executionId, JobParameters jobParameters)`
  Create a `JobExecution` with the parameters provided.
  `static JobExecution`
  MetaDataInstanceFactory.`createJobExecutionWithStepExecutions(Long executionId, Collection<String> stepNames)`
  Create a `JobExecution` with the parameters provided with attached step executions.
  `protected JobExecution`
  JobScopeTestExecutionListener.`getJobExecution(org.springframework.test.context.TestContext testContext)`
  Discover a `JobExecution` as a field in the test case or create one if none is available.
  `JobExecution`
  JobLauncherTestUtils.`launchJob()`
  Launch the entire job, including all steps.
  `JobExecution`
  JobLauncherTestUtils.`launchJob(JobParameters jobParameters)`
  Launch the entire job, including all steps
  `JobExecution`
  JobLauncherTestUtils.`launchStep(String stepName)`
  Launch just the specified step in the job.
  `JobExecution`
  JobLauncherTestUtils.`launchStep(String stepName, JobParameters jobParameters)`
  Launch just the specified step in the job.
  `JobExecution`
  JobLauncherTestUtils.`launchStep(String stepName, JobParameters jobParameters, ExecutionContext jobExecutionContext)`
  Launch just the specified step in the job.
  `JobExecution`
  JobLauncherTestUtils.`launchStep(String stepName, ExecutionContext jobExecutionContext)`
  Launch just the specified step in the job.
  `JobExecution`
  StepRunner.`launchStep(Step step)`
  Launch just the specified step as its own job.
  `JobExecution`
  StepRunner.`launchStep(Step step, JobParameters jobParameters)`
  Launch just the specified step as its own job.
  `JobExecution`
  StepRunner.`launchStep(Step step, JobParameters jobParameters, ExecutionContext jobExecutionContext)`
  Launch just the specified step as its own job.
  `JobExecution`
  StepRunner.`launchStep(Step step, ExecutionContext jobExecutionContext)`
  Launch just the specified step as its own job.
  Methods in org.springframework.batch.test that return types with arguments of type JobExecution
  Modifier and Type
  Method
  Description
  `List<JobExecution>`
  JobRepositoryTestUtils.`createJobExecutions(int count)`
  Use the `JobRepository` to create some `JobExecution` instances each with a single step execution.
  `List<JobExecution>`
  JobRepositoryTestUtils.`createJobExecutions(String jobName, String[] stepNames, int count)`
  Use the `JobRepository` to create some `JobExecution` instances each with the given job name and each having step executions with the given step names.
  Methods in org.springframework.batch.test with parameters of type JobExecution
  Modifier and Type
  Method
  Description
  `static StepExecution`
  MetaDataInstanceFactory.`createStepExecution(JobExecution jobExecution, String stepName, Long executionId)`
  Create a `StepExecution` with the parameters provided.
  `static <T> T`
  JobScopeTestUtils.`doInJobScope(JobExecution jobExecution, Callable<T> callable)`
  `static <T> T`
  ExecutionContextTestUtils.`getValueFromJob(JobExecution jobExecution, String key)`
  `static <T> T`
  ExecutionContextTestUtils.`getValueFromStepInJob(JobExecution jobExecution, String stepName, String key)`
  Method parameters in org.springframework.batch.test with type arguments of type JobExecution
  Modifier and Type
  Method
  Description
  `void`
  JobRepositoryTestUtils.`removeJobExecutions(Collection<JobExecution> list)`
  Remove the `JobExecution` instances, and all associated `JobInstance` and `StepExecution` instances from the standard RDBMS locations used by Spring Batch.