public class SimpleJobExplorer extends java.lang.Object implements JobExplorer
JobExplorer
using the injected DAOs.JobExplorer
,
JobInstanceDao
,
JobExecutionDao
,
StepExecutionDao
Constructor and Description |
---|
SimpleJobExplorer(JobInstanceDao jobInstanceDao,
JobExecutionDao jobExecutionDao,
StepExecutionDao stepExecutionDao,
ExecutionContextDao ecDao) |
Modifier and Type | Method and Description |
---|---|
java.util.List<JobInstance> |
findJobInstancesByJobName(java.lang.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. |
java.util.Set<JobExecution> |
findRunningJobExecutions(java.lang.String jobName)
Retrieve running job executions.
|
JobExecution |
getJobExecution(java.lang.Long executionId)
Retrieve a
JobExecution by its id. |
java.util.List<JobExecution> |
getJobExecutions(JobInstance jobInstance)
Retrieve job executions by their job instance.
|
JobInstance |
getJobInstance(java.lang.Long instanceId) |
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
JobInstance values in descending order of creation (and
therefore usually of first execution). |
java.util.List<java.lang.String> |
getJobNames()
Query the repository for all unique
JobInstance names (sorted
alphabetically). |
StepExecution |
getStepExecution(java.lang.Long jobExecutionId,
java.lang.Long executionId)
Retrieve a
StepExecution by its id and parent
JobExecution id. |
public SimpleJobExplorer(JobInstanceDao jobInstanceDao, JobExecutionDao jobExecutionDao, StepExecutionDao stepExecutionDao, ExecutionContextDao ecDao)
public java.util.List<JobExecution> getJobExecutions(JobInstance jobInstance)
JobExplorer
JobExplorer.getStepExecution(Long, Long)
to hydrate them in that case.getJobExecutions
in interface JobExplorer
jobInstance
- the JobInstance
to queryJobInstance
public java.util.Set<JobExecution> findRunningJobExecutions(java.lang.String jobName)
JobExplorer
JobExplorer.getStepExecution(Long, Long)
to hydrate them in that case.findRunningJobExecutions
in interface JobExplorer
jobName
- the name of the jobpublic JobExecution getJobExecution(java.lang.Long executionId)
JobExplorer
JobExecution
by its id. The complete object graph for
this execution should be returned (unless otherwise indicated) including
the parent JobInstance
and associated ExecutionContext
and StepExecution
instances (also including their execution
contexts).getJobExecution
in interface JobExplorer
executionId
- the job execution idJobExecution
with this id, or null if not foundpublic StepExecution getStepExecution(java.lang.Long jobExecutionId, java.lang.Long executionId)
JobExplorer
StepExecution
by its id and parent
JobExecution
id. The execution context for the step should be
available in the result, and the parent job execution should have its
primitive properties, but may not contain the job instance information.getStepExecution
in interface JobExplorer
jobExecutionId
- the parent job execution idexecutionId
- the step execution idStepExecution
with this id, or null if not foundJobExplorer.getJobExecution(Long)
public JobInstance getJobInstance(java.lang.Long instanceId)
getJobInstance
in interface JobExplorer
JobInstance
with this id, or nullpublic java.util.List<JobInstance> getJobInstances(java.lang.String jobName, int start, int count)
JobExplorer
JobInstance
values in descending order of creation (and
therefore usually of first execution).getJobInstances
in interface JobExplorer
jobName
- the name of the job to querystart
- the start index of the instances to returncount
- the maximum number of instances to returnJobInstance
values up to a maximum of count valuespublic java.util.List<java.lang.String> getJobNames()
JobExplorer
JobInstance
names (sorted
alphabetically).getJobNames
in interface JobExplorer
public int getJobInstanceCount(java.lang.String jobName) throws NoSuchJobException
JobExplorer
JobInstance
s
associated with the supplied job name.getJobInstanceCount
in interface JobExplorer
jobName
- the name of the job to query forJobInstance
s that exist within the
associated job repositoryNoSuchJobException
public java.util.List<JobInstance> findJobInstancesByJobName(java.lang.String jobName, int start, int count)
JobExplorer
JobInstance
values in descending order of creation (and
there for usually of first execution) with a 'like'/wildcard criteria.findJobInstancesByJobName
in interface JobExplorer