JobDetailHistoryData lastRunHistory = null;
if (version > 0) {
lastRunHistory = new JobDetailHistoryData(version, jobRunStartTime, jobRunEndTime, status, jobRunErrorMessage, triggerType,
jobRunErrorLog);
}
final JobDetailData jobDetail = new JobDetailData(id, displayName, nextRunTime, initializingError, cronExpression, active,
currentlyRunning, lastRunHistory);
return jobDetail;
}