List of usage examples for org.springframework.batch.core Entity getId
public Long getId()
From source file:org.trpr.platform.batch.impl.spring.admin.repository.MapStepExecutionDao.java
@Override public void addStepExecutions(JobExecution jobExecution) { Map<Long, StepExecution> executions = executionsByJobExecutionId.get(jobExecution.getId()); if (executions == null || executions.isEmpty()) { return;/* w w w. j a v a 2 s . com*/ } List<StepExecution> result = new ArrayList<StepExecution>(executions.values()); Collections.sort(result, new Comparator<Entity>() { @Override public int compare(Entity o1, Entity o2) { return Long.signum(o2.getId() - o1.getId()); } }); List<StepExecution> copy = new ArrayList<StepExecution>(result.size()); for (StepExecution exec : result) { copy.add(copy(exec)); } jobExecution.addStepExecutions(copy); }