Skip to content

Commit 3bd50e1

Browse files
committed
Fix some code duplications
1 parent 291fe43 commit 3bd50e1

4 files changed

Lines changed: 61 additions & 123 deletions

File tree

src/main/java/com/imsweb/seerapi/client/disease/DiseaseChangelog.java

Lines changed: 3 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,20 @@
33
*/
44
package com.imsweb.seerapi.client.disease;
55

6-
import java.util.Date;
76
import java.util.List;
87

98
import com.fasterxml.jackson.annotation.JsonProperty;
109

11-
public class DiseaseChangelog {
10+
import com.imsweb.seerapi.client.shared.Changelog;
11+
12+
public class DiseaseChangelog extends Changelog {
1213

1314
@JsonProperty("adds")
1415
private List<DiseaseChangelogEntry> _adds;
1516
@JsonProperty("deletes")
1617
private List<DiseaseChangelogEntry> _deletes;
1718
@JsonProperty("mods")
1819
private List<DiseaseChangelogEntry> _mods;
19-
@JsonProperty("user")
20-
private String _user;
21-
@JsonProperty("date")
22-
private Date _date;
23-
@JsonProperty("version")
24-
private String _version;
25-
@JsonProperty("description")
26-
private String _description;
2720

2821
public List<DiseaseChangelogEntry> getAdds() {
2922
return _adds;
@@ -49,35 +42,4 @@ public void setMods(List<DiseaseChangelogEntry> mods) {
4942
_mods = mods;
5043
}
5144

52-
public String getUser() {
53-
return _user;
54-
}
55-
56-
public void setUser(String user) {
57-
_user = user;
58-
}
59-
60-
public Date getDate() {
61-
return _date;
62-
}
63-
64-
public void setDate(Date date) {
65-
_date = date;
66-
}
67-
68-
public String getVersion() {
69-
return _version;
70-
}
71-
72-
public void setVersion(String version) {
73-
_version = version;
74-
}
75-
76-
public String getDescription() {
77-
return _description;
78-
}
79-
80-
public void setDescription(String description) {
81-
_description = description;
82-
}
8345
}

src/main/java/com/imsweb/seerapi/client/glossary/GlossaryChangelog.java

Lines changed: 3 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,20 @@
33
*/
44
package com.imsweb.seerapi.client.glossary;
55

6-
import java.util.Date;
76
import java.util.List;
87

98
import com.fasterxml.jackson.annotation.JsonProperty;
109

11-
public class GlossaryChangelog {
10+
import com.imsweb.seerapi.client.shared.Changelog;
11+
12+
public class GlossaryChangelog extends Changelog {
1213

1314
@JsonProperty("adds")
1415
private List<GlossaryChangelogEntry> _adds;
1516
@JsonProperty("deletes")
1617
private List<GlossaryChangelogEntry> _deletes;
1718
@JsonProperty("mods")
1819
private List<GlossaryChangelogEntry> _mods;
19-
@JsonProperty("user")
20-
private String _user;
21-
@JsonProperty("date")
22-
private Date _date;
23-
@JsonProperty("version")
24-
private String _version;
25-
@JsonProperty("description")
26-
private String _description;
2720

2821
public List<GlossaryChangelogEntry> getAdds() {
2922
return _adds;
@@ -49,35 +42,4 @@ public void setMods(List<GlossaryChangelogEntry> mods) {
4942
_mods = mods;
5043
}
5144

52-
public String getUser() {
53-
return _user;
54-
}
55-
56-
public void setUser(String user) {
57-
_user = user;
58-
}
59-
60-
public Date getDate() {
61-
return _date;
62-
}
63-
64-
public void setDate(Date date) {
65-
_date = date;
66-
}
67-
68-
public String getVersion() {
69-
return _version;
70-
}
71-
72-
public void setVersion(String version) {
73-
_version = version;
74-
}
75-
76-
public String getDescription() {
77-
return _description;
78-
}
79-
80-
public void setDescription(String description) {
81-
_description = description;
82-
}
8345
}

src/main/java/com/imsweb/seerapi/client/rx/RxChangelog.java

Lines changed: 3 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,20 @@
33
*/
44
package com.imsweb.seerapi.client.rx;
55

6-
import java.util.Date;
76
import java.util.List;
87

98
import com.fasterxml.jackson.annotation.JsonProperty;
109

11-
public class RxChangelog {
10+
import com.imsweb.seerapi.client.shared.Changelog;
11+
12+
public class RxChangelog extends Changelog {
1213

1314
@JsonProperty("adds")
1415
private List<RxChangelogEntry> _adds;
1516
@JsonProperty("deletes")
1617
private List<RxChangelogEntry> _deletes;
1718
@JsonProperty("mods")
1819
private List<RxChangelogEntry> _mods;
19-
@JsonProperty("user")
20-
private String _user;
21-
@JsonProperty("date")
22-
private Date _date;
23-
@JsonProperty("version")
24-
private String _version;
25-
@JsonProperty("description")
26-
private String _description;
2720

2821
public List<RxChangelogEntry> getAdds() {
2922
return _adds;
@@ -49,35 +42,4 @@ public void setMods(List<RxChangelogEntry> mods) {
4942
_mods = mods;
5043
}
5144

52-
public String getUser() {
53-
return _user;
54-
}
55-
56-
public void setUser(String user) {
57-
_user = user;
58-
}
59-
60-
public Date getDate() {
61-
return _date;
62-
}
63-
64-
public void setDate(Date date) {
65-
_date = date;
66-
}
67-
68-
public String getVersion() {
69-
return _version;
70-
}
71-
72-
public void setVersion(String version) {
73-
_version = version;
74-
}
75-
76-
public String getDescription() {
77-
return _description;
78-
}
79-
80-
public void setDescription(String description) {
81-
_description = description;
82-
}
8345
}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
/*
2+
* Copyright (C) 2022 Information Management Services, Inc.
3+
*/
4+
package com.imsweb.seerapi.client.shared;
5+
6+
import java.util.Date;
7+
8+
import com.fasterxml.jackson.annotation.JsonProperty;
9+
10+
public class Changelog {
11+
12+
@JsonProperty("user")
13+
private String _user;
14+
@JsonProperty("date")
15+
private Date _date;
16+
@JsonProperty("version")
17+
private String _version;
18+
@JsonProperty("description")
19+
private String _description;
20+
21+
public String getUser() {
22+
return _user;
23+
}
24+
25+
public void setUser(String user) {
26+
_user = user;
27+
}
28+
29+
public Date getDate() {
30+
return _date;
31+
}
32+
33+
public void setDate(Date date) {
34+
_date = date;
35+
}
36+
37+
public String getVersion() {
38+
return _version;
39+
}
40+
41+
public void setVersion(String version) {
42+
_version = version;
43+
}
44+
45+
public String getDescription() {
46+
return _description;
47+
}
48+
49+
public void setDescription(String description) {
50+
_description = description;
51+
}
52+
}

0 commit comments

Comments
 (0)