/*
 * 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 javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

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

    @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;
    @Basic(optional = false)
    @Column(name = "SEQUENCE")
    private short sequence;

    public TgenetransactionprocessPK() {
    }

    public TgenetransactionprocessPK(String transactionmodule, short transactioncode, short transactionversion, short sequence) {
        this.transactionmodule = transactionmodule;
        this.transactioncode = transactioncode;
        this.transactionversion = transactionversion;
        this.sequence = sequence;
    }

    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;
    }

    public short getSequence() {
        return sequence;
    }

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

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

    @Override
    public String toString() {
        return "com.qsoft.rs.sincoar.model.TgenetransactionprocessPK[ transactionmodule=" + transactionmodule + ", transactioncode=" + transactioncode + ", transactionversion=" + transactionversion + ", sequence=" + sequence + " ]";
    }
    
}
