public interface JobInstanceDao
Modifier and Type | Method and Description |
---|---|
JobInstance |
createJobInstance(java.lang.String jobName,
JobParameters jobParameters)
Create a JobInstance with given name and parameters.
|
java.util.List<JobInstance> |
findJobInstancesByName(java.lang.String jobName,
int start,
int count)
Fetch the last job instances with the provided name, sorted backwards by
primary key, using a 'like' criteria
|
JobInstance |
getJobInstance(JobExecution jobExecution)
Fetch the JobInstance for the provided JobExecution.
|
JobInstance |
getJobInstance(java.lang.Long instanceId)
Fetch the job instance with the provided identifier.
|
JobInstance |
getJobInstance(java.lang.String jobName,
JobParameters jobParameters)
Find the job instance that matches the given name and parameters.
|
int |
getJobInstanceCount(java.lang.String jobName)
Query the repository for the number of unique
JobInstance s
associated with the supplied job name. |
java.util.List<JobInstance> |
getJobInstances(java.lang.String jobName,
int start,
int count)
Fetch the last job instances with the provided name, sorted backwards by
primary key.
|
java.util.List<java.lang.String> |
getJobNames()
Retrieve the names of all job instances sorted alphabetically - i.e.
|
default JobInstance |
getLastJobInstance(java.lang.String jobName)
Fetch the last job instance by Id for the given job.
|
JobInstance createJobInstance(java.lang.String jobName, JobParameters jobParameters)
jobName
- String
containing the name of the job.jobParameters
- JobParameters
containing the parameters for
the JobInstance.JobInstance
instance that was created.@Nullable JobInstance getJobInstance(java.lang.String jobName, JobParameters jobParameters)
jobName
- the name of the jobjobParameters
- the parameters with which the job was executedJobInstance
object matching the job name and
JobParameters
or null
@Nullable JobInstance getJobInstance(@Nullable java.lang.Long instanceId)
instanceId
- the job identifiernull
if it doesn't exist@Nullable JobInstance getJobInstance(JobExecution jobExecution)
jobExecution
- the JobExecutionnull
if it doesn't exist.java.util.List<JobInstance> getJobInstances(java.lang.String jobName, int start, int count)
jobName
- the job namestart
- the start index of the instances to returncount
- the maximum number of objects to return@Nullable default JobInstance getLastJobInstance(java.lang.String jobName)
jobName
- name of the jobjava.util.List<java.lang.String> getJobNames()
java.util.List<JobInstance> findJobInstancesByName(java.lang.String jobName, int start, int count)
jobName
- String
containing the name of the job.start
- int containing the offset of where list of job instances
results should begin.count
- int containing the number of job instances to return.JobInstance
for the job name requested.int getJobInstanceCount(@Nullable java.lang.String jobName) throws NoSuchJobException
JobInstance
s
associated with the supplied job name.jobName
- the name of the job to query forJobInstance
s that exist within the
associated job repositoryNoSuchJobException
- thrown if no Job has the jobName specified.