/**
 * 
 */
package alokawi.poc.videoview;

import java.util.Date;

/**
 * @author alokkumar
 *
 */
public class VideoViewEvent {

	/*- Event(
		 * user_id, 
		 * video_id, 
		 * session_id, 
		 * event_start_timestamp, 
		 * view_duration_in_second
	 * )
	*/

	private String userId;
	private String videoId;
	private String sessionId;
	private long eventStartTimestamp;
	private long viewDurationInSeconds;

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public String getVideoId() {
		return videoId;
	}

	public void setVideoId(String videoId) {
		this.videoId = videoId;
	}

	public String getSessionId() {
		return sessionId;
	}

	public void setSessionId(String sessionId) {
		this.sessionId = sessionId;
	}

	public long getEventStartTimestamp() {
		return eventStartTimestamp;
	}

	public void setEventStartTimestamp(long eventStartTimestamp) {
		this.eventStartTimestamp = eventStartTimestamp;
	}

	public long getViewDurationInSeconds() {
		return viewDurationInSeconds;
	}

	public void setViewDurationInSeconds(long viewDurationInSeconds) {
		this.viewDurationInSeconds = viewDurationInSeconds;
	}

	@Override
	public String toString() {
		return "VideoViewEvent [userId=" + userId + ", videoId=" + videoId + ", sessionId=" + sessionId
				+ ", eventStartTimestamp=" + eventStartTimestamp 
				+ ", eventStartTimestampAsDate=" + new Date(eventStartTimestamp)
				+ ", viewDurationInSeconds=" + viewDurationInSeconds
				+ "]";
	}

}

@@ -37,16 +37,45 @@
 oview;%0A%0A
+import java.io.Serializable;%0A
 import j
@@ -150,16 +150,40 @@
 ewEvent 
+implements Serializable 
 %7B%0A%0A%09/*- 
@@ -307,16 +307,442 @@
  )%0A%09*/%0A%0A
+%09public VideoViewEvent(String userId, String videoId, String sessionId, long eventStartTimestamp,%0A%09%09%09long viewDurationInSeconds) %7B%0A%09%09super();%0A%09%09this.userId = userId;%0A%09%09this.videoId = videoId;%0A%09%09this.sessionId = sessionId;%0A%09%09this.eventStartTimestamp = eventStartTimestamp;%0A%09%09this.viewDurationInSeconds = viewDurationInSeconds;%0A%09%7D%0A%0A%09public VideoViewEvent() %7B%0A%09%7D%0A%0A%09/**%0A%09 *%0A%09 */%0A%09private static final long serialVersionUID = 1L;%0A%0A
 %09private
@@ -1846,21 +1846,16 @@
 mestamp 
-%0A%09%09%09%09
 + %22, eve
@@ -1878,17 +1878,21 @@
 AsDate=%22
- 
+%0A%09%09%09%09
 + new Da
@@ -1914,21 +1914,17 @@
 mestamp)
-%0A%09%09%09%09
+ 
 + %22, vie
@@ -1967,21 +1967,17 @@
 nSeconds
-%0A%09%09%09%09
+ 
 + %22%5D%22;%0A%09

Add serializable in VideoViewEvent