/
TableReloadStatus.java
248 lines (233 loc) · 6.86 KB
/
TableReloadStatus.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
package org.jumpmind.symmetric.model;
import java.util.Date;
public class TableReloadStatus {
protected int loadId;
protected String sourceNodeId;
protected String targetNodeId;
protected boolean completed;
protected boolean cancelled;
protected boolean fullLoad;
protected Date startTime;
protected Date endTime;
protected long startDataBatchId;
protected long endDataBatchId;
protected int setupBatchCount;
protected int dataBatchCount;
protected int finalizeBatchCount;
protected int setupBatchLoaded;
protected int dataBatchLoaded;
protected int finalizeBatchLoaded;
protected int tableCount;
protected long rowsLoaded;
protected long rowsCount;
protected boolean errorFlag;
protected String sqlState;
protected int sqlCode;
protected String sqlMessage;
protected String lastUpdatedBy;
protected Date lastUpdateTime = new Date();
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + loadId;
result = prime * result + ((sourceNodeId == null) ? 0 : sourceNodeId.hashCode());
result = prime * result + ((startTime == null) ? 0 : startTime.hashCode());
result = prime * result + ((targetNodeId == null) ? 0 : targetNodeId.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
TableReloadStatus other = (TableReloadStatus) obj;
if (loadId != other.loadId) {
return false;
}
if (sourceNodeId == null) {
if (other.sourceNodeId != null) {
return false;
}
} else if (!sourceNodeId.equals(other.sourceNodeId)) {
return false;
}
if (startTime == null) {
if (other.startTime != null) {
return false;
}
} else if (!startTime.equals(other.startTime)) {
return false;
}
if (targetNodeId == null) {
if (other.targetNodeId != null) {
return false;
}
} else if (!targetNodeId.equals(other.targetNodeId)) {
return false;
}
return true;
}
public int getLoadId() {
return loadId;
}
public void setLoadId(int loadId) {
this.loadId = loadId;
}
public String getSourceNodeId() {
return sourceNodeId;
}
public void setSourceNodeId(String sourceNodeId) {
this.sourceNodeId = sourceNodeId;
}
public String getTargetNodeId() {
return targetNodeId;
}
public void setTargetNodeId(String targetNodeId) {
this.targetNodeId = targetNodeId;
}
public Date getStartTime() {
return startTime;
}
public void setStartTime(Date startTime) {
this.startTime = startTime;
}
public Date getEndTime() {
return endTime;
}
public void setEndTime(Date endTime) {
this.endTime = endTime;
}
public boolean isCompleted() {
return completed;
}
public void setCompleted(boolean completed) {
this.completed = completed;
}
public boolean isCancelled() {
return cancelled;
}
public void setCancelled(boolean cancelled) {
this.cancelled = cancelled;
}
public boolean isFullLoad() {
return fullLoad;
}
public void setFullLoad(boolean fullLoad) {
this.fullLoad = fullLoad;
}
public long getStartDataBatchId() {
return startDataBatchId;
}
public void setStartDataBatchId(long startDataBatchId) {
this.startDataBatchId = startDataBatchId;
}
public long getEndDataBatchId() {
return endDataBatchId;
}
public void setEndDataBatchId(long endDataBatchId) {
this.endDataBatchId = endDataBatchId;
}
public int getSetupBatchCount() {
return setupBatchCount;
}
public void setSetupBatchCount(int setupBatchCount) {
this.setupBatchCount = setupBatchCount;
}
public int getDataBatchCount() {
return dataBatchCount;
}
public void setDataBatchCount(int dataBatchCount) {
this.dataBatchCount = dataBatchCount;
}
public int getFinalizeBatchCount() {
return finalizeBatchCount;
}
public void setFinalizeBatchCount(int finalizeBatchCount) {
this.finalizeBatchCount = finalizeBatchCount;
}
public int getSetupBatchLoaded() {
return setupBatchLoaded;
}
public void setSetupBatchLoaded(int setupBatchLoaded) {
this.setupBatchLoaded = setupBatchLoaded;
}
public int getDataBatchLoaded() {
return dataBatchLoaded;
}
public void setDataBatchLoaded(int dataBatchLoaded) {
this.dataBatchLoaded = dataBatchLoaded;
}
public int getFinalizeBatchLoaded() {
return finalizeBatchLoaded;
}
public void setFinalizeBatchLoaded(int finalizeBatchLoaded) {
this.finalizeBatchLoaded = finalizeBatchLoaded;
}
public int getTableCount() {
return tableCount;
}
public void setTableCount(int tableCount) {
this.tableCount = tableCount;
}
public long getRowsLoaded() {
return rowsLoaded;
}
public void setRowsLoaded(long rowsLoaded) {
this.rowsLoaded = rowsLoaded;
}
public long getRowsCount() {
return rowsCount;
}
public void setRowsCount(long rowsCount) {
this.rowsCount = rowsCount;
}
public boolean isErrorFlag() {
return errorFlag;
}
public void setErrorFlag(boolean errorFlag) {
this.errorFlag = errorFlag;
}
public String getSqlState() {
return sqlState;
}
public void setSqlState(String sqlState) {
this.sqlState = sqlState;
}
public int getSqlCode() {
return sqlCode;
}
public void setSqlCode(int sqlCode) {
this.sqlCode = sqlCode;
}
public String getSqlMessage() {
return sqlMessage;
}
public void setSqlMessage(String sqlMessage) {
this.sqlMessage = sqlMessage;
}
public String getLastUpdatedBy() {
return lastUpdatedBy;
}
public void setLastUpdatedBy(String lastUpdatedBy) {
this.lastUpdatedBy = lastUpdatedBy;
}
public Date getLastUpdateTime() {
return lastUpdateTime;
}
public void setLastUpdateTime(Date lastUpdateTime) {
this.lastUpdateTime = lastUpdateTime;
}
public int getTotalBatchCount() {
return this.setupBatchCount + this.dataBatchCount + this.finalizeBatchCount;
}
public int getTotalBatchLoaded() {
return this.setupBatchLoaded + this.dataBatchLoaded + this.finalizeBatchLoaded;
}
}