in jbatch/src/main/java/org/apache/batchee/container/services/persistence/JDBCPersistenceManagerService.java [625:711]
public List<StepExecution> getStepExecutionsForJobExecution(final long execid) {
Connection conn = null;
PreparedStatement statement = null;
ResultSet rs = null;
long jobexecid;
long stepexecid;
String stepname;
String batchstatus;
String exitstatus;
long readCount;
long writeCount;
long commitCount;
long rollbackCount;
long readSkipCount;
long processSkipCount;
long filterCount;
long writeSkipCount;
Timestamp startTS;
Timestamp endTS;
StepExecutionImpl stepEx;
ObjectInputStream objectIn;
final List<StepExecution> data = new ArrayList<StepExecution>();
try {
conn = getConnection();
statement = conn.prepareStatement(dictionary.getFinStepExecutionFromJobExecution());
statement.setLong(1, execid);
rs = statement.executeQuery();
while (rs.next()) {
jobexecid = rs.getLong(dictionary.stepExecutionColumns(18));
stepexecid = rs.getLong(dictionary.stepExecutionColumns(0));
stepname = rs.getString(dictionary.stepExecutionColumns(15));
batchstatus = rs.getString(dictionary.stepExecutionColumns(1));
exitstatus = rs.getString(dictionary.stepExecutionColumns(4));
readCount = rs.getLong(dictionary.stepExecutionColumns(10));
writeCount = rs.getLong(dictionary.stepExecutionColumns(16));
commitCount = rs.getLong(dictionary.stepExecutionColumns(2));
rollbackCount = rs.getLong(dictionary.stepExecutionColumns(12));
readSkipCount = rs.getLong(dictionary.stepExecutionColumns(11));
processSkipCount = rs.getLong(dictionary.stepExecutionColumns(9));
filterCount = rs.getLong(dictionary.stepExecutionColumns(5));
writeSkipCount = rs.getLong(dictionary.stepExecutionColumns(17));
startTS = rs.getTimestamp(dictionary.stepExecutionColumns(14));
endTS = rs.getTimestamp(dictionary.stepExecutionColumns(3));
// get the object based data
Serializable persistentData = null;
final byte[] pDataBytes = rs.getBytes(dictionary.stepExecutionColumns(8));
if (pDataBytes != null) {
objectIn = new TCCLObjectInputStream(new ByteArrayInputStream(pDataBytes));
persistentData = (Serializable) objectIn.readObject();
}
stepEx = new StepExecutionImpl(jobexecid, stepexecid);
stepEx.setBatchStatus(BatchStatus.valueOf(batchstatus));
stepEx.setExitStatus(exitstatus);
stepEx.setStepName(stepname);
stepEx.setReadCount(readCount);
stepEx.setWriteCount(writeCount);
stepEx.setCommitCount(commitCount);
stepEx.setRollbackCount(rollbackCount);
stepEx.setReadSkipCount(readSkipCount);
stepEx.setProcessSkipCount(processSkipCount);
stepEx.setFilterCount(filterCount);
stepEx.setWriteSkipCount(writeSkipCount);
stepEx.setStartTime(startTS);
stepEx.setEndTime(endTS);
stepEx.setPersistentUserData(persistentData);
data.add(stepEx);
}
} catch (final SQLException e) {
throw new PersistenceException(e);
} catch (final IOException e) {
throw new PersistenceException(e);
} catch (final ClassNotFoundException e) {
throw new PersistenceException(e);
} finally {
cleanupConnection(conn, rs, statement);
}
return data;
}