/
SimpleStepExecutionImpl.java
81 lines (66 loc) · 1.97 KB
/
SimpleStepExecutionImpl.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
package org.nailedtothex.jbatchif;
import java.io.Serializable;
import java.util.Date;
import javax.batch.runtime.BatchStatus;
import javax.batch.runtime.Metric;
import javax.batch.runtime.StepExecution;
public class SimpleStepExecutionImpl implements StepExecution, Serializable {
private static final long serialVersionUID = 1L;
private final long stepExecutionId;
private final String stepName;
private final BatchStatus batchStatus;
private final Date startTime;
private final Date endTime;
private final String exitStatus;
private final Serializable persistentUserData;
private final Metric[] metrics;
public SimpleStepExecutionImpl(StepExecution stepExecution) {
this(stepExecution.getStepExecutionId(), stepExecution.getStepName(), stepExecution.getBatchStatus(),
stepExecution.getStartTime(), stepExecution.getEndTime(), stepExecution.getExitStatus(), stepExecution
.getPersistentUserData(), stepExecution.getMetrics());
}
public SimpleStepExecutionImpl(long stepExecutionId, String stepName, BatchStatus batchStatus, Date startTime,
Date endTime, String exitStatus, Serializable persistentUserData, Metric[] metrics) {
super();
this.stepExecutionId = stepExecutionId;
this.stepName = stepName;
this.batchStatus = batchStatus;
this.startTime = startTime;
this.endTime = endTime;
this.exitStatus = exitStatus;
this.persistentUserData = persistentUserData;
this.metrics = metrics;
}
@Override
public long getStepExecutionId() {
return stepExecutionId;
}
@Override
public String getStepName() {
return stepName;
}
@Override
public BatchStatus getBatchStatus() {
return batchStatus;
}
@Override
public Date getStartTime() {
return startTime;
}
@Override
public Date getEndTime() {
return endTime;
}
@Override
public String getExitStatus() {
return exitStatus;
}
@Override
public Serializable getPersistentUserData() {
return persistentUserData;
}
@Override
public Metric[] getMetrics() {
return metrics;
}
}