package Models.Client;

/**
 * @author PC-Maher
 */
public class ClientPassager {
    
    public String codeclient ;
    public String nom ;
    public String prenom ;
    public Long telefix ;
    public Long telemobile ;
    public String naissance ;
    public String adresse ;
    public String LocalNom ;
    public int sexe ;
    
    public String getCodeclient() {
        return codeclient;
    }

    public void setCodeclient(String codeclient) {
        this.codeclient = codeclient;
    }
    
    
    public String getNom() {
        return nom;
    }

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

    public String getPrenom() {
        return prenom;
    }

    public void setPrenom(String prenom) {
        this.prenom = prenom;
    }

    
    
    public Long getTelefix() {
        if(telefix != null){
            return telefix;
        }
        else{
            return null ;
        }
    }
    public String getTelefixString() {
        if(telefix != null){
            return telefix.toString();
        }
        else{
            return null ;
        }
    }
    
    
    public void setTelefix(Long telefix) {
        this.telefix = telefix;
    }
    
    
    public void setTelefixString(String telefix) {
        if(telefix == null || telefix.isEmpty()){
            this.telefix = null;
        }else{
             this.telefix = Long.parseLong(telefix);
        }
        
    }

    public Long getTelemobile() {
        return telemobile;
    }
    
    public String getTelemobileString() {
        if(telemobile != null){
            return telemobile.toString();
        }
        else{
            return null ;
        }
       
    }

    public void setTelemobile(Long telemobile) {
        this.telemobile = telemobile;
    }
    
    
    public void setTelemobileString(String telemobile) {
        if(telemobile == null){
            this.telemobile = null;
        }else if( telemobile.equals("") ){
            this.telemobile = null;
        }else{
            this.telemobile = Long.parseLong(telemobile);
        }
        
    }

    public String getNaissance() {
        return naissance;
    }

    public void setNaissance(String naissance) {
        this.naissance = naissance;
    }
    
    
    public String getAdresse() {
        return adresse;
    }

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

    public String getLocalNom() {
        return LocalNom;
    }

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

    
    public void setSexe(int sexe) {
        this.sexe = sexe;
    }

    public int getSexe() {
        return sexe;
    }
    
    public String getSexeString() {
        if(sexe == 0){
            return "0";
        }else if(sexe == 1){
            return "1";
        }else{
            return "";
        }
    }

     
    public void setSexeString(String sexe) {
        if( (sexe != null) || (sexe.length()!= 0) ){
            this.sexe = Integer.parseInt(sexe);
        }else{
            this.sexe = 1;
        }
    }
    
}
