@Override @Nullable public StepExecution getStepExecution(JobExecution jobExecution, Long stepExecutionId) { List<StepExecution> executions = getJdbcTemplate().query(getQuery(GET_STEP_EXECUTION), new StepExecutionRowMapper(jobExecution), jobExecution.getId(), stepExecutionId); Assert.state(executions.size() <= 1, "There can be at most one step execution with given name for single job execution"); if (executions.isEmpty()) { return null; } else { return executions.get(0); } }
/** * Save a StepExecution. A unique id will be generated by the * stepExecutionIncrementer, and then set in the StepExecution. All values * will then be stored via an INSERT statement. * * @see StepExecutionDao#saveStepExecution(StepExecution) */ @Override public void saveStepExecution(StepExecution stepExecution) { List<Object[]> parameters = buildStepExecutionParameters(stepExecution); Object[] parameterValues = parameters.get(0); //Template expects an int array fails with Integer int[] parameterTypes = new int[parameters.get(1).length]; for (int i = 0; i < parameterTypes.length; i++) { parameterTypes[i] = (Integer)parameters.get(1)[i]; } getJdbcTemplate().update(getQuery(SAVE_STEP_EXECUTION), parameterValues, parameterTypes); }
getJdbcTemplate().batchUpdate(getQuery(SAVE_STEP_EXECUTION), new BatchPreparedStatementSetter() {
@Override public void addStepExecutions(JobExecution jobExecution) { getJdbcTemplate().query(getQuery(GET_STEP_EXECUTIONS), new StepExecutionRowMapper(jobExecution), jobExecution.getId()); }
stepExecution.getLastUpdated(), stepExecution.getId(), stepExecution.getVersion() }; int count = getJdbcTemplate() .update(getQuery(UPDATE_STEP_EXECUTION), parameters, new int[] { Types.TIMESTAMP, Types.TIMESTAMP, Types.VARCHAR, Types.INTEGER, Types.INTEGER, int currentVersion = getJdbcTemplate().queryForObject(getQuery(CURRENT_VERSION_STEP_EXECUTION), new Object[] { stepExecution.getId() }, Integer.class); throw new OptimisticLockingFailureException("Attempt to update step execution id="
@Override @Nullable public StepExecution getStepExecution(JobExecution jobExecution, Long stepExecutionId) { List<StepExecution> executions = getJdbcTemplate().query(getQuery(GET_STEP_EXECUTION), new StepExecutionRowMapper(jobExecution), jobExecution.getId(), stepExecutionId); Assert.state(executions.size() <= 1, "There can be at most one step execution with given name for single job execution"); if (executions.isEmpty()) { return null; } else { return executions.get(0); } }
public StepExecution getStepExecution(JobExecution jobExecution, Long stepExecutionId) { List<StepExecution> executions = getJdbcTemplate().query(getQuery(GET_STEP_EXECUTION), new StepExecutionRowMapper(jobExecution), jobExecution.getId(), stepExecutionId); Assert.state(executions.size() <= 1, "There can be at most one step execution with given name for single job execution"); if (executions.isEmpty()) { return null; } else { return executions.get(0); } }
@Override public StepExecution getStepExecution(JobExecution jobExecution, Long stepExecutionId) { List<StepExecution> executions = getJdbcTemplate().query(getQuery(GET_STEP_EXECUTION), new StepExecutionRowMapper(jobExecution), jobExecution.getId(), stepExecutionId); Assert.state(executions.size() <= 1, "There can be at most one step execution with given name for single job execution"); if (executions.isEmpty()) { return null; } else { return executions.get(0); } }
@Override @Nullable public StepExecution getStepExecution(JobExecution jobExecution, Long stepExecutionId) { List<StepExecution> executions = getJdbcTemplate().query(getQuery(GET_STEP_EXECUTION), new StepExecutionRowMapper(jobExecution), jobExecution.getId(), stepExecutionId); Assert.state(executions.size() <= 1, "There can be at most one step execution with given name for single job execution"); if (executions.isEmpty()) { return null; } else { return executions.get(0); } }
/** * Save a StepExecution. A unique id will be generated by the * stepExecutionIncrementor, and then set in the StepExecution. All values * will then be stored via an INSERT statement. * * @see StepExecutionDao#saveStepExecution(StepExecution) */ @Override public void saveStepExecution(StepExecution stepExecution) { List<Object[]> parameters = buildStepExecutionParameters(stepExecution); Object[] parameterValues = parameters.get(0); //Template expects an int array fails with Integer int[] parameterTypes = new int[parameters.get(1).length]; for (int i = 0; i < parameterTypes.length; i++) { parameterTypes[i] = (Integer)parameters.get(1)[i]; } getJdbcTemplate().update(getQuery(SAVE_STEP_EXECUTION), parameterValues, parameterTypes); }
/** * Save a StepExecution. A unique id will be generated by the * stepExecutionIncrementer, and then set in the StepExecution. All values * will then be stored via an INSERT statement. * * @see StepExecutionDao#saveStepExecution(StepExecution) */ @Override public void saveStepExecution(StepExecution stepExecution) { List<Object[]> parameters = buildStepExecutionParameters(stepExecution); Object[] parameterValues = parameters.get(0); //Template expects an int array fails with Integer int[] parameterTypes = new int[parameters.get(1).length]; for (int i = 0; i < parameterTypes.length; i++) { parameterTypes[i] = (Integer)parameters.get(1)[i]; } getJdbcTemplate().update(getQuery(SAVE_STEP_EXECUTION), parameterValues, parameterTypes); }
/** * Save a StepExecution. A unique id will be generated by the * stepExecutionIncrementer, and then set in the StepExecution. All values * will then be stored via an INSERT statement. * * @see StepExecutionDao#saveStepExecution(StepExecution) */ @Override public void saveStepExecution(StepExecution stepExecution) { List<Object[]> parameters = buildStepExecutionParameters(stepExecution); Object[] parameterValues = parameters.get(0); //Template expects an int array fails with Integer int[] parameterTypes = new int[parameters.get(1).length]; for (int i = 0; i < parameterTypes.length; i++) { parameterTypes[i] = (Integer)parameters.get(1)[i]; } getJdbcTemplate().update(getQuery(SAVE_STEP_EXECUTION), parameterValues, parameterTypes); }
@Override public void addStepExecutions(JobExecution jobExecution) { getJdbcTemplate().query(getQuery(GET_STEP_EXECUTIONS), new StepExecutionRowMapper(jobExecution), jobExecution.getId()); }
@Override public void addStepExecutions(JobExecution jobExecution) { getJdbcTemplate().query(getQuery(GET_STEP_EXECUTIONS), new StepExecutionRowMapper(jobExecution), jobExecution.getId()); }
@Override public void addStepExecutions(JobExecution jobExecution) { getJdbcTemplate().query(getQuery(GET_STEP_EXECUTIONS), new StepExecutionRowMapper(jobExecution), jobExecution.getId()); }
public void addStepExecutions(JobExecution jobExecution) { getJdbcTemplate().query(getQuery(GET_STEP_EXECUTIONS), new StepExecutionRowMapper(jobExecution), jobExecution.getId()); }
stepExecution.getLastUpdated(), stepExecution.getId(), stepExecution.getVersion() }; int count = getJdbcTemplate() .update(getQuery(UPDATE_STEP_EXECUTION), parameters, new int[] { Types.TIMESTAMP, Types.TIMESTAMP, Types.VARCHAR, Types.INTEGER, Types.INTEGER, int curentVersion = getJdbcTemplate().queryForObject(getQuery(CURRENT_VERSION_STEP_EXECUTION), new Object[] { stepExecution.getId() }, Integer.class); throw new OptimisticLockingFailureException("Attempt to update step execution id="
stepExecution.getLastUpdated(), stepExecution.getId(), stepExecution.getVersion() }; int count = getJdbcTemplate() .update(getQuery(UPDATE_STEP_EXECUTION), parameters, new int[] { Types.TIMESTAMP, Types.TIMESTAMP, Types.VARCHAR, Types.INTEGER, Types.INTEGER, int curentVersion = getJdbcTemplate().queryForObject(getQuery(CURRENT_VERSION_STEP_EXECUTION), new Object[] { stepExecution.getId() }, Integer.class); throw new OptimisticLockingFailureException("Attempt to update step execution id="
int count = getJdbcTemplate().getJdbcOperations() .update( getQuery(UPDATE_STEP_EXECUTION), parameters, new int[] { Types.TIMESTAMP, Types.TIMESTAMP, Types.VARCHAR, Types.INTEGER, Types.INTEGER, int curentVersion = getJdbcTemplate().queryForInt(getQuery(CURRENT_VERSION_STEP_EXECUTION), new Object[] { stepExecution.getId() }); throw new OptimisticLockingFailureException("Attempt to update step execution id="
stepExecution.getRollbackCount(), stepExecution.getLastUpdated() }; getJdbcTemplate().getJdbcOperations().update( getQuery(SAVE_STEP_EXECUTION), parameters, new int[] { Types.BIGINT, Types.INTEGER, Types.VARCHAR, Types.BIGINT, Types.TIMESTAMP,