Package org.springframework.batch.core

Examples of org.springframework.batch.core.ExitStatus


    JobExecution jobExecution = convertJobExecutionType(type.jobExecution);
    StepExecution stepExecution = type.id != null ? new StepExecution(type.stepName, jobExecution, type.id)
        : new StepExecution(type.stepName, jobExecution);
    stepExecution.setVersion(type.version);
    stepExecution.setStatus(type.status);
    stepExecution.setExitStatus(new ExitStatus(type.exitStatus));
    stepExecution.setReadCount(type.readCount);
    stepExecution.setWriteCount(type.writeCount);
    stepExecution.setCommitCount(type.commitCount);
    stepExecution.setRollbackCount(type.rollbackCount);
    stepExecution.setReadSkipCount(type.readSkipCount);
View Full Code Here


    jobExecution.setStatus(type.status);
    jobExecution.setStartTime(nullsafeToDate(type.startTime));
    jobExecution.setEndTime(nullsafeToDate(type.endTime));
    jobExecution.setCreateTime(nullsafeToDate(type.createTime));
    jobExecution.setLastUpdated(nullsafeToDate(type.lastUpdated));
    jobExecution.setExitStatus(new ExitStatus(type.exitStatus));

    List<StepExecution> stepExecutions = new ArrayList<StepExecution>();
    for(StepExecutionType stepExecutionType : type.stepExecutions) {
      StepExecution convertStepExecutionType = convertStepExecutionType(stepExecutionType);
      stepExecutions.add(convertStepExecutionType);
View Full Code Here

  @AfterStep
  public ExitStatus checkForSkips(StepExecution stepExecution) {
    if (!stepExecution.getExitStatus().getExitCode().equals(ExitStatus.FAILED.getExitCode())
        && stepExecution.getSkipCount() > 0) {
      return new ExitStatus("COMPLETED WITH SKIPS");
    }
    else {
      return null;
    }
  }
View Full Code Here

      jobExecution.setId(id);

      jobExecution.setStartTime(rs.getTimestamp(2));
      jobExecution.setEndTime(rs.getTimestamp(3));
      jobExecution.setStatus(BatchStatus.valueOf(rs.getString(4)));
      jobExecution.setExitStatus(new ExitStatus(rs.getString(5), rs.getString(6)));
      jobExecution.setCreateTime(rs.getTimestamp(7));
      jobExecution.setLastUpdated(rs.getTimestamp(8));
      jobExecution.setVersion(rs.getInt(9));
      return jobExecution;
    }
View Full Code Here

      stepExecution.setStatus(BatchStatus.valueOf(rs.getString(5)));
      stepExecution.setCommitCount(rs.getInt(6));
      stepExecution.setReadCount(rs.getInt(7));
      stepExecution.setFilterCount(rs.getInt(8));
      stepExecution.setWriteCount(rs.getInt(9));
      stepExecution.setExitStatus(new ExitStatus(rs.getString(10), rs.getString(11)));
      stepExecution.setReadSkipCount(rs.getInt(12));
      stepExecution.setWriteSkipCount(rs.getInt(13));
      stepExecution.setProcessSkipCount(rs.getInt(14));
      stepExecution.setRollbackCount(rs.getInt(15));
      stepExecution.setLastUpdated(rs.getTimestamp(16));
View Full Code Here

      }

      jobExecution.setStartTime(rs.getTimestamp(2));
      jobExecution.setEndTime(rs.getTimestamp(3));
      jobExecution.setStatus(BatchStatus.valueOf(rs.getString(4)));
      jobExecution.setExitStatus(new ExitStatus(rs.getString(5), rs.getString(6)));
      jobExecution.setCreateTime(rs.getTimestamp(7));
      jobExecution.setLastUpdated(rs.getTimestamp(8));
      jobExecution.setVersion(rs.getInt(9));
      return jobExecution;
    }
View Full Code Here

  }

  @Override
  public void updateJobExecutionStatus(FlowExecutionStatus status) {
    execution.setStatus(findBatchStatus(status));
    exitStatus = exitStatus.and(new ExitStatus(status.getName()));
    execution.setExitStatus(exitStatus);
  }
View Full Code Here

    return execution.getStepExecutions().isEmpty();
  }

  @Override
  public void addExitStatus(String code) {
    exitStatus = exitStatus.and(new ExitStatus(code));
  }
View Full Code Here

            try {
                taskExecutor.execute(task);
                tasks.add(task);
            } catch (TaskRejectedException e) {
                // couldn't execute one of the tasks
                ExitStatus exitStatus = ExitStatus.FAILED
                        .addExitDescription("TaskExecutor rejected the task for this step.");
                /*
                 * Set the status in case the caller is tracking it through the
                 * JobExecution.
                 */
 
View Full Code Here

  private InputStream stdin;

  @Before
  public void setUp() throws Exception {
    JobExecution jobExecution = new JobExecution(null, new Long(1), null, null);
    ExitStatus exitStatus = ExitStatus.COMPLETED;
    jobExecution.setExitStatus(exitStatus);
    StubJobLauncher.jobExecution = jobExecution;
    stdin = System.in;
    System.setIn(new InputStream() {
      @Override
View Full Code Here

TOP

Related Classes of org.springframework.batch.core.ExitStatus

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.