package Models.Client;

import Controllers.Traitement.contro;

/**
 * @author Maher
 */
public class ClientEntreprise {
    
    private Long Code ;
    private String Nom ;
    private String Gerant ;
    private String Adresse ;
    private String Mail ;
    private String Matricule ;
    private Long Postal ;
    private Long Tele1 ;
    private Long Tele2 ;
    private Long Fax ;
    private ClientEntrepriseContact Contact;
    private String LocalNom ;
    
    contro clt = new contro();
    
    public String getCodeString() {
       return  String.valueOf(Code);
    }
    
    public Long getCode() {
        return Code;
    }

    public void setCode(Long Code) {
        this.Code = Code;
    }

    
    public void setCodeString(String Code) {
        if(!clt.isStringNull(Code)){
            this.Code = Long.parseLong(Code);
        }
    }
    
    public String getNom() {
        return Nom;
    }

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

    public String getGerant() {
        return Gerant;
    }

    public void setGerant(String Gerant) {
        this.Gerant = Gerant;
    }
    
    
    public String getAdresse() {
        return Adresse;
    }

    public void setAdresse(String Adresse) {
        this.Adresse = Adresse;
    }

    public String getMail() {
        return Mail;
    }

    public void setMail(String Mail) {
        this.Mail = Mail;
    }

    public String getMatricule() {
        return Matricule;
    }
    
    public void setMatricule(String Matricule) {
        this.Matricule = Matricule;
    }

    public Long getPostal() {
        return Postal;
    }
    
    public String getPostalString() {
        if(Postal != null){
            if(Postal != 0){
                return Postal.toString();
            }else{
                return "" ;
            }
        }else{
            return "" ;
        }
    }
    
    public void setPostaleString(String Postal) {
         if(!clt.isStringNull(Postal)){
            this.Postal = Long.parseLong(Postal);
        }
    }
    
    public void setPostal(Long Postal) {
        this.Postal = Postal;
    }
    
    
    
    public Long getTele1() {
        return Tele1;
    }
    public String getTele1String() {
        if(Tele1 != null){
            if(Tele1 != 0){
                return Tele1.toString();
            }else{
                return "" ;
            }
        }else{
            return "" ;
        }
    }
    
    public void setTele1String(String Tele1) {
        if(!clt.isStringNull(Tele1)){
            this.Tele1 = Long.parseLong(Tele1);
        }
    }
    
    public void setTele1(Long Tele1) {
        this.Tele1 = Tele1;
    }

    public Long getTele2() {
        return Tele2;
    }
    public String getTele2String() {
        if(Tele2 != null){
            if(Tele2 != 0){
                return Tele2.toString();
            }else{
                return "" ;
            }
        }else{
            return "" ;
        }
    }
    
    public void setTele2(Long Tele2) {
        this.Tele2 = Tele2;
    }
    
    public void setTele2String(String Tele2) {
        if(!clt.isStringNull(Tele2)){
            this.Tele2 = Long.parseLong(Tele2);
        }
    }

    public Long getFax() {
        return Fax;
    }
    public String getFaxString() {
        if(Fax != null){
            if(Fax != 0){
                return Fax.toString();
            }else{
                return "" ;
            }
        }else{
            return "" ;
        }
    }
    
    public void setFaxString(String Fax) {
        if(!clt.isStringNull(Fax)){
             this.Fax = Long.parseLong(Fax);
        }
    }
    public void setFax(Long Fax) {
        this.Fax = Fax;
    }

    public ClientEntrepriseContact getContact() {
        return Contact;
    }

    public void setContact(ClientEntrepriseContact Contact) {
        this.Contact = Contact;
    }

    public String getLocalNom() {
        return LocalNom;
    }

    public void setLocalNom(String LocalNom) {
        this.LocalNom = LocalNom;
    }

    
    @Override
    public String toString() {
        return "ClientEntreprise{" + "Code=" + Code + ", \n Nom=" + Nom + ", Gerant=" + Gerant + ", Adresse=" + Adresse + ", Mail=" + Mail + ", Matricule=" + Matricule + ", Postal=" + Postal + ", Tele1=" + Tele1 + ", Tele2=" + Tele2 + ", Fax=" + Fax + '}';
    }

   
    
    
}
