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

Packages that use JobInstance
Package
Description
org.springframework.batch.core
Core domain context for Spring Batch covering jobs, steps, configuration and execution abstractions.
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.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.test
Utility classes for batch job/step testing.

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

  Methods in org.springframework.batch.core that return JobInstance
  Modifier and Type
  Method
  Description
  `JobInstance`
  JobExecution.`getJobInstance()`
  Methods in org.springframework.batch.core with parameters of type JobInstance
  Modifier and Type
  Method
  Description
  `void`
  JobExecution.`setJobInstance(JobInstance jobInstance)`
  Constructors in org.springframework.batch.core with parameters of type JobInstance
  Modifier
  Constructor
  Description
  ``
  `JobExecution(JobInstance job, Long id, JobParameters jobParameters)`
  Because a JobExecution isn't valid unless the job is set, this constructor is the only valid one from a modeling point of view.
  ``
  `JobExecution(JobInstance job, JobParameters jobParameters)`
  Constructor for transient (unsaved) instances.

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

  Methods in org.springframework.batch.core.explore that return JobInstance
  Modifier and Type
  Method
  Description
  `JobInstance`
  JobExplorer.`getJobInstance(Long instanceId)`
  `default JobInstance`
  JobExplorer.`getLastJobInstance(String jobName)`
  Find the last job instance by Id for the given job.
  Methods in org.springframework.batch.core.explore that return types with arguments of type JobInstance
  Modifier and Type
  Method
  Description
  `List<JobInstance>`
  JobExplorer.`findJobInstancesByJobName(String jobName, int start, int count)`
  Fetch `JobInstance` values in descending order of creation (and there for usually of first execution) with a 'like'/wildcard criteria.
  `List<JobInstance>`
  JobExplorer.`getJobInstances(String jobName, int start, int count)`
  Fetch `JobInstance` values in descending order of creation (and therefore usually of first execution).
  Methods in org.springframework.batch.core.explore with parameters of type JobInstance
  Modifier and Type
  Method
  Description
  `List<JobExecution>`
  JobExplorer.`getJobExecutions(JobInstance jobInstance)`
  Retrieve job executions by their job instance.
  `default JobExecution`
  JobExplorer.`getLastJobExecution(JobInstance jobInstance)`
  Find the last `JobExecution` that has been created for a given `JobInstance`.

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

  Methods in org.springframework.batch.core.explore.support that return JobInstance
  Modifier and Type
  Method
  Description
  `JobInstance`
  SimpleJobExplorer.`getJobInstance(Long instanceId)`
  `JobInstance`
  SimpleJobExplorer.`getLastJobInstance(String jobName)`
  Methods in org.springframework.batch.core.explore.support that return types with arguments of type JobInstance
  Modifier and Type
  Method
  Description
  `List<JobInstance>`
  SimpleJobExplorer.`findJobInstancesByJobName(String jobName, int start, int count)`
  `List<JobInstance>`
  SimpleJobExplorer.`getJobInstances(String jobName, int start, int count)`
  Methods in org.springframework.batch.core.explore.support with parameters of type JobInstance
  Modifier and Type
  Method
  Description
  `List<JobExecution>`
  SimpleJobExplorer.`getJobExecutions(JobInstance jobInstance)`
  `JobExecution`
  SimpleJobExplorer.`getLastJobExecution(JobInstance jobInstance)`

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

  Methods in org.springframework.batch.core.repository that return JobInstance
  Modifier and Type
  Method
  Description
  `JobInstance`
  JobRepository.`createJobInstance(String jobName, JobParameters jobParameters)`
  Create a new `JobInstance` with the name and job parameters provided.
  Methods in org.springframework.batch.core.repository with parameters of type JobInstance
  Modifier and Type
  Method
  Description
  `StepExecution`
  JobRepository.`getLastStepExecution(JobInstance jobInstance, String stepName)`
  `int`
  JobRepository.`getStepExecutionCount(JobInstance jobInstance, String stepName)`

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

  Methods in org.springframework.batch.core.repository.dao that return JobInstance
  Modifier and Type
  Method
  Description
  `JobInstance`
  JdbcJobInstanceDao.`createJobInstance(String jobName, JobParameters jobParameters)`
  In this JDBC implementation a job instance id is obtained by asking the jobInstanceIncrementer (which is likely a sequence) for the next long value, and then passing the Id and parameter values into an INSERT statement.
  `JobInstance`
  JobInstanceDao.`createJobInstance(String jobName, JobParameters jobParameters)`
  Create a JobInstance with given name and parameters.
  `JobInstance`
  JdbcJobInstanceDao.`getJobInstance(Long instanceId)`
  `JobInstance`
  JdbcJobInstanceDao.`getJobInstance(String jobName, JobParameters jobParameters)`
  The job table is queried for any jobs that match the given identifier, adding them to a list via the RowMapper callback.
  `JobInstance`
  JdbcJobInstanceDao.`getJobInstance(JobExecution jobExecution)`
  `JobInstance`
  JobInstanceDao.`getJobInstance(Long instanceId)`
  Fetch the job instance with the provided identifier.
  `JobInstance`
  JobInstanceDao.`getJobInstance(String jobName, JobParameters jobParameters)`
  Find the job instance that matches the given name and parameters.
  `JobInstance`
  JobInstanceDao.`getJobInstance(JobExecution jobExecution)`
  Fetch the JobInstance for the provided JobExecution.
  `JobInstance`
  JdbcJobInstanceDao.`getLastJobInstance(String jobName)`
  `default JobInstance`
  JobInstanceDao.`getLastJobInstance(String jobName)`
  Fetch the last job instance by Id for the given job.
  Methods in org.springframework.batch.core.repository.dao that return types with arguments of type JobInstance
  Modifier and Type
  Method
  Description
  `List<JobInstance>`
  JdbcJobInstanceDao.`findJobInstancesByName(String jobName, int start, int count)`
  `List<JobInstance>`
  JobInstanceDao.`findJobInstancesByName(String jobName, int start, int count)`
  Fetch the last job instances with the provided name, sorted backwards by primary key, using a 'like' criteria
  `List<JobInstance>`
  JdbcJobInstanceDao.`getJobInstances(String jobName, int start, int count)`
  `List<JobInstance>`
  JobInstanceDao.`getJobInstances(String jobName, int start, int count)`
  Fetch the last job instances with the provided name, sorted backwards by primary key.
  Methods in org.springframework.batch.core.repository.dao with parameters of type JobInstance
  Modifier and Type
  Method
  Description
  `int`
  JdbcStepExecutionDao.`countStepExecutions(JobInstance jobInstance, String stepName)`
  `default int`
  StepExecutionDao.`countStepExecutions(JobInstance jobInstance, String stepName)`
  Counts all the `StepExecution` for a given step name.
  `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).
  `JobExecution`
  JdbcJobExecutionDao.`getLastJobExecution(JobInstance jobInstance)`
  `JobExecution`
  JobExecutionDao.`getLastJobExecution(JobInstance jobInstance)`
  Find the last `JobExecution` to have been created for a given `JobInstance`.
  `StepExecution`
  JdbcStepExecutionDao.`getLastStepExecution(JobInstance jobInstance, String stepName)`
  `default StepExecution`
  StepExecutionDao.`getLastStepExecution(JobInstance jobInstance, String stepName)`
  Retrieve the last `StepExecution` for a given `JobInstance` ordered by starting time and then id.

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

  Methods in org.springframework.batch.core.repository.support that return JobInstance
  Modifier and Type
  Method
  Description
  `JobInstance`
  SimpleJobRepository.`createJobInstance(String jobName, JobParameters jobParameters)`
  Methods in org.springframework.batch.core.repository.support with parameters of type JobInstance
  Modifier and Type
  Method
  Description
  `StepExecution`
  SimpleJobRepository.`getLastStepExecution(JobInstance jobInstance, String stepName)`
  `int`
  SimpleJobRepository.`getStepExecutionCount(JobInstance jobInstance, String stepName)`

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

  Methods in org.springframework.batch.test that return JobInstance
  Modifier and Type
  Method
  Description
  `static JobInstance`
  MetaDataInstanceFactory.`createJobInstance()`
  Create a `JobInstance` with default parameters.
  `static JobInstance`
  MetaDataInstanceFactory.`createJobInstance(String jobName, Long instanceId)`
  Create a `JobInstance` with the parameters provided.