List of usage examples for org.springframework.batch.core.launch NoSuchJobInstanceException NoSuchJobInstanceException
public NoSuchJobInstanceException(String msg)
From source file:com.xchanging.support.batch.admin.service.SimpleJobService.java
public JobInstance getJobInstance(long jobInstanceId) throws NoSuchJobInstanceException { JobInstance jobInstance = jobInstanceDao.getJobInstance(jobInstanceId); if (jobInstance == null) { throw new NoSuchJobInstanceException("JobInstance with id=" + jobInstanceId + " does not exist"); }/* w w w .j av a 2 s . c o m*/ return jobInstance; }
From source file:admin.service.SimpleJobService.java
@Override public JobInstance getJobInstance(long jobInstanceId) throws NoSuchJobInstanceException { JobInstance jobInstance = jobInstanceDao.getJobInstance(jobInstanceId); if (jobInstance == null) { throw new NoSuchJobInstanceException("JobInstance with id=" + jobInstanceId + " does not exist"); }/* w w w .jav a 2s .c o m*/ return jobInstance; }
From source file:org.springframework.batch.core.launch.support.SimpleJobOperator.java
@Override public List<Long> getExecutions(long instanceId) throws NoSuchJobInstanceException { JobInstance jobInstance = jobExplorer.getJobInstance(instanceId); if (jobInstance == null) { throw new NoSuchJobInstanceException(String.format("No job instance with id=%d", instanceId)); }/*from w w w . j a v a 2 s . c om*/ List<Long> list = new ArrayList<Long>(); for (JobExecution jobExecution : jobExplorer.getJobExecutions(jobInstance)) { list.add(jobExecution.getId()); } return list; }