package com.fp.armas.portal.model;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.*;

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

	@Column(updatable=false)
	private String usercode;

	@Column(updatable=false)
	private String profilecode;

	@Temporal(TemporalType.TIMESTAMP)
	private java.util.Date dateto;

	public TsafeuserprofilePK() {
	}
	
	public TsafeuserprofilePK(String usercode, String profilecode, Date dateto) {
		super();
		this.usercode = usercode;
		this.profilecode = profilecode;
		this.dateto = dateto;
	}

	public String getUsercode() {
		return this.usercode;
	}
	public void setUsercode(String usercode) {
		this.usercode = usercode;
	}
	public String getProfilecode() {
		return this.profilecode;
	}
	public void setProfilecode(String profilecode) {
		this.profilecode = profilecode;
	}
	public java.util.Date getDateto() {
		return this.dateto;
	}
	public void setDateto(java.util.Date dateto) {
		this.dateto = dateto;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof TsafeuserprofilePK)) {
			return false;
		}
		TsafeuserprofilePK castOther = (TsafeuserprofilePK)other;
		return 
			this.usercode.equals(castOther.usercode)
			&& this.profilecode.equals(castOther.profilecode)
			&& this.dateto.equals(castOther.dateto);
	}

	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.usercode.hashCode();
		hash = hash * prime + this.profilecode.hashCode();
		hash = hash * prime + this.dateto.hashCode();
		
		return hash;
	}
}