/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.contabilidad.EntConta;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author obper
 */
@Entity
@Table(name = "h_pago_temporales")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "HPagoTemporales.findAll", query = "SELECT h FROM HPagoTemporales h")
    , @NamedQuery(name = "HPagoTemporales.findByEmpCod", query = "SELECT h FROM HPagoTemporales h WHERE h.hPagoTemporalesPK.empCod = :empCod")
    , @NamedQuery(name = "HPagoTemporales.findByPagoTurno", query = "SELECT h FROM HPagoTemporales h WHERE h.pagoTurno = :pagoTurno")
    , @NamedQuery(name = "HPagoTemporales.findByPagoDiurno", query = "SELECT h FROM HPagoTemporales h WHERE h.hPagoTemporalesPK.pagoDiurno = :pagoDiurno")
    , @NamedQuery(name = "HPagoTemporales.findByPagoMinutos", query = "SELECT h FROM HPagoTemporales h WHERE h.pagoMinutos = :pagoMinutos")
    , @NamedQuery(name = "HPagoTemporales.findByPagoNocturno", query = "SELECT h FROM HPagoTemporales h WHERE h.pagoNocturno = :pagoNocturno")
    , @NamedQuery(name = "HPagoTemporales.findBySubTotal", query = "SELECT h FROM HPagoTemporales h WHERE h.subTotal = :subTotal")
    , @NamedQuery(name = "HPagoTemporales.findByRenta", query = "SELECT h FROM HPagoTemporales h WHERE h.renta = :renta")
    , @NamedQuery(name = "HPagoTemporales.findByTotalPago", query = "SELECT h FROM HPagoTemporales h WHERE h.totalPago = :totalPago")
    , @NamedQuery(name = "HPagoTemporales.findByFecha", query = "SELECT h FROM HPagoTemporales h WHERE h.hPagoTemporalesPK.fecha = :fecha")})
public class HPagoTemporales implements Serializable {

    private static final long serialVersionUID = 1L;
    @EmbeddedId
    protected HPagoTemporalesPK hPagoTemporalesPK;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Basic(optional = false)
    @NotNull
    @Column(name = "pago_turno")
    private BigDecimal pagoTurno;
    @Basic(optional = false)
    @NotNull
    @Column(name = "pago_minutos")
    private BigDecimal pagoMinutos;
    @Basic(optional = false)
    @NotNull
    @Column(name = "pago_nocturno")
    private BigDecimal pagoNocturno;
    @Basic(optional = false)
    @NotNull
    @Column(name = "sub_total")
    private BigDecimal subTotal;
    @Basic(optional = false)
    @NotNull
    @Column(name = "renta")
    private BigDecimal renta;
    @Basic(optional = false)
    @NotNull
    @Column(name = "total_pago")
    private BigDecimal totalPago;   
    @Basic(optional = false)
    @NotNull
    @Column(name = "id_de_pago")
    private String idDePago;
    
    public HPagoTemporales() {
    }

    public HPagoTemporales(HPagoTemporalesPK hPagoTemporalesPK) {
        this.hPagoTemporalesPK = hPagoTemporalesPK;
    }

    public HPagoTemporales(HPagoTemporalesPK hPagoTemporalesPK, BigDecimal pagoTurno, BigDecimal pagoMinutos, BigDecimal pagoNocturno, BigDecimal subTotal, BigDecimal renta, BigDecimal totalPago) {
        this.hPagoTemporalesPK = hPagoTemporalesPK;
        this.pagoTurno = pagoTurno;
        this.pagoMinutos = pagoMinutos;
        this.pagoNocturno = pagoNocturno;
        this.subTotal = subTotal;
        this.renta = renta;
        this.totalPago = totalPago;
    }

    public HPagoTemporales(String empCod, BigDecimal pagoDiurno, Date fecha) {
        this.hPagoTemporalesPK = new HPagoTemporalesPK(empCod, pagoDiurno, fecha);
    }

    public HPagoTemporalesPK getHPagoTemporalesPK() {
        return hPagoTemporalesPK;
    }

    public void setPagoTemporalesPK(HPagoTemporalesPK hPagoTemporalesPK) {
        this.hPagoTemporalesPK = hPagoTemporalesPK;
    }

    public BigDecimal getPagoTurno() {
        return pagoTurno;
    }

    public void setPagoTurno(BigDecimal pagoTurno) {
        this.pagoTurno = pagoTurno;
    }

    public BigDecimal getPagoMinutos() {
        return pagoMinutos;
    }

    public void setPagoMinutos(BigDecimal pagoMinutos) {
        this.pagoMinutos = pagoMinutos;
    }

    public BigDecimal getPagoNocturno() {
        return pagoNocturno;
    }

    public void setPagoNocturno(BigDecimal pagoNocturno) {
        this.pagoNocturno = pagoNocturno;
    }

    public BigDecimal getSubTotal() {
        return subTotal;
    }

    public void setSubTotal(BigDecimal subTotal) {
        this.subTotal = subTotal;
    }

    public BigDecimal getRenta() {
        return renta;
    }

    public void setRenta(BigDecimal renta) {
        this.renta = renta;
    }

    public BigDecimal getTotalPago() {
        return totalPago;
    }

    public void setTotalPago(BigDecimal totalPago) {
        this.totalPago = totalPago;
    }

    public String getIdDePago() {
        return idDePago;
    }

    public void setIdDePago(String idDePago) {
        this.idDePago = idDePago;
    }   

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

    @Override
    public String toString() {
        return "com.contabilidad.dbcom.PagoTemporales[ pagoTemporalesPK=" + hPagoTemporalesPK + " ]";
    }
    
}
