/*
 * 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.triz.trizservice.modeles;

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.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author FORCE TECH
 */
@Entity
@Table(name = "service_historique_manipulation")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "ServiceHistoriqueManipulation.findAll", query = "SELECT s FROM ServiceHistoriqueManipulation s"),
    @NamedQuery(name = "ServiceHistoriqueManipulation.findById", query = "SELECT s FROM ServiceHistoriqueManipulation s WHERE s.id = :id"),
    @NamedQuery(name = "ServiceHistoriqueManipulation.findByNomTable", query = "SELECT s FROM ServiceHistoriqueManipulation s WHERE s.nomTable = :nomTable"),
    @NamedQuery(name = "ServiceHistoriqueManipulation.findByIdLigne", query = "SELECT s FROM ServiceHistoriqueManipulation s WHERE s.idLigne = :idLigne"),
    @NamedQuery(name = "ServiceHistoriqueManipulation.findByTypeManipumation", query = "SELECT s FROM ServiceHistoriqueManipulation s WHERE s.typeManipumation = :typeManipumation"),
    @NamedQuery(name = "ServiceHistoriqueManipulation.findByDateManipulation", query = "SELECT s FROM ServiceHistoriqueManipulation s WHERE s.dateManipulation = :dateManipulation"),
    @NamedQuery(name = "ServiceHistoriqueManipulation.findByHeurManipulation", query = "SELECT s FROM ServiceHistoriqueManipulation s WHERE s.heurManipulation = :heurManipulation"),
    @NamedQuery(name = "ServiceHistoriqueManipulation.findByOldValeur", query = "SELECT s FROM ServiceHistoriqueManipulation s WHERE s.oldValeur = :oldValeur"),
    @NamedQuery(name = "ServiceHistoriqueManipulation.findByNewValeur", query = "SELECT s FROM ServiceHistoriqueManipulation s WHERE s.newValeur = :newValeur")})
public class ServiceHistoriqueManipulation implements Serializable {

    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "id")
    private Long id;
    @Size(max = 2147483647)
    @Column(name = "nom_table")
    private String nomTable;
    @Size(max = 2147483647)
    @Column(name = "id_ligne")
    private String idLigne;
    @Size(max = 2147483647)
    @Column(name = "type_manipumation")
    private String typeManipumation;
    @Column(name = "date_manipulation")
    @Temporal(TemporalType.DATE)
    private Date dateManipulation;
    @Column(name = "heur_manipulation")
    @Temporal(TemporalType.TIME)
    private Date heurManipulation;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Column(name = "old_valeur")
    private Float oldValeur;
    @Column(name = "new_valeur")
    private Float newValeur;
    @JoinColumn(name = "fk_manipulateur", referencedColumnName = "userid")
    @ManyToOne
    private ServiceUser fkManipulateur;

    public ServiceHistoriqueManipulation() {
    }

    public ServiceHistoriqueManipulation(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

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

    public String getNomTable() {
        return nomTable;
    }

    public void setNomTable(String nomTable) {
        this.nomTable = nomTable;
    }

    public String getIdLigne() {
        return idLigne;
    }

    public void setIdLigne(String idLigne) {
        this.idLigne = idLigne;
    }

    public String getTypeManipumation() {
        return typeManipumation;
    }

    public void setTypeManipumation(String typeManipumation) {
        this.typeManipumation = typeManipumation;
    }

    public Date getDateManipulation() {
        return dateManipulation;
    }

    public void setDateManipulation(Date dateManipulation) {
        this.dateManipulation = dateManipulation;
    }

    public Date getHeurManipulation() {
        return heurManipulation;
    }

    public void setHeurManipulation(Date heurManipulation) {
        this.heurManipulation = heurManipulation;
    }

    public Float getOldValeur() {
        return oldValeur;
    }

    public void setOldValeur(Float oldValeur) {
        this.oldValeur = oldValeur;
    }

    public Float getNewValeur() {
        return newValeur;
    }

    public void setNewValeur(Float newValeur) {
        this.newValeur = newValeur;
    }

    public ServiceUser getFkManipulateur() {
        return fkManipulateur;
    }

    public void setFkManipulateur(ServiceUser fkManipulateur) {
        this.fkManipulateur = fkManipulateur;
    }

    @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 ServiceHistoriqueManipulation)) {
            return false;
        }
        ServiceHistoriqueManipulation other = (ServiceHistoriqueManipulation) 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.triz.trizservice.modeles.ServiceHistoriqueManipulation[ id=" + id + " ]";
    }
    
}
