class DefaultJobService implements JobService {

    @Override
    public void attachJobInstance(final JobExecution jobExecution) {
        if (jobExecution != null) {
            if (jobExecution.getJobInstance() != null) {
                final JobInstance jobInstance = this.jobExplorer.getJobInstance(jobExecution.getJobInstance().getId());
                jobExecution.setJobInstance(jobInstance);
            } else {
                throw new SpringBatchLightminApplicationException("JobInstance of JobExecution with id:" + jobExecution.getJobId() + "is null, cannot provide information");
            }
        } else {
            throw new SpringBatchLightminApplicationException("jobExecution is null, cannot provide information");
        }
    }

    public  DefaultJobService(final JobOperator jobOperator,
                             final JobRegistry jobRegistry,
                             final JobExplorer jobExplorer,
                             final LightminJobExecutionDao lightminJobExecutionDao);

}