-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #148 from gneokleo/master
Make ChatAlyticsEvent not depend on Serializable
- Loading branch information
Showing
1 changed file
with
11 additions
and
14 deletions.
There are no files selected for viewing
25 changes: 11 additions & 14 deletions
25
core/src/main/java/com/chatalytics/core/model/data/ChatAlyticsEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,27 @@ | ||
package com.chatalytics.core.model.data; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnore; | ||
|
||
import org.joda.time.DateTime; | ||
|
||
import lombok.EqualsAndHashCode; | ||
import lombok.Getter; | ||
import lombok.Data; | ||
import lombok.Setter; | ||
import lombok.ToString; | ||
|
||
import java.io.Serializable; | ||
|
||
@Getter | ||
@EqualsAndHashCode | ||
@ToString | ||
@Data | ||
public class ChatAlyticsEvent { | ||
|
||
public ChatAlyticsEvent(DateTime eventTime, String type, Serializable event) { | ||
private final DateTime eventTime; | ||
private final String type; | ||
private final Object event; | ||
|
||
public ChatAlyticsEvent(DateTime eventTime, String type, Object event) { | ||
this.eventTime = eventTime; | ||
this.type = type; | ||
this.event = event; | ||
this.clazz = event.getClass(); | ||
} | ||
|
||
private final DateTime eventTime; | ||
private final String type; | ||
private final Serializable event; | ||
|
||
@Setter // null out clazz when it leaves the service | ||
private Class<? extends Serializable> clazz; | ||
@JsonIgnore | ||
private Class<?> clazz; | ||
} |