Skip to content

Commit

Permalink
fix json conversion error
Browse files Browse the repository at this point in the history
  • Loading branch information
deepcloudlabs committed Jun 25, 2020
1 parent 832f5eb commit fc7bc93
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 12 deletions.
21 changes: 18 additions & 3 deletions hr-domain/src/com/example/hr/events/BusinessEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@
*
*/
public class BusinessEvent {
private final String eventId;
private final String topic;
private final Object data;
private String eventId;
private String topic;
private Object data;

public BusinessEvent() {
}

public BusinessEvent(String eventId, String topic, Object data) {
this.eventId = eventId;
Expand All @@ -20,14 +23,26 @@ public String getEventId() {
return eventId;
}

public void setEventId(String eventId) {
this.eventId = eventId;
}

public String getTopic() {
return topic;
}

public void setTopic(String topic) {
this.topic = topic;
}

public Object getData() {
return data;
}

public void setData(Object data) {
this.data = data;
}

@Override
public String toString() {
return "BusinessEvent [eventId=" + eventId + ", topic=" + topic + ", data=" + data + "]";
Expand Down
3 changes: 3 additions & 0 deletions hr-domain/src/com/example/hr/events/EmployeeFiredEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
*/
public class EmployeeFiredEvent extends BusinessEvent {

public EmployeeFiredEvent() {
}

public EmployeeFiredEvent(String eventId, String topic, Object data) {
super(eventId, topic, data);
}
Expand Down
3 changes: 3 additions & 0 deletions hr-domain/src/com/example/hr/events/EmployeeHiredEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
*/
public class EmployeeHiredEvent extends BusinessEvent {

public EmployeeHiredEvent() {
}

public EmployeeHiredEvent(String eventId, String topic, Object data) {
super(eventId, topic, data);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class BusinessEvent {
private String eventId;
private String topic;
private Object data;

public BusinessEvent() {
}

Expand All @@ -23,22 +23,22 @@ public String getEventId() {
return eventId;
}

public String getTopic() {
return topic;
}

public Object getData() {
return data;
}

public void setEventId(String eventId) {
this.eventId = eventId;
}

public String getTopic() {
return topic;
}

public void setTopic(String topic) {
this.topic = topic;
}

public Object getData() {
return data;
}

public void setData(Object data) {
this.data = data;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
*/
public class EmployeeFiredEvent extends BusinessEvent {

public EmployeeFiredEvent() {
}

public EmployeeFiredEvent(String eventId, String topic, Object data) {
super(eventId, topic, data);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
*/
public class EmployeeHiredEvent extends BusinessEvent {

public EmployeeHiredEvent() {
}

public EmployeeHiredEvent(String eventId, String topic, Object data) {
super(eventId, topic, data);
}
Expand Down

0 comments on commit fc7bc93

Please sign in to comment.