package org.mynonglam.entitys;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the messagesend database table.
 * 
 */
@Embeddable
public class MessageSendPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	private String idmsgsend;

	private String emailsend;

	private String emailto;

	public MessageSendPK() {
	}
	public String getIdmsgsend() {
		return this.idmsgsend;
	}
	public void setIdmsgsend(String idmsgsend) {
		this.idmsgsend = idmsgsend;
	}
	public String getEmailsend() {
		return this.emailsend;
	}
	public void setEmailsend(String emailsend) {
		this.emailsend = emailsend;
	}
	public String getEmailto() {
		return this.emailto;
	}
	public void setEmailto(String emailto) {
		this.emailto = emailto;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof MessageSendPK)) {
			return false;
		}
		MessageSendPK castOther = (MessageSendPK)other;
		return 
			this.idmsgsend.equals(castOther.idmsgsend)
			&& this.emailsend.equals(castOther.emailsend)
			&& this.emailto.equals(castOther.emailto);
	}

	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.idmsgsend.hashCode();
		hash = hash * prime + this.emailsend.hashCode();
		hash = hash * prime + this.emailto.hashCode();
		
		return hash;
	}
}