C# Class Summer.Batch.Core.Explore.Support.SimpleJobExplorer

Implementation of IJobExplorer using the injected DAOs.
Inheritance: IJobExplorer
Show file Open project: SummerBatch/SummerBatch

Public Methods

Method Description
FindRunningJobExecutions ( string jobName ) : ISet

Retrieves running job executions. The corresponding step executions may not be fully hydrated (e.g. their execution context may be missing), depending on the implementation. Use GetStepExecution(Long, Long) to hydrate them in that case.

GetJobExecution ( long executionId ) : JobExecution

Retrieves a 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).

GetJobExecutions ( JobInstance jobInstance ) : IList

Retrieves job executions by their job instance. The corresponding step executions may not be fully hydrated (e.g. their execution context may be missing), depending on the implementation. Use GetStepExecution to hydrate them in that case.

GetJobInstance ( long instanceId ) : JobInstance

Gets the JobInstance for the given instance id.

GetJobInstanceCount ( string jobName ) : int

Queries the repository for the number of unique JobInstances associated with the supplied job name.

GetJobInstances ( string jobName, int start, int count ) : IList

Fetches JobInstance values in descending order of creation (and therefore usually of first execution).

GetJobNames ( ) : IList

Queries the repository for all unique JobInstance names (sorted alphabetically).

GetStepExecution ( long jobExecutionId, long executionId ) : StepExecution

Retrieves a 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.

SimpleJobExplorer ( IJobInstanceDao jobInstanceDao, IJobExecutionDao jobExecutionDao, IStepExecutionDao stepExecutionDao, IExecutionContextDao executionContextDao ) : Summer.Batch.Core.Repository.Dao

Constructs a new SimpleJobExplorer with the specified DAOs.

Private Methods

Method Description
GetJobExecutionDependencies ( JobExecution jobExecution ) : void

Finds all dependencies for a JobExecution, including JobInstance (which requires JobParameters) plus StepExecutions.

GetStepExecutionDependencies ( StepExecution stepExecution ) : void

Gets execution dependencies for a given StepExecution.

Method Details

FindRunningJobExecutions() public method

Retrieves running job executions. The corresponding step executions may not be fully hydrated (e.g. their execution context may be missing), depending on the implementation. Use GetStepExecution(Long, Long) to hydrate them in that case.
public FindRunningJobExecutions ( string jobName ) : ISet
jobName string the name of the job
return ISet

GetJobExecution() public method

Retrieves a 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).
public GetJobExecution ( long executionId ) : JobExecution
executionId long the job execution id
return JobExecution

GetJobExecutions() public method

Retrieves job executions by their job instance. The corresponding step executions may not be fully hydrated (e.g. their execution context may be missing), depending on the implementation. Use GetStepExecution to hydrate them in that case.
public GetJobExecutions ( JobInstance jobInstance ) : IList
jobInstance JobInstance the JobInstance to query
return IList

GetJobInstance() public method

Gets the JobInstance for the given instance id.
public GetJobInstance ( long instanceId ) : JobInstance
instanceId long the instance id
return JobInstance

GetJobInstanceCount() public method

Queries the repository for the number of unique JobInstances associated with the supplied job name.
 if no jobinstance could be found for the given name
public GetJobInstanceCount ( string jobName ) : int
jobName string the name of the job to query for
return int

GetJobInstances() public method

Fetches JobInstance values in descending order of creation (and therefore usually of first execution).
public GetJobInstances ( string jobName, int start, int count ) : IList
jobName string the name of the job to query
start int the start index of the instances to return
count int the maximum number of instances to return
return IList

GetJobNames() public method

Queries the repository for all unique JobInstance names (sorted alphabetically).
public GetJobNames ( ) : IList
return IList

GetStepExecution() public method

Retrieves a 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.
public GetStepExecution ( long jobExecutionId, long executionId ) : StepExecution
jobExecutionId long the parent job execution id
executionId long the step execution id
return StepExecution

SimpleJobExplorer() public method

Constructs a new SimpleJobExplorer with the specified DAOs.
public SimpleJobExplorer ( IJobInstanceDao jobInstanceDao, IJobExecutionDao jobExecutionDao, IStepExecutionDao stepExecutionDao, IExecutionContextDao executionContextDao ) : Summer.Batch.Core.Repository.Dao
jobInstanceDao IJobInstanceDao The job instance DAO.
jobExecutionDao IJobExecutionDao The job execution DAO.
stepExecutionDao IStepExecutionDao The step execution DAO.
executionContextDao IExecutionContextDao The execution context DAO.
return Summer.Batch.Core.Repository.Dao