/*
 * 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 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.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author FORCE TECH
 */
@Entity
@Table(name = "service_fonctiongroupe")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "ServiceFonctiongroupe.findAll", query = "SELECT s FROM ServiceFonctiongroupe s"),
    @NamedQuery(name = "ServiceFonctiongroupe.findById", query = "SELECT s FROM ServiceFonctiongroupe s WHERE s.id = :id"),
    @NamedQuery(name = "ServiceFonctiongroupe.findByFkGroupe", query = "SELECT s FROM ServiceFonctiongroupe s WHERE s.fkGroupe = :fkGroupe"),
    @NamedQuery(name = "ServiceFonctiongroupe.findByCanCreate", query = "SELECT s FROM ServiceFonctiongroupe s WHERE s.canCreate = :canCreate"),
    @NamedQuery(name = "ServiceFonctiongroupe.findByCanUpdate", query = "SELECT s FROM ServiceFonctiongroupe s WHERE s.canUpdate = :canUpdate"),
    @NamedQuery(name = "ServiceFonctiongroupe.findByCanUpdateDate", query = "SELECT s FROM ServiceFonctiongroupe s WHERE s.canUpdateDate = :canUpdateDate"),
    @NamedQuery(name = "ServiceFonctiongroupe.findByCanDelete", query = "SELECT s FROM ServiceFonctiongroupe s WHERE s.canDelete = :canDelete")})
public class ServiceFonctiongroupe implements Serializable {


   
    @Size(max = 5)
    @Column(name = "can_create")
    private String canCreate;
    @Size(max = 5)
    @Column(name = "can_update")
    private String canUpdate;
    @Size(max = 5)
    @Column(name = "can_update_date")
    private String canUpdateDate;
    @Size(max = 5)
    @Column(name = "can_delete")
    private String canDelete;

    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Integer id;
   
    @JoinColumn(name = "fk_groupe", referencedColumnName = "id")
    @ManyToOne
    private ServiceGroupe fkGroupe;
    @JoinColumn(name = "fk_fonction", referencedColumnName = "id")
    @ManyToOne
    private ServiceFonctionnaliter fkFonction;

    public ServiceFonctiongroupe() {
    }

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

    public Integer getId() {
        return id;
    }

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

    public ServiceGroupe getFkGroupe() {
        return fkGroupe;
    }

    public void setFkGroupe(ServiceGroupe fkGroupe) {
        this.fkGroupe = fkGroupe;
    }

    public String getCanCreate() {
        return canCreate;
    }

    public void setCanCreate(String canCreate) {
        this.canCreate = canCreate;
    }

    public String getCanUpdate() {
        return canUpdate;
    }

    public void setCanUpdate(String canUpdate) {
        this.canUpdate = canUpdate;
    }

    public String getCanUpdateDate() {
        return canUpdateDate;
    }

    public void setCanUpdateDate(String canUpdateDate) {
        this.canUpdateDate = canUpdateDate;
    }

    public String getCanDelete() {
        return canDelete;
    }

    public void setCanDelete(String canDelete) {
        this.canDelete = canDelete;
    }

    public ServiceFonctionnaliter getFkFonction() {
        return fkFonction;
    }

    public void setFkFonction(ServiceFonctionnaliter fkFonction) {
        this.fkFonction = fkFonction;
    }

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

   

  
   
}
