}
}
@Override
public JobExecution getJobExecution(final long jobExecutionId) {
JobExecutionImpl result = (JobExecutionImpl) super.getJobExecution(jobExecutionId);
if (result != null) {
return result;
}
final String select = sqls.getProperty(SELECT_JOB_EXECUTION);
final Connection connection = getConnection();
PreparedStatement preparedStatement = null;
try {
preparedStatement = connection.prepareStatement(select);
preparedStatement.setLong(1, jobExecutionId);
final ResultSet rs = preparedStatement.executeQuery();
while (rs.next()) {
result = (JobExecutionImpl) jobExecutions.get(jobExecutionId);
if(result == null) {
final long jobInstanceId = rs.getLong(TableColumn.JOBINSTANCEID);
result = new JobExecutionImpl((JobInstanceImpl) getJobInstance(jobInstanceId),
jobExecutionId,
BatchUtil.stringToProperties(rs.getString(TableColumn.JOBPARAMETERS)),
rs.getTimestamp(TableColumn.CREATETIME), rs.getTimestamp(TableColumn.STARTTIME),
rs.getTimestamp(TableColumn.ENDTIME), rs.getTimestamp(TableColumn.LASTUPDATEDTIME),
rs.getString(TableColumn.BATCHSTATUS), rs.getString(TableColumn.EXITSTATUS),