/*
 * 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.math.BigInteger;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author developer2
 */
@Entity
@Table(name="COMACO.TBPMNOTIFY")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Tbpmnotify.findAll", query = "SELECT t FROM Tbpmnotify t"),
    @NamedQuery(name = "Tbpmnotify.findByNotifycode", query = "SELECT t FROM Tbpmnotify t WHERE t.notifycode = :notifycode"),
    @NamedQuery(name = "Tbpmnotify.findByProcesscode", query = "SELECT t FROM Tbpmnotify t WHERE t.processcode = :processcode"),
    @NamedQuery(name = "Tbpmnotify.findByComments", query = "SELECT t FROM Tbpmnotify t WHERE t.comments = :comments"),
    @NamedQuery(name = "Tbpmnotify.findByNotifytask", query = "SELECT t FROM Tbpmnotify t WHERE t.notifytask = :notifytask"),
    @NamedQuery(name = "Tbpmnotify.findByResolution", query = "SELECT t FROM Tbpmnotify t WHERE t.resolution = :resolution"),
    @NamedQuery(name = "Tbpmnotify.findByUserwhoreg", query = "SELECT t FROM Tbpmnotify t WHERE t.userwhoreg = :userwhoreg"),
    @NamedQuery(name = "Tbpmnotify.findByRegisterdate", query = "SELECT t FROM Tbpmnotify t WHERE t.registerdate = :registerdate"),
    @NamedQuery(name = "Tbpmnotify.findByRecordversion", query = "SELECT t FROM Tbpmnotify t WHERE t.recordversion = :recordversion")})
public class Tbpmnotify implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "NOTIFYCODE")
    private String notifycode;
    @Basic(optional = false)
    @Column(name = "PROCESSCODE")
    private String processcode;
    @Basic(optional = false)
    @Column(name = "COMMENTS")
    private String comments;
    @Basic(optional = false)
    @Column(name = "NOTIFYTASK")
    private String notifytask;
    @Column(name = "RESOLUTION")
    private String resolution;
    @Basic(optional = false)
    @Column(name = "USERWHOREG")
    private String userwhoreg;
    @Basic(optional = false)
    @Column(name = "REGISTERDATE")
    @Temporal(TemporalType.TIMESTAMP)
    private Date registerdate;
    @Column(name = "RECORDVERSION")
    private BigInteger recordversion;
    @JoinColumns({
        @JoinColumn(name = "NOTIFYTOCATALOG", referencedColumnName = "CATALOG"),
        @JoinColumn(name = "NOTIFYTOCATALOGCODE", referencedColumnName = "CATALOGCODE")})
    @ManyToOne
    private Tgenecatalogdetail tgenecatalogdetail;

    public Tbpmnotify() {
    }

    public Tbpmnotify(String notifycode) {
        this.notifycode = notifycode;
    }

    public Tbpmnotify(String notifycode, String processcode, String comments, String notifytask, String userwhoreg, Date registerdate) {
        this.notifycode = notifycode;
        this.processcode = processcode;
        this.comments = comments;
        this.notifytask = notifytask;
        this.userwhoreg = userwhoreg;
        this.registerdate = registerdate;
    }

    public String getNotifycode() {
        return notifycode;
    }

    public void setNotifycode(String notifycode) {
        this.notifycode = notifycode;
    }

    public String getProcesscode() {
        return processcode;
    }

    public void setProcesscode(String processcode) {
        this.processcode = processcode;
    }

    public String getComments() {
        return comments;
    }

    public void setComments(String comments) {
        this.comments = comments;
    }

    public String getNotifytask() {
        return notifytask;
    }

    public void setNotifytask(String notifytask) {
        this.notifytask = notifytask;
    }

    public String getResolution() {
        return resolution;
    }

    public void setResolution(String resolution) {
        this.resolution = resolution;
    }

    public String getUserwhoreg() {
        return userwhoreg;
    }

    public void setUserwhoreg(String userwhoreg) {
        this.userwhoreg = userwhoreg;
    }

    public Date getRegisterdate() {
        return registerdate;
    }

    public void setRegisterdate(Date registerdate) {
        this.registerdate = registerdate;
    }

    public BigInteger getRecordversion() {
        return recordversion;
    }

    public void setRecordversion(BigInteger recordversion) {
        this.recordversion = recordversion;
    }

    public Tgenecatalogdetail getTgenecatalogdetail() {
        return tgenecatalogdetail;
    }

    public void setTgenecatalogdetail(Tgenecatalogdetail tgenecatalogdetail) {
        this.tgenecatalogdetail = tgenecatalogdetail;
    }

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

    @Override
    public String toString() {
        return "com.qsoft.rs.sincoar.model.Tbpmnotify[ notifycode=" + notifycode + " ]";
    }
    
}
