/*
 * 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.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
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.TARMCASHMANAGEMENTHISTORY")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Tarmcashmanagementhistory.findAll", query = "SELECT t FROM Tarmcashmanagementhistory t"),
    @NamedQuery(name = "Tarmcashmanagementhistory.findByCcashmanagement", query = "SELECT t FROM Tarmcashmanagementhistory t WHERE t.ccashmanagement = :ccashmanagement"),
    @NamedQuery(name = "Tarmcashmanagementhistory.findByDateto", query = "SELECT t FROM Tarmcashmanagementhistory t WHERE t.dateto = :dateto"),
    @NamedQuery(name = "Tarmcashmanagementhistory.findByDatefrom", query = "SELECT t FROM Tarmcashmanagementhistory t WHERE t.datefrom = :datefrom"),
    @NamedQuery(name = "Tarmcashmanagementhistory.findByNombrearchivo", query = "SELECT t FROM Tarmcashmanagementhistory t WHERE t.nombrearchivo = :nombrearchivo"),
    @NamedQuery(name = "Tarmcashmanagementhistory.findByPathreporte", query = "SELECT t FROM Tarmcashmanagementhistory t WHERE t.pathreporte = :pathreporte")})
public class Tarmcashmanagementhistory implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "CCASHMANAGEMENT")
    private String ccashmanagement;
    @Basic(optional = false)
    @Column(name = "DATETO")
    @Temporal(TemporalType.TIMESTAMP)
    private Date dateto;
    @Basic(optional = false)
    @Column(name = "DATEFROM")
    @Temporal(TemporalType.TIMESTAMP)
    private Date datefrom;
    @Basic(optional = false)
    @Column(name = "NOMBREARCHIVO")
    private String nombrearchivo;
    @Basic(optional = false)
    @Column(name = "PATHREPORTE")
    private String pathreporte;
    @JoinColumn(name = "USERCODE", referencedColumnName = "USERCODE")
    @ManyToOne(optional = false)
    private Tsafeuser usercode;

    public Tarmcashmanagementhistory() {
    }

    public Tarmcashmanagementhistory(String ccashmanagement) {
        this.ccashmanagement = ccashmanagement;
    }

    public Tarmcashmanagementhistory(String ccashmanagement, Date dateto, Date datefrom, String nombrearchivo, String pathreporte) {
        this.ccashmanagement = ccashmanagement;
        this.dateto = dateto;
        this.datefrom = datefrom;
        this.nombrearchivo = nombrearchivo;
        this.pathreporte = pathreporte;
    }

    public String getCcashmanagement() {
        return ccashmanagement;
    }

    public void setCcashmanagement(String ccashmanagement) {
        this.ccashmanagement = ccashmanagement;
    }

    public Date getDateto() {
        return dateto;
    }

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

    public Date getDatefrom() {
        return datefrom;
    }

    public void setDatefrom(Date datefrom) {
        this.datefrom = datefrom;
    }

    public String getNombrearchivo() {
        return nombrearchivo;
    }

    public void setNombrearchivo(String nombrearchivo) {
        this.nombrearchivo = nombrearchivo;
    }

    public String getPathreporte() {
        return pathreporte;
    }

    public void setPathreporte(String pathreporte) {
        this.pathreporte = pathreporte;
    }

    public Tsafeuser getUsercode() {
        return usercode;
    }

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

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

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