/*
 * 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.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 *
 * @author obper
 */
@Entity
@Table(name = "horas_eventuales")
@NamedQueries({
    @NamedQuery(name = "HorasEventuales.findAll", query = "SELECT h FROM HorasEventuales h")
    , @NamedQuery(name = "HorasEventuales.findByCodigoEmpleado", query = "SELECT h FROM HorasEventuales h WHERE h.codigoEmpleado = :codigoEmpleado")
    , @NamedQuery(name = "HorasEventuales.findByInicioHora", query = "SELECT h FROM HorasEventuales h WHERE h.inicioHora = :inicioHora")
    , @NamedQuery(name = "HorasEventuales.findByFinHora", query = "SELECT h FROM HorasEventuales h WHERE h.finHora = :finHora")
    , @NamedQuery(name = "HorasEventuales.findByTotalHoras", query = "SELECT h FROM HorasEventuales h WHERE h.totalHoras = :totalHoras")
    , @NamedQuery(name = "HorasEventuales.findByHorasDiurnas", query = "SELECT h FROM HorasEventuales h WHERE h.horasDiurnas = :horasDiurnas")
    , @NamedQuery(name = "HorasEventuales.findByHorasNocturnas", query = "SELECT h FROM HorasEventuales h WHERE h.horasNocturnas = :horasNocturnas")
    , @NamedQuery(name = "HorasEventuales.findByTurnosHechos", query = "SELECT h FROM HorasEventuales h WHERE h.turnosHechos = :turnosHechos")
    , @NamedQuery(name = "HorasEventuales.findByFecha", query = "SELECT h FROM HorasEventuales h WHERE h.fecha = :fecha")
    , @NamedQuery(name = "HorasEventuales.findByGlobalDiurnas", query = "SELECT h FROM HorasEventuales h WHERE h.globalDiurnas = :globalDiurnas")
    , @NamedQuery(name = "HorasEventuales.findByGlobalNocturnas", query = "SELECT h FROM HorasEventuales h WHERE h.globalNocturnas = :globalNocturnas")
    , @NamedQuery(name = "HorasEventuales.findByDiurnaMin", query = "SELECT h FROM HorasEventuales h WHERE h.diurnaMin = :diurnaMin")
    , @NamedQuery(name = "HorasEventuales.findByTurnosExtras", query = "SELECT h FROM HorasEventuales h WHERE h.turnosExtras = :turnosExtras")
    , @NamedQuery(name = "HorasEventuales.findById", query = "SELECT h FROM HorasEventuales h WHERE h.id = :id")})
public class HorasEventuales implements Serializable {

    private static final long serialVersionUID = 1L;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 3)
    @Column(name = "codigo_empleado")
    private String codigoEmpleado;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 8)
    @Column(name = "inicio_hora")
    private String inicioHora;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 8)
    @Column(name = "fin_hora")
    private String finHora;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 8)
    @Column(name = "total_horas")
    private String totalHoras;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 5)
    @Column(name = "horas_diurnas")
    private String horasDiurnas;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 5)
    @Column(name = "horas_nocturnas")
    private String horasNocturnas;
    // @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 = "turnos_hechos")
    private BigDecimal turnosHechos;
    @Column(name = "fecha")
    @Temporal(TemporalType.DATE)
    private Date fecha;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 8)
    @Column(name = "global_diurnas")
    private String globalDiurnas;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 8)
    @Column(name = "global_nocturnas")
    private String globalNocturnas;
    @Basic(optional = false)
    @NotNull
    @Column(name = "diurna_min")
    private BigDecimal diurnaMin;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 4)
    @Column(name = "turnos_extras")
    private String turnosExtras;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Integer id;

    public HorasEventuales() {
    }

    public HorasEventuales(Integer id) {
        this.id = id;
    }

    public HorasEventuales(Integer id, String codigoEmpleado, String inicioHora, String finHora, String totalHoras, String horasDiurnas, String horasNocturnas, BigDecimal turnosHechos, String globalDiurnas, String globalNocturnas, BigDecimal diurnaMin, String turnosExtras) {
        this.id = id;
        this.codigoEmpleado = codigoEmpleado;
        this.inicioHora = inicioHora;
        this.finHora = finHora;
        this.totalHoras = totalHoras;
        this.horasDiurnas = horasDiurnas;
        this.horasNocturnas = horasNocturnas;
        this.turnosHechos = turnosHechos;
        this.globalDiurnas = globalDiurnas;
        this.globalNocturnas = globalNocturnas;
        this.diurnaMin = diurnaMin;
        this.turnosExtras = turnosExtras;
    }

    public String getCodigoEmpleado() {
        return codigoEmpleado;
    }

    public void setCodigoEmpleado(String codigoEmpleado) {
        this.codigoEmpleado = codigoEmpleado;
    }

    public String getInicioHora() {
        return inicioHora;
    }

    public void setInicioHora(String inicioHora) {
        this.inicioHora = inicioHora;
    }

    public String getFinHora() {
        return finHora;
    }

    public void setFinHora(String finHora) {
        this.finHora = finHora;
    }

    public String getTotalHoras() {
        return totalHoras;
    }

    public void setTotalHoras(String totalHoras) {
        this.totalHoras = totalHoras;
    }

    public String getHorasDiurnas() {
        return horasDiurnas;
    }

    public void setHorasDiurnas(String horasDiurnas) {
        this.horasDiurnas = horasDiurnas;
    }

    public String getHorasNocturnas() {
        return horasNocturnas;
    }

    public void setHorasNocturnas(String horasNocturnas) {
        this.horasNocturnas = horasNocturnas;
    }

    public BigDecimal getTurnosHechos() {
        return turnosHechos;
    }

    public void setTurnosHechos(BigDecimal turnosHechos) {
        this.turnosHechos = turnosHechos;
    }

    public Date getFecha() {
        return fecha;
    }

    public void setFecha(Date fecha) {
        this.fecha = fecha;
    }

    public String getGlobalDiurnas() {
        return globalDiurnas;
    }

    public void setGlobalDiurnas(String globalDiurnas) {
        this.globalDiurnas = globalDiurnas;
    }

    public String getGlobalNocturnas() {
        return globalNocturnas;
    }

    public void setGlobalNocturnas(String globalNocturnas) {
        this.globalNocturnas = globalNocturnas;
    }

    public BigDecimal getDiurnaMin() {
        return diurnaMin;
    }

    public void setDiurnaMin(BigDecimal diurnaMin) {
        this.diurnaMin = diurnaMin;
    }

    public String getTurnosExtras() {
        return turnosExtras;
    }

    public void setTurnosExtras(String turnosExtras) {
        this.turnosExtras = turnosExtras;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

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

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