/*
 * 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 TsafeusersessionlogPK implements Serializable {

    @Basic(optional = false)
    @Column(name = "COMPANYCODE")
    private int companycode;
    @Basic(optional = false)
    @Column(name = "WORKINGDATE")
    @Temporal(TemporalType.TIMESTAMP)
    private Date workingdate;
    @Basic(optional = false)
    @Column(name = "SEQUENCE")
    private int sequence;

    public TsafeusersessionlogPK() {
    }

    public TsafeusersessionlogPK(int companycode, Date workingdate, int sequence) {
        this.companycode = companycode;
        this.workingdate = workingdate;
        this.sequence = sequence;
    }

    public int getCompanycode() {
        return companycode;
    }

    public void setCompanycode(int companycode) {
        this.companycode = companycode;
    }

    public Date getWorkingdate() {
        return workingdate;
    }

    public void setWorkingdate(Date workingdate) {
        this.workingdate = workingdate;
    }

    public int getSequence() {
        return sequence;
    }

    public void setSequence(int sequence) {
        this.sequence = sequence;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) companycode;
        hash += (workingdate != null ? workingdate.hashCode() : 0);
        hash += (int) sequence;
        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 TsafeusersessionlogPK)) {
            return false;
        }
        TsafeusersessionlogPK other = (TsafeusersessionlogPK) object;
        if (this.companycode != other.companycode) {
            return false;
        }
        if ((this.workingdate == null && other.workingdate != null) || (this.workingdate != null && !this.workingdate.equals(other.workingdate))) {
            return false;
        }
        if (this.sequence != other.sequence) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.qsoft.rs.sincoar.model.TsafeusersessionlogPK[ companycode=" + companycode + ", workingdate=" + workingdate + ", sequence=" + sequence + " ]";
    }
    
}
