-
Notifications
You must be signed in to change notification settings - Fork 78
Expand file tree
/
Copy pathRecordDTO.java
More file actions
99 lines (77 loc) · 2.32 KB
/
Copy pathRecordDTO.java
File metadata and controls
99 lines (77 loc) · 2.32 KB
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
package boot;
import com.alibaba.dts.formats.avro.Operation;
import com.alibaba.dts.formats.avro.Source;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* 封装record数据结构
*/
public class RecordDTO {
private String dbName;
private String tableName;
private Long recordId;
private com.alibaba.dts.formats.avro.Operation recordType;
private java.lang.Long recordTimestamp;
private java.util.Map<java.lang.String, java.lang.String> tags;
private List<FieldDTO> fieldDTOList;
public RecordDTO(String dbName, String tableName, Long recordId, Operation recordType, Long recordTimestamp, Map<String, String> tags, List<FieldDTO> fieldDTOList) {
this.dbName = dbName;
this.tableName = tableName;
this.recordId = recordId;
this.recordType = recordType;
this.recordTimestamp = recordTimestamp;
this.tags = tags;
this.fieldDTOList = fieldDTOList;
}
public RecordDTO() {
}
public String getDbName() {
return dbName;
}
public void setDbName(String dbName) {
this.dbName = dbName;
}
public String getTableName() {
return tableName;
}
public void setTableName(String tableName) {
this.tableName = tableName;
}
public Long getRecordId() {
return recordId;
}
public void setRecordId(Long recordId) {
this.recordId = recordId;
}
public Operation getRecordType() {
return recordType;
}
public void setRecordType(Operation recordType) {
this.recordType = recordType;
}
public Long getRecordTimestamp() {
return recordTimestamp;
}
public void setRecordTimestamp(Long recordTimestamp) {
this.recordTimestamp = recordTimestamp;
}
public Map<String, String> getTags() {
return tags;
}
public void setTags(Map<String, String> tags) {
this.tags = tags;
}
public List<FieldDTO> getFieldDTOList() {
return fieldDTOList;
}
public void setFieldDTOList(List<FieldDTO> fieldDTOList) {
this.fieldDTOList = fieldDTOList;
}
public void appendFieldDTO(FieldDTO field) {
if (this.fieldDTOList == null) {
this.fieldDTOList = new ArrayList<>();
}
this.fieldDTOList.add(field);
}
}