class BatchToResourceMapper {

    public static JobExecution map(final org.springframework.batch.core.JobExecution jobExecution) {
        final JobExecution response = new JobExecution();
        response.setId(jobExecution.getId());
        response.setCreateTime(jobExecution.getCreateTime());
        response.setEndTime(jobExecution.getEndTime());
        response.setExitStatus(map(jobExecution.getExitStatus()));
        response.setFailureExceptions(jobExecution.getFailureExceptions());
        response.setJobConfigurationName(jobExecution.getJobConfigurationName());
        response.setJobInstance(map(jobExecution.getJobInstance()));
        response.setJobParameters(map(jobExecution.getJobParameters()));
        response.setLastUpdated(jobExecution.getLastUpdated());
        response.setStartTime(jobExecution.getStartTime());
        response.setStatus(map(jobExecution.getStatus()));
        response.setStepExecutions(mapStepExecutions(jobExecution.getStepExecutions()));
        response.setVersion(jobExecution.getVersion());
        return response;
    }

    private  BatchToResourceMapper();

}