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

    @Basic(optional = false)
    @Column(name = "ACCOUNT")
    private String account;
    @Basic(optional = false)
    @Column(name = "COMPANY")
    private long company;
    @Basic(optional = false)
    @Column(name = "PROCESSDATE")
    @Temporal(TemporalType.TIMESTAMP)
    private Date processdate;
    @Basic(optional = false)
    @Column(name = "MODULECODE")
    private String modulecode;
    @Basic(optional = false)
    @Column(name = "TRANSACTIONMODULE")
    private String transactionmodule;
    @Basic(optional = false)
    @Column(name = "TRANSACTIONCODE")
    private short transactioncode;
    @Basic(optional = false)
    @Column(name = "TRANSACTIONVERSION")
    private short transactionversion;

    public TgeneaccountbatchstatusPK() {
    }

    public TgeneaccountbatchstatusPK(String account, long company, Date processdate, String modulecode, String transactionmodule, short transactioncode, short transactionversion) {
        this.account = account;
        this.company = company;
        this.processdate = processdate;
        this.modulecode = modulecode;
        this.transactionmodule = transactionmodule;
        this.transactioncode = transactioncode;
        this.transactionversion = transactionversion;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public long getCompany() {
        return company;
    }

    public void setCompany(long company) {
        this.company = company;
    }

    public Date getProcessdate() {
        return processdate;
    }

    public void setProcessdate(Date processdate) {
        this.processdate = processdate;
    }

    public String getModulecode() {
        return modulecode;
    }

    public void setModulecode(String modulecode) {
        this.modulecode = modulecode;
    }

    public String getTransactionmodule() {
        return transactionmodule;
    }

    public void setTransactionmodule(String transactionmodule) {
        this.transactionmodule = transactionmodule;
    }

    public short getTransactioncode() {
        return transactioncode;
    }

    public void setTransactioncode(short transactioncode) {
        this.transactioncode = transactioncode;
    }

    public short getTransactionversion() {
        return transactionversion;
    }

    public void setTransactionversion(short transactionversion) {
        this.transactionversion = transactionversion;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (account != null ? account.hashCode() : 0);
        hash += (int) company;
        hash += (processdate != null ? processdate.hashCode() : 0);
        hash += (modulecode != null ? modulecode.hashCode() : 0);
        hash += (transactionmodule != null ? transactionmodule.hashCode() : 0);
        hash += (int) transactioncode;
        hash += (int) transactionversion;
        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 TgeneaccountbatchstatusPK)) {
            return false;
        }
        TgeneaccountbatchstatusPK other = (TgeneaccountbatchstatusPK) object;
        if ((this.account == null && other.account != null) || (this.account != null && !this.account.equals(other.account))) {
            return false;
        }
        if (this.company != other.company) {
            return false;
        }
        if ((this.processdate == null && other.processdate != null) || (this.processdate != null && !this.processdate.equals(other.processdate))) {
            return false;
        }
        if ((this.modulecode == null && other.modulecode != null) || (this.modulecode != null && !this.modulecode.equals(other.modulecode))) {
            return false;
        }
        if ((this.transactionmodule == null && other.transactionmodule != null) || (this.transactionmodule != null && !this.transactionmodule.equals(other.transactionmodule))) {
            return false;
        }
        if (this.transactioncode != other.transactioncode) {
            return false;
        }
        if (this.transactionversion != other.transactionversion) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.qsoft.rs.sincoar.model.TgeneaccountbatchstatusPK[ account=" + account + ", company=" + company + ", processdate=" + processdate + ", modulecode=" + modulecode + ", transactionmodule=" + transactionmodule + ", transactioncode=" + transactioncode + ", transactionversion=" + transactionversion + " ]";
    }
    
}
