}
}
@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();
ResultSet rs = null;
PreparedStatement preparedStatement = null;
try {
preparedStatement = connection.prepareStatement(select);
preparedStatement.setLong(1, jobExecutionId);
rs = preparedStatement.executeQuery();
while (rs.next()) {
result = (JobExecutionImpl) jobExecutions.get(jobExecutionId);
if (result == null) {
final long jobInstanceId = rs.getLong(TableColumns.JOBINSTANCEID);
result = new JobExecutionImpl((JobInstanceImpl) getJobInstance(jobInstanceId),
jobExecutionId,
BatchUtil.stringToProperties(rs.getString(TableColumns.JOBPARAMETERS)),
rs.getTimestamp(TableColumns.CREATETIME),
rs.getTimestamp(TableColumns.STARTTIME),
rs.getTimestamp(TableColumns.ENDTIME),