in jbatch/src/main/java/org/apache/batchee/container/services/persistence/JDBCPersistenceManagerService.java [1192:1240]
private StepExecutionImpl createStepExecution(final long rootJobExecId, final String batchStatus, final String exitStatus, final String stepName,
final long readCount, final long writeCount, final long commitCount, final long rollbackCount, final long readSkipCount,
final long processSkipCount, final long filterCount, final long writeSkipCount, final Timestamp startTime,
final Timestamp endTime, final Serializable persistentData) {
//CHECKSTYLE:ON
Connection conn = null;
PreparedStatement statement = null;
ResultSet rs;
try {
conn = getConnection();
statement = conn.prepareStatement(dictionary.getCreateStepExecution(), Statement.RETURN_GENERATED_KEYS);
statement.setLong(1, rootJobExecId);
statement.setString(2, batchStatus);
statement.setString(3, exitStatus);
statement.setString(4, stepName);
statement.setLong(5, readCount);
statement.setLong(6, writeCount);
statement.setLong(7, commitCount);
statement.setLong(8, rollbackCount);
statement.setLong(9, readSkipCount);
statement.setLong(10, processSkipCount);
statement.setLong(11, filterCount);
statement.setLong(12, writeSkipCount);
statement.setTimestamp(13, startTime);
statement.setTimestamp(14, endTime);
statement.setObject(15, serialize(persistentData));
statement.executeUpdate();
if (!conn.getAutoCommit()) {
conn.commit();
}
rs = statement.getGeneratedKeys();
if (rs.next()) {
final long stepExecutionId = rs.getLong(1);
final StepExecutionImpl stepExecution = new StepExecutionImpl(rootJobExecId, stepExecutionId);
stepExecution.setStepName(stepName);
return stepExecution;
}
return null;
} catch (final SQLException e) {
throw new PersistenceException(e);
} catch (final IOException e) {
throw new PersistenceException(e);
} finally {
cleanupConnection(conn, null, statement);
}
}