/*
 * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
 * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template
 */
package com.qsoft.rs.sincoar.model;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author developer2
 */
@Embeddable
public class TsafeuserprofilePK implements Serializable {

    @Basic(optional = false)
    @Column(name = "USERCODE")
    private String usercode;
    @Basic(optional = false)
    @Column(name = "PROFILECODE")
    private String profilecode;
    @Basic(optional = false)
    @Column(name = "DATETO")
    @Temporal(TemporalType.TIMESTAMP)
    private Date dateto;

    public TsafeuserprofilePK() {
    }

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

    public String getUsercode() {
        return usercode;
    }

    public void setUsercode(String usercode) {
        this.usercode = usercode;
    }

    public String getProfilecode() {
        return profilecode;
    }

    public void setProfilecode(String profilecode) {
        this.profilecode = profilecode;
    }

    public Date getDateto() {
        return dateto;
    }

    public void setDateto(Date dateto) {
        this.dateto = dateto;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (usercode != null ? usercode.hashCode() : 0);
        hash += (profilecode != null ? profilecode.hashCode() : 0);
        hash += (dateto != null ? dateto.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TsafeuserprofilePK)) {
            return false;
        }
        TsafeuserprofilePK other = (TsafeuserprofilePK) object;
        if ((this.usercode == null && other.usercode != null) || (this.usercode != null && !this.usercode.equals(other.usercode))) {
            return false;
        }
        if ((this.profilecode == null && other.profilecode != null) || (this.profilecode != null && !this.profilecode.equals(other.profilecode))) {
            return false;
        }
        if ((this.dateto == null && other.dateto != null) || (this.dateto != null && !this.dateto.equals(other.dateto))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.qsoft.rs.sincoar.model.TsafeuserprofilePK[ usercode=" + usercode + ", profilecode=" + profilecode + ", dateto=" + dateto + " ]";
    }
    
}
