Package org.springframework.batch.core.launch

Examples of org.springframework.batch.core.launch.NoSuchJobInstanceException


  @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");
    }
    return jobInstance;
  }
View Full Code Here


  @Test
  public void testListForJobInstanceNoSuchJobInstance() throws Exception {

    jobService.getJobInstance(11L);
    EasyMock.expectLastCall().andThrow(new NoSuchJobInstanceException("Foo"));
    EasyMock.replay(jobService);

    ExtendedModelMap model = new ExtendedModelMap();
    BindException errors = new BindException("target", "target");
    String result = controller.listForInstance(model, "foo", 11L, null, errors);
View Full Code Here

   */
  @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));
    }
    List<Long> list = new ArrayList<Long>();
    for (JobExecution jobExecution : jobExplorer.getJobExecutions(jobInstance)) {
      list.add(jobExecution.getId());
    }
View Full Code Here

TOP

Related Classes of org.springframework.batch.core.launch.NoSuchJobInstanceException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.