/*
 * 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.List;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;

/**
 *
 * @author FORCE TECH
 */
@Entity
@Table(name = "service_fonctionnaliter")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "ServiceFonctionnaliter.findAll", query = "SELECT s FROM ServiceFonctionnaliter s"),
    @NamedQuery(name = "ServiceFonctionnaliter.findById", query = "SELECT s FROM ServiceFonctionnaliter s WHERE s.id = :id"),
    @NamedQuery(name = "ServiceFonctionnaliter.findByNom", query = "SELECT s FROM ServiceFonctionnaliter s WHERE s.nom = :nom")})
public class ServiceFonctionnaliter implements Serializable {

    @Size(max = 2147483647)
    @Column(name = "nom")
    private String nom;

    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 50)
    @Column(name = "id")
    private String id;
    @OneToMany(mappedBy = "fkFonction")
    private List<ServiceFonctiongroupe> serviceFonctiongroupeList;

    public ServiceFonctionnaliter() {
    }

    public ServiceFonctionnaliter(String id) {
        this.id = id;
    }

    public String getId() {
        return id;
    }

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


    @XmlTransient
    public List<ServiceFonctiongroupe> getServiceFonctiongroupeList() {
        return serviceFonctiongroupeList;
    }

    public void setServiceFonctiongroupeList(List<ServiceFonctiongroupe> serviceFonctiongroupeList) {
        this.serviceFonctiongroupeList = serviceFonctiongroupeList;
    }

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

    public String getNom() {
        return nom;
    }

    public void setNom(String nom) {
        this.nom = nom;
    }
    
}
