@Override
    public Staff insert(Staff obj) {
        PreparedStatement pst = null;
        try {
                            pst = this.connect().prepareStatement("INSERT INTO Staff (fonction,nom,prenom,age,id) VALUES (?,?,?,?,?);");
                            pst.setString(1, obj.getFonction());
                            pst.setString(2, obj.getNom());
                            pst.setString(3, obj.getPrenom());
                            pst.setInt(4, obj.getAge());
                            
                            pst.setInt(5, obj.getId());
                            
                            pst.executeUpdate();
                            System.out.println("insertion Staff terminer");
        } catch (SQLException ex) {
            Logger.getLogger(StaffDao.class.getName()).log(Level.SEVERE, "insertion echouer", ex);
        }finally{
        
            try {
            if(pst != null)
            pst.close();
        } catch (SQLException ex) {
            Logger.getLogger(Staff.class.getName()).log(Level.SEVERE, "liberation du preparedstatement echouée", ex);
        }
            
        }
        
        
        
        return obj;
    }