package edu.cmu.sv.ws.ssnoc.data.po;

import java.sql.Timestamp;

import com.google.gson.Gson;

/**
 * This is the persistence class to save all chat message information in the system.
 * This contains information like the user's id, his location, his wall message
 * and the creation time information entered by the user when posting a chat message. <br/>
 * Information is saved in SSN_CHAT_MESSAGES table.
 * 
 */
public class MessagePO {
	private long MessageId;
	private long AuthorId;
	private String AuthorName;
	private long TargetId;
	private String TargetName;
	private String content;
	private long LocationId;
	private String location;
	private String message;
	private Timestamp createdAt;

	public long getMessageId() {
		return MessageId;
	}

	public void setMessageId(long messageId) {
		MessageId = messageId;
	}

	public long getAuthorId() {
		return AuthorId;
	}

	public void setAuthorId(long authorId) {
		this.AuthorId = authorId;
	}

	public String getAuthorName() {
		return AuthorName;
	}

	public void setAuthorName(String authorName) {
		AuthorName = authorName;
	}

	public long getTargetId() {
		return TargetId;
	}

	public void setTargetId(long targetId) {
		this.TargetId = targetId;
	}

	public String getTargetName() {
		return TargetName;
	}

	public void setTargetName(String targetName) {
		TargetName = targetName;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public long getLocationId() {
		return LocationId;
	}
	public void setLocationId(long LocationId) {
		this.TargetId = LocationId;
	}

	public String getLocation() {
		return location;
	}

	public void setLocation(String location) {
		this.location = location;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public Timestamp getCreatedAt() {
		return createdAt;
	}

	public void setCreatedAt(Timestamp createdAt) {
		this.createdAt = createdAt;
	}

	@Override
	public String toString() {
		return new Gson().toJson(this);
	}



}

@@ -666,16 +666,46 @@
 essage;%0A
+%09private String message_type;%0A
 %09private
@@ -1885,32 +1885,186 @@
  = message;%0A%09%7D%0A%0A
+%09public String getMessage_type() %7B%0A%09%09return message_type;%0A%09%7D%0A%0A%09public void setMessage_type(String message_type) %7B%0A%09%09this.message_type = message_type;%0A%09%7D%0A%0A
 %09public Timestam

Add settter and getter methods for MessagePO